@attach-dev/attach-cli
v0.1.3
Published
Attach CLI for terminal connect and Attach Files compatibility
Downloads
629
Maintainers
Readme
@attach-dev/attach-cli
CLI for Attach Platform and Attach Files. Use it to authenticate locally, connect terminal runtimes, and move versioned artifacts between agents.
Quick Start
attach setupOne command to authenticate, save a local credential, auto-configure Claude Code and Codex MCP, and print the Attach setup bundle status.
Install
npm install -g @attach-dev/attach-cliOr run any command on-demand with npx -y --package @attach-dev/attach-cli@latest attach <command>.
attach-cli ships only the attach binary. The legacy agentfiles global binary (agentfiles-cli on npm) was published from the older attach-run repo and is no longer the active CLI for this codebase — it stays available there for back-compat but receives no new features. New work happens on attach. Existing users of agentfiles-cli should npm uninstall -g agentfiles-cli && npm install -g @attach-dev/attach-cli and switch their scripts from agentfiles <cmd> to attach <cmd>.
Commands
setup
Run one browser-approval flow and configure all supported local runtimes (Claude Code, Codex).
attach setup
attach setup --api-url https://api.attach.devconnect <runtime>
Mint a runtime-specific credential and configure that runtime's MCP registration.
attach connect claude_code
attach connect codex
attach connect openclaw
attach connect mcp
attach connect genericOptions:
| Flag | Description |
| ----------------------- | ------------------------------------------------------------ |
| --json | Output credentials as JSON to stdout |
| --config-path <path> | Write config to a custom file path |
| --write-env <path> | Write an env file with ATTACH_API_URL and ATTACH_API_KEY |
| --display-name <name> | Agent display name |
| --api-url <url> | API URL override |
publish [file]
Publish a file or text content as a versioned artifact.
attach publish report.pdf --title "Q1 Report"
attach publish --content "hello world" --title "Greeting" --slug greeting
attach publish patch.diff --update art_01JABC123Options:
| Flag | Description |
| -------------------------- | ------------------------------------------------ |
| -n, --namespace <slug> | Namespace slug |
| -t, --title <title> | Artifact title |
| -d, --description <desc> | Description |
| -s, --slug <slug> | URL-friendly identifier |
| -m, --message <msg> | Version message |
| --content <text> | Publish text content instead of a file |
| --content-type <type> | Content type (auto-detected from file extension) |
| --update <id> | Update an existing artifact by ID |
| --no-git | Skip git provenance capture |
handoff <recipient> [file]
Publish an artifact addressed to another runtime with handoff envelope metadata.
attach handoff codex --content "Please review this patch"
echo "review notes" | attach handoff codex
attach handoff codex ./review.md
attach handoff codex --content "..." --thread pr7-review
attach handoff claude_code --reply-to-artifact-id art_01JABC --content "Looks good"Options:
| Flag | Description |
| ----------------------------- | --------------------------- |
| --content <text> | Inline content |
| --thread <thread-id> | Thread ID for grouping |
| --reply-to-artifact-id <id> | Reply to a handoff artifact |
| -n, --namespace <slug> | Namespace slug |
| -t, --title <title> | Override auto-derived title |
| --no-git | Skip git provenance capture |
get <id>
Download an artifact by ID.
attach get art_01JABC123search <query>
Search for artifacts.
attach search "quarterly report"list
List recent artifacts in your namespace.
attach list
attach list -n my-teamshare <id>
Generate a share link for an artifact.
attach share art_01JABC123watch
Watch for newly created or updated artifacts in a namespace.
attach watch
attach watch -n my-teamwhoami
Show current user info and verify credentials.
attach whoamistatus
Show the local Attach CLI config path, masked API key, account summary, Claude Code/Codex MCP wiring, and Attach setup bundle status.
attach statusdoctor
Check local config, API authentication, runtime MCP entries, Attach Guard hook presence, and whether the Codex CLI is available.
attach doctorconfig
View or update local CLI configuration.
attach config --show
attach config --api-url https://api.attach.dev --api-key arun_usr_...
attach config --default-namespace my-teamConfiguration
Credentials are stored in ~/.attach/config.json. The setup and connect commands write this file automatically.
License
MIT
