Skip to main content

Run coding agents in isolated Docker containers

Project description

clankr

Run Claude Code in isolated Docker containers. --dangerously-skip-permissions without the danger.

install

uv tool install clankr

setup

clankr init
# prompts for: github username, bot username, PAT

Create a classic PAT on the bot account with repo scope.

per-repo setup (recommended)

clankr setup-repo user/project
# then accept the invitation (log in as bot → github.com/notifications)

This adds the bot as a collaborator and configures the repo with:

  • Branch protection: PRs required for main, owner bypasses
  • Squash merge only, auto-delete branch on merge

This step is optional — agents work without it, but branch protection prevents them from pushing directly to main.

usage

clankr launch user/project                        # interactive, bare profile
clankr launch -p gsd user/project                 # GSD workflow
clankr launch -d -p gsd user/project              # detached (tmux)
clankr launch -d -p gsd -s auth-fix user/project  # named slot
clankr launch /path/to/local/repo                 # local repo

clankr run user/project -- -p "prompt"                # non-interactive, stdout capture
clankr run /path/to/repo -p ./profile -- -p "prompt"  # local repo, custom profile path

clankr sync user/project /path/to/host/repo       # register session sync mapping
clankr sync                                       # list sync mappings

clankr resume project-1                           # relaunch a stopped slot
clankr attach project-1                           # reattach to detached agent
clankr save project-1 /path/to/host/repo          # export sessions to host ~/.claude/
clankr ls                                         # list slots
clankr rm project-1                               # remove (warns if unpushed)
clankr clean                                      # remove all stopped clean slots
$ clankr ls
SLOT                 PROFILE  STATUS       SYNC   REPO
hello-world-1        gsd      detached     yes    /home/max/.local/share/clankr/repos/hello-world-1
project-2            gsd      running      -      /home/max/.local/share/clankr/repos/project-2
project-1            bare     stopped      -      /home/max/.local/share/clankr/repos/project-1

profiles

Each profile is an isolated claude code config — system prompt, settings, hooks, extensions.

  • bare — claude code, skip permissions, no extras
  • gsdget shit done workflow framework

-p takes a profile name (looked up in ~/.config/clankr/profiles/) or a path to a profile directory. Each profile is a directory with any of:

  • CLAUDE.md — system prompt
  • settings.json — claude code settings
  • init — executable script that runs inside the container before claude starts (install plugins, extensions, etc.)
  • mounts — bind-mount host paths into the container (one per line: source:destination[:ro|rw], default rw, ~ expanded, ./ relative to profile dir)
clankr profiles                                   # list available profiles
cp -r ~/.config/clankr/profiles/gsd ~/.config/clankr/profiles/my-custom
vim ~/.config/clankr/profiles/my-custom/CLAUDE.md

how it works

  • each slot gets its own repo clone and claude config
  • session sync: local repos auto-sync sessions to host ~/.claude/; for remote repos, clankr sync user/project /host/path registers a mapping — sessions are bind-mounted and write directly to the host
  • session preservation: rm/clean auto-archive sessions before deleting (--purge to skip)
  • credentials copied fresh from host ~/.claude/.credentials.json on each launch (tokens expire ~8h)
  • --dangerously-skip-permissions baked into the container
  • -d wraps the container in a tmux session — survives SSH disconnects
  • git identity: configurable bot account with scoped PAT
  • branch protection via setup-repo: require PR + approval for main, owner bypasses, squash-only merges

commands

Command Description
clankr init First-time setup: config + default profiles
clankr launch Launch an agent (-p profile, -s slot, -d detach)
clankr run Run claude non-interactively (-p profile, -s slot, -- claude args)
clankr ls List all slots
clankr resume <slot> Relaunch a stopped slot (keeps repo, profile, sync)
clankr attach <slot> Attach to detached agent's tmux session
clankr sync [repo] [path] Manage session sync mappings (list / add / --remove)
clankr save <slot> <path> Export sessions to host ~/.claude/ for claude --resume
clankr rm <slot> Remove slot, auto-archives sessions (--purge to skip)
clankr clean Remove all stopped clean slots, auto-archives (--purge to skip)
clankr logs <slot> Show container logs
clankr setup-repo <repo> Add bot collaborator + branch protection + squash merge
clankr profiles List available profiles
clankr version Print clankr version

paths

What Where
Config ~/.config/clankr/config.toml
Sync mappings ~/.config/clankr/sync_map.json
Profiles ~/.config/clankr/profiles/
Dockerfile override ~/.config/clankr/Dockerfile
Repo clones ~/.local/share/clankr/repos/
Slot state ~/.local/share/clankr/run/
Archived sessions ~/.local/share/clankr/sessions/

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

clankr-1.3.2.tar.gz (12.3 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

clankr-1.3.2-py3-none-any.whl (16.7 kB view details)

Uploaded Python 3

File details

Details for the file clankr-1.3.2.tar.gz.

File metadata

  • Download URL: clankr-1.3.2.tar.gz
  • Upload date:
  • Size: 12.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.11.4 {"installer":{"name":"uv","version":"0.11.4","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"26.04","id":"resolute","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

File hashes

Hashes for clankr-1.3.2.tar.gz
Algorithm Hash digest
SHA256 a9d3a6a898686a2797035ed168e95d23d1dba270a8db211e3719540b98aee94e
MD5 cf19bcbeaf87dd63a6c8e8b900a9c5f7
BLAKE2b-256 edcf280ff5aa7cd3903e5b29801e39817dc07ea8a8b417f23a4be60226eb9977

See more details on using hashes here.

File details

Details for the file clankr-1.3.2-py3-none-any.whl.

File metadata

  • Download URL: clankr-1.3.2-py3-none-any.whl
  • Upload date:
  • Size: 16.7 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.11.4 {"installer":{"name":"uv","version":"0.11.4","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"26.04","id":"resolute","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

File hashes

Hashes for clankr-1.3.2-py3-none-any.whl
Algorithm Hash digest
SHA256 72df5afb80ce085feb3cc6c1a0b961c69c143e8edd81c7f7e0ebff81a77d80ec
MD5 e69328a9eb9a4094c31bb1dc81a1ba35
BLAKE2b-256 6a386e01ddad7240e017b43b85366bc8ea465e61cb2422f83b4e025afc6fe871

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page