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

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

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.

Most stacks hardcode where they store data and what ports they use. thinslice asks you to move those values into environment variables. Once every program in your stack reads state paths and ports from the environment, thinslice can wire them differently for each worktree.

It creates worktrees, manages state as directories, and runs your processes. Fork a state, attach it to any branch, spin up a copy for an agent. Several full stacks running in parallel on your laptop, each isolated, no Docker required.

If thinslice has been useful and you want to say thanks, or if you just want to talk shop about agents, evals, sandboxes, or go-to-market for automation products, give me a call.