{"id":44318750,"url":"https://github.com/ykdojo/safeclaw","last_synced_at":"2026-06-29T02:00:30.122Z","repository":{"id":336212690,"uuid":"1146501646","full_name":"ykdojo/safeclaw","owner":"ykdojo","description":"The easiest way to run multiple Claude Code sessions, each in its own container, with a dashboard to manage them all. Quick setup with battle-tested sensible defaults and skills.","archived":false,"fork":false,"pushed_at":"2026-06-16T18:25:11.000Z","size":347,"stargazers_count":156,"open_issues_count":0,"forks_count":18,"subscribers_count":0,"default_branch":"main","last_synced_at":"2026-06-16T20:19:36.640Z","etag":null,"topics":["agentic-coding","agentic-coding-tool","ai","claude","claude-ai","claude-code","cli","developer-tools","productivity"],"latest_commit_sha":null,"homepage":"","language":"HTML","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/ykdojo.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2026-01-31T07:34:54.000Z","updated_at":"2026-06-16T18:25:49.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/ykdojo/safeclaw","commit_stats":null,"previous_names":["ykdojo/safeclaw"],"tags_count":8,"template":false,"template_full_name":null,"purl":"pkg:github/ykdojo/safeclaw","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ykdojo%2Fsafeclaw","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ykdojo%2Fsafeclaw/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ykdojo%2Fsafeclaw/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ykdojo%2Fsafeclaw/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ykdojo","download_url":"https://codeload.github.com/ykdojo/safeclaw/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ykdojo%2Fsafeclaw/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":34910177,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-26T15:22:16.424Z","status":"online","status_checked_at":"2026-06-29T02:00:05.398Z","response_time":58,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["agentic-coding","agentic-coding-tool","ai","claude","claude-ai","claude-code","cli","developer-tools","productivity"],"created_at":"2026-02-11T06:05:01.690Z","updated_at":"2026-06-29T02:00:30.105Z","avatar_url":"https://github.com/ykdojo.png","language":"HTML","funding_links":[],"categories":[],"sub_categories":[],"readme":"# SafeClaw\n\nThe easiest way to run multiple Claude Code sessions, each in its own container, with a dashboard to manage them all. Quick setup with battle-tested [sensible defaults](#sensible-defaults) and [skills](#skills).\n\nhttps://github.com/user-attachments/assets/e282ed8f-3ec9-4a9e-aa9e-4bc84f9281e9\n\nSee [architecture.md](architecture.md) for design details.\n\n## Why a container?\n\n- **Isolated** - Claude Code runs with bypass permissions, but can't touch your host machine.\n- **Lightweight** - Spin up, stop, or delete sessions in seconds. Much faster than a full VM.\n- **Portable** - Works on any machine with Docker. Same environment everywhere.\n\nThis lets you run Claude Code with `--dangerously-skip-permissions` safely and fast.\n\n## One session per container\n\nEach Claude Code session runs in its own container. Spin up as many as you need - they're isolated from each other and start in seconds. Run different research tasks, projects, or experiments in parallel without interference. Conversation history is automatically stored on your host machine via a volume mount.\n\n## Quickstart\n\n```bash\n# Build image (once, or after changes)\n./scripts/build.sh\n\n# Start container and web terminal\n./scripts/run.sh\n\n# To mount a local project (host_path:container_path)\n./scripts/run.sh -v ~/myproject:/home/sclaw/myproject\n\n# Run multiple sessions with -s\n./scripts/run.sh -s work        # safeclaw-work on next available port\n./scripts/run.sh -s research    # safeclaw-research on next available port\n```\n\nOn first run, `run.sh` will prompt you to set up authentication tokens. It then starts a web terminal at http://localhost:7681 and opens it in your browser.\n\n## Dashboard\n\n![Dashboard showing multiple Claude Code sessions running in parallel](assets/dashboard.png)\n\nManage all sessions from a web dashboard:\n\n```bash\nnode dashboard/server.js\n```\n\nOpens at http://localhost:7680 with:\n- Create new sessions with volume mounts and initial queries\n- All sessions listed with start/stop/delete controls\n- Live iframe views of active sessions\n\n## Optional integrations\n\n- `./scripts/setup-slack.sh` - Add Slack read access\n\n## What's included\n\n- Ubuntu 24.04\n- Node.js 24 (LTS)\n- Claude Code 2.1.185\n- GitHub CLI with auto-configured git user\n- Playwright MCP with Chromium\n- Slack read-only skill and tool (optional - requires token)\n- [DX plugin](https://github.com/ykdojo/claude-code-tips#tip-44-install-the-dx-plugin), [custom status line](https://github.com/ykdojo/claude-code-tips#tip-0-customize-your-status-line), [shell aliases](#aliases)\n- ttyd web terminal + tmux\n\n## Sensible defaults\n\n- Claude Code version pinned (currently 2.1.185)\n- `autoCompactEnabled: false` - prevents automatic context compaction\n- `promptSuggestionEnabled: false` - disables prompt suggestions\n- `--dangerously-skip-permissions` enabled (because it's containerized)\n\n## Conversation history and memory\n\nEach session's data persists locally at:\n\n```\n~/.config/safeclaw/sessions/\u003csession-name\u003e/\n```\n\nThis maps to `/home/sclaw/.claude/projects/` inside the container and includes:\n- **Conversations** - JSONL files (one per conversation)\n- **Memory** - Auto memory at `-home-sclaw/memory/MEMORY.md`, loaded into the system prompt each conversation\n\nRebuilding containers or restarting sessions won't affect your history or memory.\n\n## Authentication\n\nTokens are stored in `~/.config/safeclaw/.secrets/` and injected as env vars on each run. The filename becomes the env var name.\n\n| File | How to generate |\n|------|-----------------|\n| `CLAUDE_CODE_OAUTH_TOKEN` | `claude setup-token` (valid 1 year) |\n| `GH_TOKEN` | `gh auth token` or create a PAT at github.com/settings/tokens |\n| `SLACK_TOKEN` | Optional - `./scripts/setup-slack.sh` |\n\nYou can add any additional secrets by creating files in the `.secrets/` directory.\n\n## Scripts\n\n| Script | Description |\n|--------|-------------|\n| `scripts/build.sh` | Build the Docker image and remove old container |\n| `scripts/run.sh` | Start/reuse container, inject auth, start ttyd. Use `-s name` for named sessions, `-v` for volumes, `-n` to skip opening browser, `-q \"question\"` to start with a query. |\n| `scripts/setup-slack.sh` | Set up Slack integration (optional) |\n| `scripts/manage-env.js` | Manage environment variables (list, add, delete) |\n| `dashboard/server.js` | Web dashboard for managing multiple sessions |\n\n## Aliases\n\nInside each container, these aliases are available:\n\n| Alias | Command |\n|-------|---------|\n| `c` | `claude` |\n| `cs` | `claude --dangerously-skip-permissions` |\n\n## npm scripts\n\n| Command | Runs |\n|---------|------|\n| `npm run build` | `./scripts/build.sh` |\n| `npm start` | `./scripts/run.sh` |\n| `npm run dashboard` | `node dashboard/server.js` |\n| `npm run dashboard:dev` | `nodemon dashboard/server.js` |\n| `npm run setup-slack` | `./scripts/setup-slack.sh` |\n| `npm run manage-env` | `node scripts/manage-env.js` |\n\n## Skills\n\nDefined in `setup/skills/`.\n\n| Skill | Description | Requires |\n|-------|-------------|----------|\n| slack | Read Slack messages, channels, DMs, and search (read-only) | `SLACK_TOKEN` |\n| yt-dlp | Download YouTube videos, audio, and subtitles/transcripts | - |\n| gdoc | Read publicly shared Google Docs | - |\n\n## Featured in\n\n- [claude-code-tips](https://github.com/ykdojo/claude-code-tips)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fykdojo%2Fsafeclaw","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fykdojo%2Fsafeclaw","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fykdojo%2Fsafeclaw/lists"}