Run your whole stack
against any branch

Bind any git worktree to its own postgres, redis, ports, and config. Detach a worktree, reattach different code to the same database. No Docker, no VMs — just processes.

thinslice — worktree list with per-branch postgres, redis, and port state

Spin up a fresh worktree with cloned state,
keep coding on main.

Each worktree carries its own postgres, redis, and ports.

thinslice worktree list
thinslice state bag detail
thinslice agent output

Loved by developers

See what developers are saying about thinslice.

Works with any coding agent

Run any agent in an isolated worktree. thinslice provides the state — the agent uses its own credentials, config, and MCP servers.

Claude Code
Codex
OpenCode
Cursor
Any CLI agent
See docs

State bags, not containers

Each worktree gets its own postgres, redis, ports, and config. Detach the worktree, keep the state. Reattach different code whenever you need.

Postgres
Redis
Ports
Config

per-worktree state bag

or

shared across worktrees

feature-auth
fix-perf
main

Slice, work, reconcile

Create a worktree with cloned state, let the agent work in isolation, review the diff, then merge back and reconcile the database — without touching main.

feature-authworktree
SliceWorkReviewCommitPRReconcile
api.feature-auth.my-app.localhost
Inline review4 files changed
src/auth/session.ts+38
src/auth/middleware.ts+14-6
migrations/001_auth.sql+12
Ready to reconcilechecks passed
Commit
Open PR
Reconcile

Forget about ports

When agents work in parallel, they all run dev servers. thinslice gives each one a URL based on the branch name — no port conflicts, no guessing.

my-app
feature-authslice start
api.feature-auth.my-app.localhost
fix-perfslice start
api.fix-perf.my-app.localhost
add-searchslice start
api.add-search.my-app.localhost

Fully scriptable

Everything you can do in the config, you can do from the terminal.

slice new feature-auth
slice tmp --from current claude -p "implement user auth"  # agent in isolation
slice attach feature-auth --to my-app           # attach worktree to state bag
slice detach feature-auth                       # keep state, detach code
slice ls                                       # list worktrees + state
Full CLI reference

Voice control, fully local

Dictate tasks to your agents without leaving the terminal. Speech-to-text runs entirely on your machine — nothing leaves your network.

Migrate the auth tables to the new schema, then run the test suite

I'll run the migration against your feature-auth state bag, then execute the full test suite in that worktree.

FAQ

+Is this free?
Yes. thinslice is free and open source. You need git and whichever coding agent you want to use (Claude Code, Codex, Cursor, etc.) installed with your own credentials.
+Does my code or data leave my machine?
No. thinslice manages local processes — postgres, redis, and agent subprocesses — entirely on your machine. Nothing is sent to an external service.
+What's a state bag?
A state bag is a named collection of services (postgres instance, redis instance, port allocations, env config) that can be attached to any worktree. Detach the worktree and the state bag persists intact for the next one.
+What agents does it support?
Claude Code, Codex, Cursor, OpenCode, and any agent that runs as a subprocess from a directory. thinslice doesn't modify agent behaviour — it just sets up the environment.
+Do I need Docker?
No. thinslice starts postgres and redis as native processes using the binaries already on your system. No containers, no compose files.
+How does `slice tmp` work?
slice tmp --from current creates a new git worktree branched from your current HEAD, clones the active state bag into a fresh one, then launches the agent inside that isolated environment. When the agent finishes, you review the diff and decide whether to merge.
+Do I need GitHub?
No. thinslice works with any git repository. GitHub integration is optional and only relevant if you want to open pull requests from the CLI.
+How do I reconcile database changes after merging?
thinslice tracks schema migrations per state bag. The reconcile command replays pending migrations from the merged branch onto your target state bag.

thinslice is an open source CLI for binding git worktrees to bags of state, so every branch can run your full stack in isolation.

It's built around the idea that coding agents work best when they can't step on each other — separate postgres, separate redis, separate ports, all from plain processes you can inspect and kill.

If thinslice saves you time, sponsorship is the best way to support continued development.