cpb_
GitHub
claude-playbooks · isolated Claude Code instances

Run more than one Claude Code, isolated as far as you choose.

Each playbook has its own CLAUDE.md, skills, plugins and memory, so each Claude has its own personality and know-how. See the notebooks ↓

cpb gives every project, account or model backend its own CLAUDE_CONFIG_DIR: its own memory, hooks, skills, plugins and MCP servers, and, when you want it, its own environment, login and microVM. Each one is described in a file you can apply anywhere.

Five playbooks, five CLAUDE_CONFIG_DIRs, and one that vanishes. Each notebook is its own Claude Code.

hover a tab, or press ↑↓

Everything on these cards is what cpb itself reported after applying showcase.cpb: the directory, the files it wrote, the plugins, MCP servers and skills it set up.

Four layers

Isolation, as far as you choose

Every playbook has its own config home. Go further per playbook: its own environment, its own login, its own process. The dots show which of the five above use each layer.

Config home

Its own CLAUDE.md, settings, hooks, memory, history, sessions, plugins, MCP servers and skills. Your ~/.claude never moves.

every playbook, always
used by

Environment

Its own variables, set or blocked at launch: another model backend, another token, another proxy. Your shell stays as it is.

USE ENVSET VARBLOCK VAR
used by

Login

Its own Anthropic account, sharing nothing with ~/.claude. Run two accounts side by side.

ISOLATED LOGIN
used by

Process

A microVM with its own kernel, filesystem and network. It sees only your working directory and its own config. Keys stay on the host by default.

SANDBOX--sandbox
used by

Runtimes

Isolated by default. Connected on purpose.

Run each agent where it belongs: on your machine, in a microVM, in an OpenShell container, on another machine, or in a throwaway folder. Nothing is shared unless you share it. Hover an agent to see what it reaches; where two agents reach the same thing, they can meet.

cpb does not pass messages between agents. What it does is decide what each one can reach: a model backend, an MCP server, a folder. The places two agents have in common are the places they can meet, and nowhere else. The sandbox details are in the sandbox guide; OpenShell is experimental and needs Linux with Docker.

Recipes

Describe it once. Apply it anywhere.

A .cpb file is a recipe. APPLY checks all of it before it writes anything, --dry-run shows each change, and applying it twice changes nothing. SHOW CREATE ALL exports a whole machine as statements.

real output, from site-tools/showcase.cpb
~/.claude-playbooks/
applied twice, changed nothing

Templates

Start from a setup worth copying

Seven ready-made recipes, from a daily driver to a read-only reviewer to an agent in a sandbox. Pick one, switch things on and off, and the .cpb file writes itself. CI applies each of them with a real cpb.

The tour

Every command, with the output it really printed

The tour runs each snippet on a throwaway home against a real build, and CI re-checks them on every change.

Testing

How it is tested

Every change is tested the same way, on the exact commit a release tags.

20 examplesapplied in CI on every change: dry run, apply, re-apply (a no-op), then each README's own checks.
upgrade-testedThe previous release's binary applies its own examples; this build takes over the same state and must read it identically.
arena regressionA full gentar run on the exact commit each release is tagged from.
CI status

Get it

Install

Linux and macOS, amd64 and arm64 (no native Windows; WSL works). It installs claude-playbook and the shorter cpb.

$ curl -fsSL https://raw.githubusercontent.com/ramazanpolat/claude-playbooks/main/install.sh | sh
devbox, Nix, npx, source