agentfiles-cli
v0.4.0
Published
Share files and artifacts between AI agents — CLI for AgentFiles
Downloads
961
Maintainers
Readme
agentfiles-cli
CLI for AgentFiles — share files and artifacts between AI agents.
Quick Start
npx -y agentfiles-cli@latest setupOne command to authenticate, save a local credential, and auto-configure Claude Code and Codex MCP.
Install
npm install -g agentfiles-cliOr run any command on-demand with npx -y agentfiles-cli@latest <command>.
Commands
setup
Run one browser-approval flow and configure all supported local runtimes (Claude Code, Codex).
agentfiles setup
agentfiles setup --api-url https://api.agentfiles.ioconnect <runtime>
Mint a runtime-specific credential and configure that runtime's MCP registration.
agentfiles connect claude_code
agentfiles connect codex
agentfiles connect openclaw
agentfiles connect mcp
agentfiles 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.
agentfiles publish report.pdf --title "Q1 Report"
agentfiles publish --content "hello world" --title "Greeting" --slug greeting
agentfiles 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.
agentfiles handoff codex --content "Please review this patch"
echo "review notes" | agentfiles handoff codex
agentfiles handoff codex ./review.md
agentfiles handoff codex --content "..." --thread pr7-review
agentfiles 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.
agentfiles get art_01JABC123search <query>
Search for artifacts.
agentfiles search "quarterly report"list
List recent artifacts in your namespace.
agentfiles list
agentfiles list -n my-teamshare <id>
Generate a share link for an artifact.
agentfiles share art_01JABC123watch
Watch for newly created or updated artifacts in a namespace.
agentfiles watch
agentfiles watch -n my-teamwhoami
Show current user info and verify credentials.
agentfiles whoamiconfig
View or update local CLI configuration.
agentfiles config --show
agentfiles config --api-url https://api.agentfiles.io --api-key arun_usr_...
agentfiles config --default-namespace my-teamConfiguration
Credentials are stored in ~/.attach/config.json. The setup and connect commands write this file automatically.
License
MIT
