Run Qwen Code from anywhere

Every Qwen Code session gets its own git worktree, its own Postgres, its own ports. Alibaba's fast coding agent runs in full isolation — parallel tasks never touch your dev state.

thinslice terminal showing slice tmp --from current qwen-code 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 Qwen Code session in isolated worktree
thinslice state diff view

Loved by developers

What developers are saying about thinslice + Qwen Code.

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. Qwen Code 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 Qwen Code in one shot. thinslice handles the Postgres clone, the Redis snapshot, and the port reservation — you just describe the task.

slice tmp
--from current
qwen-code "…"

Isolated worktree

with

Cloned state

Own Postgres
Own Redis
Own ports

Review, preview, ship

When Qwen Code 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 Qwen Code 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. You need Qwen Code installed separately — it's Alibaba's open source coding agent and is free to use with your own API key or local model. thinslice only manages the local worktree and state.
+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 Qwen Code as a subprocess. Nothing is sent anywhere by thinslice itself.
+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. Qwen Code 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 Qwen Code 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.
+Does Qwen Code require an Alibaba Cloud account or API key?
Qwen Code can run with an Alibaba Cloud API key (Qwen models via DashScope) or with a locally hosted model — check the Qwen Code documentation for current options. thinslice has no credential requirements of its own; it launches Qwen Code as a subprocess using whatever credentials Qwen Code already has configured.
+Can I use a local model with Qwen Code inside thinslice?
Yes. If Qwen Code is configured to use a local inference server (Ollama, llama.cpp, etc.), thinslice doesn't interfere. The slice environment inherits the same environment variables Qwen Code needs to find the model endpoint.
+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.