Code
This is a members-only repo. How to join →
The thinnest possible parallel dev environments for coding agents. No Docker, no VMs, no expensive cloud, just processes, files, env variables. Very debuggable.
cli
Find a file
Repository files (latest commit first)
Filename Latest commit message Latest commit date
nobody def65adae5
All checks were successful
Check / check-macos (push) Successful in 15s
Check / check-windows (push) Successful in 31s
fix: the Windows check of members --started accepts ping's conhost.exe
check-binaries.nu spawns `ping -n 605 127.0.0.1` on Windows and expected
`thinslice-runner members <pid> --started <now>` to print that one pid.
spawn gives a console program a hidden console (CREATE_NO_WINDOW), and
Windows starts a conhost.exe for it as a child of ping. The child is in
the job, so members prints two pids, and check-windows failed since the
check was added in 3b6d5fe:

    -- CHECK FAILED: PHASE 4: MEMBERS WITH --STARTED -----------------------

On Windows the check now passes when the pid is among those printed, as
the members checks of phases 3 and 4 already do. On POSIX it still
compares the exact list.

I confirmed the second pid on the Windows runner:

    members: 3640, 4964
      pid 3640  parent 4964  conhost.exe
      pid 4964  parent 5468  PING.EXE
2026-11-12 20:52:43 -08:00
.claude/commands Add contributor setup: direnv, gitignore, test fixtures, CI helper 2026-05-10 19:16:08 -07:00
.forgejo/workflows feat: slice runs a process's command as an argv list, with no shell 2026-11-10 20:56:48 -08:00
apps fix: the Windows check of members --started accepts ping's conhost.exe 2026-11-12 20:52:43 -08:00
bin feat: slice runs a process's command as an argv list, with no shell 2026-11-10 20:56:48 -08:00
docs fix: the Windows check of members --started accepts ping's conhost.exe 2026-11-12 20:52:43 -08:00
scripts feat: slice runs a process's command as an argv list, with no shell 2026-11-10 20:56:48 -08:00
.envrc Add contributor setup: direnv, gitignore, test fixtures, CI helper 2026-05-10 19:16:08 -07:00
.gitignore chore: remove download-page-kit stub and clean up config 2026-05-11 22:16:49 -07:00
.licenserc.yaml chore: fix the license header check, and mark the Rust CLI proprietary 2026-10-29 08:17:25 -07:00
AGENTS.md feat: slice debug status shows live processes, and slice status says active 2026-11-12 20:05:04 -08:00
check-license-headers chore: fix the license header check, and mark the Rust CLI proprietary 2026-10-29 08:17:25 -07:00
CLAUDE.md refactor: move nushell CLI and zig port-probe into apps/nushell-thinslice-cli 2026-05-11 22:16:15 -07:00
CONTRIBUTING.md feat: bundle.nu makes preview builds of the nushell CLI for beta testing 2026-11-12 18:06:47 -08:00
default.do chore: fix the license header check, and mark the Rust CLI proprietary 2026-10-29 08:17:25 -07:00
LICENSE Initial prototype: vertical-slice local dev environment manager 2026-04-12 12:09:35 -07:00
README.md docs: fix docs that were out of date 2026-11-12 09:04:30 -08:00
README.talk.md Rewrite README motivation section and regenerate terminal demo 2026-05-10 20:08:25 -07:00
thinslice.new-state feat: slice runs a process's command as an argv list, with no shell 2026-11-10 20:56:48 -08:00

thinslice cli

Get Started · Examples · Try the Demo · Docs · Discord

Bind any git worktree to a bag of state — its own postgres, redis, ports, config — and run your whole product. Detach, reattach different code. No Docker, no VMs. Just processes.

demo

Motivation

In the old days we worked on one branch at a time. You checked out main, start your dev servers where everything binds to the usual ports. There is a .env file with a DATABASE_URL pointed at the one Postgres running on your laptop. The frontend listens on 3000, and you move on to writing code.

