coop

module
v0.3.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Aug 14, 2026 License: Apache-2.0

README

Coop

Coop gives each software project a persistent Linux workspace for coding agents on Apple silicon. Your project stays at the same path and remains writable; agent login state and Linux-only generated files can live in project-specific volumes.

Coop uses Apple's container runtime. Docker is not required.

Install

You need macOS 26 or later on Apple silicon.

brew install sarcasticbird/tap/coop
container system start
coop doctor

The Homebrew formula installs Apple's container CLI. Start its service once after each reboot.

To build Coop from source instead, use the Go version declared in go.mod:

go install github.com/sarcasticbird/coop/cmd/coop@latest
brew install container
container system start
coop doctor

Make sure $(go env GOPATH)/bin is on your PATH.

Start an agent session

From a project checkout:

cd ~/Projects/my-app
coop init
coop codex

coop init reviews useful machine-local settings such as Linux-only dependency volumes and published development ports. It previews every change and defaults to doing nothing. You can skip it and enter an agent directly with coop codex, coop claude, or coop opencode.

On first entry, Coop offers to build the local guest image. The guest includes Git, the GitHub CLI, common shell tools, Flox, and the supported coding agents. Your repository owns application runtimes such as Go, Node.js, and Python; declare them in the project's Flox environment or in Coop's local config.

Arguments after the agent command pass through unchanged:

coop codex --help
coop claude --help
coop opencode run "fix the tests"

Everyday commands

coop [command [args...]]  Run a command in the project workspace
coop                      Open a Zsh login shell
coop init                 Review machine-local project settings
coop up                   Create or start the project workspace
coop down                 Stop it and preserve project state
coop status               Show workspace and image status
coop ls                   List all workspaces
coop tui                  Open the workspace dashboard
coop doctor               Check host requirements and configuration
coop rebuild              Rebuild after changing configured tools
coop upgrade              Update Coop's locked core toolset
coop destroy              Delete this workspace and its state volumes

Coop flags go before the guest command. For example:

coop --credentials github-work codex

coop down preserves state. coop destroy asks for confirmation and deletes the project's Coop-owned volumes.

Machine-local configuration

Coop loads:

  1. ~/.config/coop/coop.toml for settings shared across projects; then
  2. <project-root>/.coop.toml for this checkout.

The project file has full local authority and must stay Git-ignored. Coop refuses to load it when Git tracks it.

A common project file keeps macOS and Linux dependencies separate and exposes a development server to the host:

# .coop.toml
[tools]
packages = ["go-task", "nodejs_22"]

[[volume]]
path = "web/node_modules"

[[publish]]
guest_port = 5173
host_port = 5173

The Linux volume starts empty, so install dependencies once inside Coop. The host retains its own web/node_modules. A published guest service must listen on 0.0.0.0; it is reachable from the host on 127.0.0.1.

See the parser-tested machine-wide and project-local examples, then use the configuration reference for all supported settings.

GitHub credentials

Coop does not manage or store your source credentials. GitHub creates and revokes tokens, Git stores them through your host credential helper, and Coop reads an authorized credential only for an interactive project entry.

The credential guide provides one copy-paste path for initial GitHub setup, rotation, project authorization, and verification from both Git and gh inside Coop.

Security boundary

Coop reduces direct host exposure; it does not make untrusted code safe. Guest commands run as root, the selected project is writable, containers persist, and outbound network access is unrestricted. Guest processes can copy or retain credentials while those credentials are exposed to a session.

Read the security model before granting credentials, forwarding SSH, mounting more host directories, or seeding sensitive data.

More documentation

Third-party distribution notices for the embedded image are in THIRD_PARTY_NOTICES.md.

License

Apache-2.0. See LICENSE.

Directories

Path Synopsis
cmd
coop command
coop — sandboxed sessions for coding agents, native to Apple Silicon.
coop — sandboxed sessions for coding agents, native to Apple Silicon.
Package image embeds the sandbox image definition so `coop rebuild` works from the installed binary alone.
Package image embeds the sandbox image definition so `coop rebuild` works from the installed binary alone.
internal
config
Package config loads Coop configuration from a machine-wide user file and an optional machine-local project .coop.toml.
Package config loads Coop configuration from a machine-wide user file and an optional machine-local project .coop.toml.
core
Package core manages Coop's release-owned, machine-wide core environment lock.
Package core manages Coop's release-owned, machine-wide core environment lock.
credential
Package credential acquires trusted host credentials and prepares them for temporary injection into one interactive Coop entry.
Package credential acquires trusted host credentials and prepares them for temporary injection into one interactive Coop entry.
doctor
Package doctor diagnoses the host environment: the top support questions answered before they're asked.
Package doctor diagnoses the host environment: the top support questions answered before they're asked.
jobcontrol
Package jobcontrol configures child commands for Unix terminal job control.
Package jobcontrol configures child commands for Unix terminal job control.
lock
Package lock provides per-project host locks so concurrent coop invocations (CLI + TUI + scripts) can't interleave lifecycle operations on the same container.
Package lock provides per-project host locks so concurrent coop invocations (CLI + TUI + scripts) can't interleave lifecycle operations on the same container.
project
Package project resolves which directory a coop session is anchored to.
Package project resolves which directory a coop session is anchored to.
releasetool
Package releasetool resolves and materializes locally configured GitHub release executables without making ordinary Coop entry depend on the network.
Package releasetool resolves and materializes locally configured GitHub release executables without making ordinary Coop entry depend on the network.
runtime
Package runtime abstracts the container runtime.
Package runtime abstracts the container runtime.
seed
Package seed applies host->guest config propagation rules.
Package seed applies host->guest config propagation rules.
session
Package session orchestrates coop lifecycles: resolve project, ensure container, seed configs, exec in.
Package session orchestrates coop lifecycles: resolve project, ensure container, seed configs, exec in.
tui
Package tui is the coop fleet dashboard: every coop on the machine, its state, and lifecycle controls.
Package tui is the coop fleet dashboard: every coop on the machine, its state, and lifecycle controls.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL