Paisano - TUI/CLI: Nix ❤️ DevOps

Initial Release: 0.1.0

From the Readme:

The paisano TUI / CLI

The Paisano TUI / CLI is a brandable general purpose command line kit for Flake based projects which fulfill a Paisano layout and importer contract.

Features

  • Dynamic Project CLI/TUI consuming a special flake attribute __yourbrand
  • CLI leveraging Go’s finest autocompletion library
  • TUI leveraging Go’s finest TUI toolkit
  • Fully brandable to convince everyone that you tailor-made it to the needs of project XYZ
  • Lifts .md docs off the layout contract and displays them in the TUI in the appropriate context

Capabilities

These features afford a Nix DevOps professional the following capabilities:

  • Intuition over Documentation: contextual help is better than a readme
  • Onboarding and Discoverability: spare yourself and your users complicated instructions; let them self-service & -discover
  • Indexing Function: answers quickly what is it all that one can do with a repository?
  • Unstale: by consuming the flake attribute and at maximum a cache of short-ttl on the CLI completion, never let your users get stale on any of the above
9 Likes

0.1.1 - 2023-04-18

Bug Fixes

Miscellaneous Chores

I might be out of the loop, but what’s Paisano?
I found the following repo, but it does not give any example as far as I can see.

1 Like

soil,

pick,

harvest,

fertiliser…

worms…

locusts…

Eatlocusts.nix

I’m sure this does something…

2 Likes

Yes, that repository has one implementation that satisfies the required schema.

I’m in the process of rebasing it on Haumea as the currently most normalized file loader implementation, which is why I haven’t released it yet.

There are examples of its use, but I didn’t bother to mention them here, since they are really targeting very specialized use cases that don’t have a real mandatory connection with the capabilities delivered via this TUI & Schema.

Two Examples would be Standard & Hive.

As for the naming, I have a continued preference for associative storytelling over painstakingly descriptive nomenclature that overall does not perform any better in conveying the semantics. That hasn’t changed. :grinning_face_with_smiling_eyes:

Upon paisano/core's release, I may tell that story. :stuck_out_tongue_winking_eye:

1 Like
  1. Is this AI generated?
  2. What is a paisano layout, can you explain it to me in more detail?
2 Likes
  1. No, it is the extracted core of Standard, in an effort to the pieces independantly useful, and also to focus development efforts.

  2. I have been using and iterating on this for over a year now, but unfortunately our code base is still closed. We should be opening up sometime this year. I have a lot of examples I’ve wanted to share but haven’t been able to.

In any case, the description tries to be descriptive but perhaps its overkill for understanding. In general, it seeks to craft a solid foundation for Nix code that is well structured, specifically for the purpose of automating tasks for devops workflows, eliminating boilerplate, and hopefully wasted work.

One example where this all comes together is Standard Action, where we can use this schema to make assumptions and optmizations during any given CI run.

We tell Nix what we want to build in CI in the flake, and optionally we can filter out paths that already exist in a cache, or containers that already exist in a repo, or even tests that don’t need to run because no relavent code has changed.

In this CI model, we specifically opted to centralized evaluation, so that task runners can focus on actual work, and optionally eval state can be saved between runs in the case of heavy evals (IFD).

None of this would be possible, or at least not trivial without a well defined schema and typed outputs that we can reason about and map over safetly.

1 Like

The logo of Paisano-Nix is AI on the prompt: “Colombian Coffee Farmer in the Fields with a Donkey”. Which is why the :horse: has a wired tail with an ear sprouting off its base. :stuck_out_tongue_winking_eye:

A Paisano layout puts boundaries on how you name and layout your files under a root, commonly ./nix. One possible fulfillment of the schema contract can be obtained using paisano-nix/core (still unreleased).

A typical layout, then, looks like this:

./ops # or ./nix
./ops/local/configs.nix
./ops/local/packages.nix
./ops/local/envs.nix
./ops/local/envs.md # contextual help
./ops/backend/packages.nix
./ops/backend/entrypoints.nix
./ops/backend/oci-images.nix
./ops/backend/deployments.nix

But this example is misleading, at best: It maps the abstract capabilities to one particular use case. There are many more.

You can provide the required schema for .#__mything by any means that your heart desires. Even having a non-strict IFD fetch it from remote, if you wish (as long as you can fulfill derivations that way).

An implementation detail of schema v0 is: only __mything.init & __mything.actions are strictly required for the CLI / TUI. This will be clarified towards schema version v1.

For a test case schema snapshot, see this - unreleased!

eatlocusts.nix now becomes ridedonkey.nix. :slight_smile:

Technical writing can be a challenge , even for native english speakers.

Sometime a picture paints a thousands words (diagrams) , videos are 25 Frames per second.

there are few of them…

I like my technical writing to be dry , boring, and obvious… … but maybe i’m in a minority ?

1 Like

hey, the readme needs some pictures badly ;).

0.2.0 - 2023-09-06

Bug Fixes

Miscellaneous Chores

2 Likes

v0.3.0 - 2023-09-15

Miscellaneous Chores

  • (version) v0.3.0 - (7153571) - David Arnold
  • adopt local cell best practices - (4874308) - David Arnold