Stream: show and tell

Topic: Prototyping a generic frontend for determinate computing


view this post on Zulip blu (Jul 14 2026 at 15:16):

I have a little proof-of-concept prototype CLI tool for "a friendly generic frontend for determinate computing", after the braindump here. Disclaimer, I used an LLM for this prototype and plan on going back with finer combs later.

Github: https://github.com/thebrandonlucas/kai

Here's a quick article on the why and basic overview: https://blu.cx/posts/articles/2026-07-13-kai-friendly-frontend/.
I attached a little demo video too.

In a nutshell, it's meant to allow a generic set of actions common to any determinate system (i.e. nix or guix) to be performed while being able to swap the backend "blueprint". Another primary goal is to make the main things people like to do with determinate systems super easy, which in my opinion is a primary reason people don't use them.

There's only two commands, shell for dev shells and build for building a simple machine image with a preset of packages on it.

Also, thanks @Luke Boswell for the roc-platform packages which I'm currently experimenting with porting over (I got the shell command working in this branch. My initial design was more focused on getting the CLI integrated and working but it's effectful and I love the pure, portable generic EDSL you built. More on that soon!
kai.mp4

view this post on Zulip blu (Jul 29 2026 at 01:20):

Made some fun updates on this and learned a lot of Roc, built my first little platform, and did my first (prototype) release :D

devlog writeup for the curious.

I incorporated @Luke Boswell 's roc-blueprint (I preserved your roc-blueprint LICENSE in the blueprint/ dir, lmk if that's the appropriate etiquette) and adapted it into a little CLI tool called kai, making a higher level abstraction DSL (hence the platform) on top of it. There's only one command for now, shell, much more to come soon.

But just look how simple this is!

app [config] {
    kai: platform "../../platform/main.roc",
}

import kai.Kai

config : Kai.Config
config = {
    name: "cowsay shell",
    shell: {
        pkgs: ["cowsay"],
    },
}

vs. the equivalent flake.nix

{
  "description" = "Development environments for cowsay shell";
  "inputs" = {
    "nixpkgs" = {
      "url" = "github:NixOS/nixpkgs/nixos-unstable";
    };
  };
  "outputs" =
    { nixpkgs, ... }:
    {
      "devShells" = {
        "x86_64-linux" = {
          "default" = nixpkgs."legacyPackages"."x86_64-linux"."mkShell" {
            "packages" = [
              nixpkgs."legacyPackages"."x86_64-linux"."cowsay"
            ];
          };
        };
      };
    };
}

Next up I plan to make it super modular in the style of caddy, such that different determinate backends could be used interchangeably (nix/guix/custom), and so that users can add their own modules or modify the default implementations.

Then I'll begin working further on defining the generic determinate protocol interface further and begin integrating some more commands.

view this post on Zulip Luke Boswell (Jul 29 2026 at 01:48):

Love it. I shared your article too https://www.reddit.com/r/roc_lang/s/4S2PN4gkcZ

view this post on Zulip blu (Jul 29 2026 at 13:34):

One other thing I failed to note: one of the really cool things about developing with nix is that you can easily have people run code without manually downloading a binary. If you set it up properly, anybody on any machine can just do like this:

nix run github:thebrandonlucas/kai -- version

Which I find super cool. Instead of telling people to update they can just test the latest code with one command every time.

view this post on Zulip blu (Aug 04 2026 at 06:51):

Dev update on Kai. Was able to lay a modular foundation for writing plugins. Should hopefully be able to move much quicker now on features: https://blu.cx/posts/blog/2026-08-04-kai-devlog-2-modularity/

view this post on Zulip TeaDrinkingProgrammer (Aug 04 2026 at 21:44):

blu said:

Dev update on Kai. Was able to lay a modular foundation for writing plugins. Should hopefully be able to move much quicker now on features: https://blu.cx/posts/blog/2026-08-04-kai-devlog-2-modularity/

The write-up is a great read, thanks!

view this post on Zulip blu (Aug 05 2026 at 00:53):

The write-up is a great read, thanks!

Thanks a ton!

view this post on Zulip blu (Aug 11 2026 at 03:15):

Update on kai: custom DSL and plugins themselves are modular. 3 lines gets you a devshell:

shell {
   pkgs: ["cowsay", "fortune"]
}

https://blu.cx/posts/blog/2026-08-11-kai-devlog-3-custom-dsl-plugin-modules/

view this post on Zulip blu (Aug 18 2026 at 03:27):

Update on kai. Some usable features, like task, build, workflow, and overlay! Not quite nix replacing yet but getting there!

https://blu.cx/blog/2026-08-17-kai-devlog-4-environment-task-build-workflow/

view this post on Zulip blu (Sep 02 2026 at 18:28):

Updates on Kai and notes/thoughts on learnings and notes on better programming practices:

https://blu.cx/posts/blog/2026-09-02-kai-devlog-5-conceptual-integrity-better-programmer/

I'm pretty excited about this one as I was able to successfully launch machines in the cloud from an image which had packages preinstalled, services, secret management, build, run CI, etc. and dogfood it with two new projects, while just defining all of this in a Kaifile. A lot more testing to do but it feels like it has crossed the boundary into real utility!

view this post on Zulip Luke Boswell (Sep 02 2026 at 23:24):

@blu would you consider using https://lukewilliamboswell.github.io/weaver/ for Kai?

view this post on Zulip blu (Sep 03 2026 at 00:43):

Sure! I haven't heard about weaver. Do you feel it's an improvement over basic-cli? That's the only dependency at the moment

view this post on Zulip Luke Boswell (Sep 03 2026 at 00:44):

It's a package for parsing the cli arguments and providing the help messages etc. You can use it with basic-cli

view this post on Zulip Luke Boswell (Sep 03 2026 at 00:44):

Instead of rolling your own arg parser

view this post on Zulip blu (Sep 03 2026 at 00:53):

Oh looking a bit deeper and it looks like a new maintained fork of the one built from the old compiler?

Looks basically like clap from rust?

I'd definitely consider it. I do want to weigh it against the cost of adding more dependencies, but I suspect this will become more and more useful as I start worrying more with CLI ergonomics. For example I wanted to implement clig.dev rules for this project soon and seems like this would come in handy.

view this post on Zulip Luke Boswell (Sep 03 2026 at 00:54):

Yes, Sam hasn't been around in quite a while... it's basically clap for Roc :clap:

view this post on Zulip blu (Sep 03 2026 at 00:57):

Think I'm gonna give this a shot in a new branch tonight, I've been needing to work on CLI ergonomics for a bit :D


Last updated: Sep 03 2026 at 15:16 UTC