Then the world changes. You're running a coding agent on a feature branch while reviewing a PR, and you want to see both of them running, hot-reloading, side by side. But both want port 3000, both want the same Postgres, and both assume they're the only copy of your app on this machine.

The root cause is that nobody treats port assignments, database locations, or Redis URLs as state. They get hardcoded in a .env file or baked into a config.toml and everyone moves on. When there's only one checkout that's fine, but when there are two and more it gets tedious.

The fix I'm proposing sounds strange at first so think about it a little. Stop running one Postgres on your laptop and start running several. Give each branch its own Postgres data directory, its own port, its own Redis, its own config. The same way you'd give each branch its own code checkout, give it its own state.

The Docker crowd got really close, but it's not lightweight. On macOS and Windows it runs a Linux VM underneath, and it's a greedy guest on a machine that's already running your browser, your editor, and Slack. But your laptop can handle a few extra Postgres processes without breaking a sweat.

/rant

Large companies tell us the answer to local dev getting complicated is to take it off your machine entirely. Remote dev environments give you a whole computer in the cloud, and they're making a profit off you every second you're using it. You can SSH in, sure, but your tools, your dotfiles, your workflow are all somewhere else. You're renting a machine to solve a problem your laptop can already handle.

It gets worse with managed agent sandboxes. They copy your code into an environment you often don't even get SSH access to. When the code doesn't work, or a state transition didn't happen the way you expected, you can't just pop in and look at your sqlite database. You sit and watch Anthropic spend your money try to figure out their mistakes. And if you don't like it, maybe you'd like to purchase an Ultraplan for $5 or a Ultrareview for $25. Yes Anthropic, when I go out to eat I love it when the waiter takes a shit in my food right at the table and then extoles the virtues of their Ultrafood upgrade to a (potentially) shit-free dining experience.

Remember underlying problem is a port conflict and the name of a database in an environment variable.

I think it's absolute fucking bonkers crazy to be renting computers, burning tokens, with the fuck you cherry on top of active internet connection.

The problem isn't code isolation (git worktrees). It's state isolation. And state isolation doesn't need containers. It needs directories, environment variables, and bookkeeping.

So I built thinslice.

How It Works

thinslice separates your repository into two halves: code and state.

Code lives in git worktrees — main/, dev/ for shared branches, local/<name> for your feature work, pr/<number> for reviews, tmp/<name> for throwaway experiments and agents.

State lives in state directories under +state+/. Each one is a self-contained bag of runtime state: a postgres data directory, redis dumps, config files, log files, pid files. A state directory has everything your processes need that isn't source code.

A thinslice.toml manifest in each state directory declares the environment variables and processes for that state:

[env]
DATABASE_URL = "postgres://localhost:5433/myapp"
PGDATA       = "${THINSLICE_STATE_DIR}/postgres"
PORT         = "3001"

[process.postgres]
command = ["postgres", "-D", "${THINSLICE_STATE_DIR}/postgres"]
ports = [5433]
ready_check = ["pg_isready", "-p", "5433"]

[process.server]
command = ["npm", "run", "dev"]
ports = [3001]
start_after_ready = ["postgres"]

command is the program and its arguments. slice runs it with no shell. slice expands ${NAME} in each argument, and in cwd, log and ready_check. The names are THINSLICE_STATE_DIR, THINSLICE_CODE_DIR, HOME and the [env] keys. A relative cwd starts from the state directory; to run in the worktree, write cwd = "${THINSLICE_CODE_DIR}/dir".

The binding between a worktree and a state directory is explicit and exclusive — each state can be bound to at most one worktree at a time. slice use binds, slice detach unbinds. When you cd into a worktree, direnv loads the bound state's environment variables automatically.

Ports are allocated by a machine-wide registry (slice give-me-a-port) so nothing collides across projects. A thinslice.new-state script checked into your repo generates new state directories with fresh ports — it's just a shell script that prints TOML to stdout.

Getting Started

slice setup

slice setup converts an existing git checkout into a thinslice workspace — bare repo, state directories, worktree namespaces. It's idempotent; safe to re-run. See the docs for the full guide.

Contributing

See CONTRIBUTING.md.