|
| 1 | +# oss-back2base |
| 2 | + |
| 3 | +Containerized [Claude Code](https://docs.anthropic.com/en/docs/claude-code) with a curated set of MCP servers, network isolation, and prompt-cache optimizations. No local dependencies beyond Docker. |
| 4 | + |
| 5 | +This is the open-source release of [`back2base`](https://back2base.net). It includes the CLI and the container runtime but **not** the hosted features: |
| 6 | + |
| 7 | +- No proxy gateway (no `claudeproxy`) |
| 8 | +- No cloud config sync |
| 9 | +- No durable-object memory / cross-session memory sync |
| 10 | +- No Auth0 sign-in flow |
| 11 | + |
| 12 | +If you want hosted memory, multi-device config sync, and a managed Anthropic proxy, use the upstream `back2base` distribution. If you want a local, self-contained dev container for Claude Code with sensible MCP defaults and a firewall — read on. |
| 13 | + |
| 14 | +## Quick start |
| 15 | + |
| 16 | +```bash |
| 17 | +# Build the binary |
| 18 | +go build -o oss-back2base . |
| 19 | + |
| 20 | +# First run extracts the embedded container payload to $HOME/.local/share/back2base |
| 21 | +# and builds the image. Sign in to Claude (host-side) and copy the token: |
| 22 | +claude setup-token |
| 23 | +echo 'BACK2BASE_CLAUDE_CODE_OAUTH_TOKEN=<paste-here>' > ~/.config/back2base/env |
| 24 | + |
| 25 | +./oss-back2base # launch Claude Code in the current directory |
| 26 | +./oss-back2base shell # drop into a container shell |
| 27 | +./oss-back2base doctor # health checks |
| 28 | +./oss-back2base profile # pick an MCP profile |
| 29 | +``` |
| 30 | + |
| 31 | +Anthropic API key works too — set `BACK2BASE_ANTHROPIC_API_KEY` in `~/.config/back2base/env` instead of the OAuth token. |
| 32 | + |
| 33 | +## What's included |
| 34 | + |
| 35 | +- **CLI commands**: `run` (default), `shell`, `doctor`, `explore`, `profile`, `prune`, `mcp`, `overview`, `update`, `selfupdate`, `install`, `setup`, `clean`, `resume`, `status`, `build`/`rebuild`, `session`, `version`. |
| 36 | +- **Container payload** (`back2base-container/`): Dockerfile, docker-compose, entrypoint, iptables-based outbound firewall, MCP profile defaults, baseline `CLAUDE.md` template, skills + slash-command bundle. |
| 37 | +- **GitHub Actions**: `ci.yml` (go test/vet, lint, cross-build matrix) and `release.yml` (goreleaser on tag push). |
| 38 | + |
| 39 | +## What's not included |
| 40 | + |
| 41 | +- `auth0/`, `auth.go`, `login.go`, the device-flow code, and the host keychain credential store — all removed. |
| 42 | +- `workers/` (Cloudflare Workers for proxy, config, memory, landing site) — never copied. |
| 43 | +- `lib/cloud-sync.sh`, `lib/hooks/memory-push.sh`, `lib/hooks/memory-pull.sh` — removed from the container payload. |
| 44 | +- OTel telemetry to `otel.back2base.net` — disabled by default; users can point `BACK2BASE_OTEL_ENDPOINT` at their own collector. |
| 45 | + |
| 46 | +## Repository layout |
| 47 | + |
| 48 | +- `*.go` at the repo root — the Cobra-based CLI, flat `package main`. `assets.go` embeds the container payload. |
| 49 | +- `back2base-container/` — the shipped Docker image payload, extracted to `$BACK2BASE_HOME` on first run. |
| 50 | +- `.github/workflows/` — CI (test, vet, lint, cross-build) and release (goreleaser on tag push). |
| 51 | + |
| 52 | +## License |
| 53 | + |
| 54 | +MIT. See [LICENSE](LICENSE). |
0 commit comments