Run Gemini CLI from anywhere

Every Gemini CLI session gets its own git worktree, its own Postgres, its own ports. Parallel agents never fight over your dev database — and you keep coding in yours.

thinslice terminal showing slice tmp --from current gemini running in an isolated worktree

Keep coding in your worktree
while Claude works in its own.

No shared database, no port collisions — isolated by default.

thinslice slice list output
thinslice Gemini CLI session in isolated worktree
thinslice state diff view

Loved by developers

What developers are saying about thinslice + Gemini CLI.

Every slice has its own everything

thinslice binds each git worktree to its own bag of state — no shared databases, no shared ports, no shared config. Gemini CLI runs inside a slice and can't reach yours.

Postgres
Redis
Ports
Config
Git worktree
Read the docs

One command to launch

Spin up a fresh worktree with cloned state and hand it to Gemini in one shot. thinslice handles the postgres clone, the redis snapshot, and the port reservation — you just describe the task.

slice tmp
--from current
gemini "…"

Isolated worktree

with

Cloned state

Own Postgres
Own Redis
Own ports

Review, preview, ship

When Gemini is done, review the diff inline, run your app against the isolated database, then commit and open a PR — without ever touching your main working tree.

fix-authworktree
WorktreePreviewReviewCommitPRMerge
web.fix-auth.my-app.localhost
Inline review3 files changed
src/auth/session.ts+42
src/auth/middleware.ts+18-9
tests/auth.test.ts+31
Ready to shipchecks passed
Commit
Open PR
Merge

Forget about ports

When Gemini CLI sessions run in parallel, each slice gets its own reserved port range. No conflicts, no guessing which process is on which port.

my-app
fix-authnpm run dev
:3001
add-searchnpm run dev
:3002
upgrade-depsnpm run dev
:3003

Fully scriptable

Everything you can do interactively, you can do from a script or CI pipeline.

slice tmp --from current -- claude -p "implement user authentication"slice tmp --from current --name feature-x -- claude -p "implement feature X"slice ls                                          # list running slicesslice status feature-x                        # check a sliceslice rm feature-x                            # tear down + clean state
Full CLI reference

FAQ

+Is this free?
Yes. thinslice is free and open source. Gemini CLI itself is free for personal use with a Google account — no API key or billing required for the free tier. thinslice only manages the local worktree and state; your Gemini usage goes through Google's CLI as normal.
+Does my code or data leave my machine?
No. thinslice runs entirely locally. It clones your Postgres database using native copy-on-write snapshots, binds a port range to the slice, and runs Gemini CLI as a subprocess. Nothing is sent anywhere by thinslice.
+What does "state" mean exactly?
Each thinslice slice gets its own Postgres instance (cloned from yours), its own Redis instance, an isolated set of reserved ports, and environment config scoped to that worktree. Gemini CLI runs inside this environment and can't accidentally mutate your main database.
+Do I need Docker or Kubernetes?
No. thinslice uses native OS process isolation and Postgres's built-in copy capabilities. No containers, no VMs, no root access required.
+What happens when I'm done with a session?
Run slice rm <name> and thinslice tears everything down — the worktree, the Postgres clone, the Redis instance, the reserved ports. Your main environment is untouched.
+Can I run multiple Gemini CLI sessions at once?
Yes, that's the main use case. Each slice tmp call creates a fully independent environment. You can run as many parallel sessions as your hardware supports, each with its own database and ports.
+Do I need a Google account or API key?
Gemini CLI can run with a Google account for free (personal tier) or with a Gemini API key for higher rate limits. thinslice doesn't add any credential requirements — it just launches Gemini CLI in an isolated environment using whatever credentials Gemini already has configured.
+Do I need git?
Yes, git worktrees are how thinslice isolates the code. You don't need GitHub or a remote — a local repo is enough. thinslice creates the worktree branch automatically.
+How does the Postgres clone work?
thinslice uses Postgres's CREATE DATABASE … TEMPLATE to snapshot your database in place. On macOS with APFS, the data files are copy-on-write so the clone is near-instant regardless of database size. See the docs for details.

thinslice is an independent open source project for giving every coding agent its own isolated slice of your stack — no Docker, no VMs, no shared databases.

It's built around the idea that agents should be first-class tenants: isolated from your working environment so you can code and ship in parallel without fear.

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