Complete command, flag, and environment-variable reference for the agent-share CLI — login, MCP wiring, inboxes, channels, AirPlay, and webhooks.
$ agent-share loginBrowser OIDC login; stores a refresh token in ~/.agent-share.
$ agent-share initWire ./.mcp.json to your personal inbox (read phone shares, push back).
$ agent-share register "Backend Agent" --role "API refactor"Enroll a named inbox and wire a pinned channel for it.
$ agent-share agents --activeList only online/idle agents.
$ agent-share airplayReceive an iPhone screen mirror and stream it into the inbox.
$ agent-share webhook create --provider coolify --label prodMint an inbound webhook URL for Coolify deploy events.
agent-share is the standalone Go CLI for Agent Share — share to and from your coding agents from anywhere. It logs you in over OIDC, wires Claude Code's ./.mcp.json to a remote inbox, lists and manages your agents, runs the stdio MCP/channel servers, receives iPhone screen mirrors over AirPlay, and mints inbound webhook URLs.
The CLI source lives in src/agent-share/ (a separate Go module from the server). Releases are published for every platform; since 1.14.0 they auto-publish to the agentics.dk store. See the releases page.
agent-share <command> [options]
login Log in to an Agent Share server (OIDC loopback browser flow)
init Wire ./.mcp.json to your PERSONAL inbox
register Create + name an inbox, wire a pinned channel, print the A2A card
card Print A2A connection details (Azure Foundry inputs) for this inbox
agents List your agents (status + last heartbeat) [aliases: list, ls]
disable Hide an agent from the share picker (inbox kept)
enable Un-hide a disabled agent
mcp Run the stdio MCP server (agent mode, or --personal proxy)
channel Run as a Claude Code channel (research preview)
install Wire ./.mcp.json (mcp tools, channel mode, or aspire)
airplay Receive iPhone screen mirroring (AirPlay) on this Wi-Fi
webhook Manage inbound-webhook URLs [alias: webhooks]
version Print the CLI version [--version, -v]
help Show usage [-h, --help]
| Variable | Default | Purpose |
|---|---|---|
AGENT_SHARE_SERVER | https://share.agentics.dk | Server base URL the CLI talks to. |
AGENT_SHARE_ISSUER | https://login.agentics.dk/realms/agentics | OIDC issuer used for login. |
AGENT_SHARE_CLIENT_ID | agentics-share-desktop | OIDC client id for the loopback flow. |
AGENT_SHARE_HOME | ~/.agent-share (or ~/.agent-share-aspire) | Config + credential directory. See note below. |
AGENT_SHARE_TOKEN | (none) | Inbox bearer token used by channel, card, and airplay. |
USE_ASPIRE | (unset) | When truthy, use the local Aspire dev cred home/tunnel for every command. |
OIDC login requests scopes openid profile email offline_access.
Config/credential dir. The default is ~/.agent-share. When USE_ASPIRE is truthy (or install aspire is used), the CLI uses ~/.agent-share-aspire instead so a local login never clobbers your production credentials. Override the location with AGENT_SHARE_HOME.
Logs in to an Agent Share server using an OIDC loopback (browser) flow, then saves the refresh token, your sub, and your display name to the credential store. After saving, it sanity-checks the token against GET /api/agents.
| Flag | Default | Description |
|---|---|---|
--server | stored host → https://share.agentics.dk | Server base URL to log in to. |
Endpoints: OIDC authorize/token at the issuer; verifies with GET /api/agents.
Stale or dead refresh tokens auto re-login inline when running on a TTY; non-interactively the CLI prints copy-paste re-login instructions (shipped 1.15.0).
Wires ./.mcp.json to run agent-share mcp --personal — your personal inbox. From Claude Code you can then read your phone shares, share.send to buzz your phone via Web Push, and register sub-agents. Also drops the agent-share SKILL.md.
Requires a prior login. No token is written to the file — auth uses your stored login (auto-refreshed).
| Flag | Description |
|---|---|
--force | Replace an existing agent-share MCP entry without prompting. |
One-command setup: enroll and name an inbox, wire a self-contained ./.mcp.json running agent-share channel pinned to that inbox, then print the A2A card plus the channel launch line.
NAME is a free-text positional that may contain spaces; flags may appear in any position (e.g. register "My Agent" --dir x). If omitted, a name is suggested.
| Flag | Default | Description |
|---|---|---|
--role <text> | coding session | One-line role/description for the inbox. |
--dir <name> | (current dir) | Register into a working folder (created if absent); keeps it apart from a personal MCP. |
--force | — | Replace an existing agent-share MCP without prompting. |
Endpoint: POST /api/agents/enroll.
The wired entry embeds AGENT_SHARE_SERVER and AGENT_SHARE_TOKEN in its env (the inbox bearer). There is a clobber guard: if the folder already has an agent-share MCP, the CLI prompts to replace it in place or spin up a --dir working folder; a non-TTY run refuses rather than overwrite.
agent-share register "Backend Agent" --role "API refactor" --dir backend
Lists the owner's agents with a status dot (online / idle / offline), a disabled flag, relative last-active, role, and id.
Aliases: list, ls.
| Flag | Description |
|---|---|
--all | Include disabled agents. |
--active | Only online/idle agents. |
Endpoint: GET /api/agents.
Hide an agent from the share picker (the inbox is kept) or un-hide it. The target is resolved by exact id or by a unique case-insensitive name.
agent-share disable "Backend Agent"
agent-share enable 0f3a9c12
Endpoints: POST /api/agents/{id}/disable, POST /api/agents/{id}/enable.
Runs the stdio MCP server.
Default (agent) mode auto-registers this workspace as an agent on startup, heartbeats every 2 minutes for the session's lifetime, and exposes the tools:
| Tool | Purpose |
|---|---|
register | Register/identify this agent. |
list | List agents. |
get_agent_card | Fetch the A2A card. |
task.list | List A2A tasks. |
task.update | Update an A2A task. |
task.complete | Complete an A2A task. |
No token is stored in the MCP config — auth comes from your login (auto-refreshed).
--personal (also -personal) connects to your personal hosted inbox as the owner, exposing the share.* tools. This is what init wires.
The hosted
/mcpserver exposes a different tool set (share.list,share.get,share.get_frame,share.peek_text,share.mark_received,share.delete,share.send,agent.*,webhook.*). See the channels/inbox guide for read-state semantics — reading does not mark an item received.
Research preview. Claude Code channels are a Claude-Code-specific feature (Claude Code v2.1.80+) whose contract is subject to change. This command is not the shipped pull-inbox path.
Runs as a Claude Code Channel: a hand-rolled JSON-RPC stdio server that long-polls open items and pushes A2A tasks and phone shares as notifications/claude/channel events, so an idle session wakes. It advertises the experimental.claude/channel capability.
Channel tools: complete, mark_received, get_agent_card, register, list, send_to_agent.
Token resolution is the same as card (AGENT_SHARE_TOKEN / stored login). Launch a session against it with:
claude --dangerously-load-development-channels server:agent-share --dangerously-skip-permissions
Prints the A2A connection details (the inputs an Azure Foundry agent needs) for this inbox, plus the AGENT_SHARE_TOKEN/AGENT_SHARE_SERVER you would use to launch a matching channel.
Endpoint: GET /api/agent/card. Token resolution matches channel.
Wires ./.mcp.json to run agent-share mcp (pull-style agent tools), or agent-share channel when you pass channel, and drops SKILL.md. No secret is written to the file — auth is your stored login.
agent-share install # wires `agent-share mcp`
agent-share install channel # wires `agent-share channel`
Wires ./.mcp.json to the local Aspire server instead of production. The resource defaults to share. The CLI runs aspire describe <resource> --format Json, prefers PUBLIC_BASE_URL (falling back to the loopback URL), pulls OIDC_ISSUER, and sets a separate AGENT_SHARE_HOME (~/.agent-share-aspire) so a local login doesn't clobber prod.
agent-share install aspire share
Live iPhone screen-mirror receiver (shipped 1.17.0). The iPhone AirPlays to a pure-Go receiver that decrypts FairPlay to raw H.264.
STREAM mode (default) posts each mirror's Annex-B H.264 to the inbox via chunked POST /api/streams (Content-Type video/h264); the first byte creates a live stream item and EOF ends it. FILE mode (--out) instead writes mirror-<id>.h264 locally.
| Flag | Default | Description |
|---|---|---|
--name | Agent Share | AirPlay receiver name shown on the iPhone. |
--port | 7000 | Listen port. |
--key | airplay_key.bin | Ed25519 identity file. |
--log <file> | — | Write a log file. |
--dump | — | Hex-dump RTSP bodies (debugging). |
--out <dir> | — | FILE mode: write mirror-<id>.h264 to this directory. |
--server | default server | Server base URL. |
--token | AGENT_SHARE_TOKEN, else auto-enroll | Inbox bearer; if none, the CLI auto-enrolls an inbox via login. |
Constraint: the iPhone and PC must be on the same Wi-Fi — discovery is mDNS link-local and does not work over Tailscale.
agent-share airplay --name "Poul's Mac"
Manages inbound-webhook URLs for your account. Inbound events land in the inbox as kind=event shares carrying fields like provider, severity, status, resource, and environment.
Availability. Webhooks are ADR-dated 2026-06-18 — post-1.17.0 and unreleased at the time of writing. Check the releases page before relying on them in a published build.
Mints a webhook URL and prints the full URL once.
| Flag | Required | Description |
|---|---|---|
--provider <name> | yes | Provider name, e.g. coolify. |
--label <text> | no | Human label. |
--inbox <inboxId> | no | Target inbox. |
Endpoint: POST /api/inbox/webhooks. The printed URL looks like:
https://share.agentics.dk/api/inbox/webhook/coolify?secret=whk_...
Lists your webhook URLs with secrets masked.
| Flag | Description |
|---|---|
--inbox <inboxId> | Target inbox. |
Endpoint: GET /api/inbox/webhooks.
Revokes a webhook by id.
| Flag | Description |
|---|---|
--inbox <inboxId> | Target inbox. |
Endpoint: POST /api/inbox/webhooks/{id}/revoke.
agent-share version # also --version, -v → prints "agent-share <version>"
agent-share help # also -h, --help
./.mcp.json is project-scoped Claude Code config. Whether it carries a secret depends on how it was wired:
| Wired by | Secret in file? |
|---|---|
init, install, install aspire | No. Auth is your stored login (auto-refreshed). Safe to commit. |
register, install channel (pinned) | Yes. Embeds AGENT_SHARE_TOKEN (the inbox bearer) in the entry env. Do not commit. |
Capabilities by the version that shipped them (from the CHANGELOG):
| Version | Date | Capability |
|---|---|---|
| 1.5.0 | 2026-06-07 | Standalone agent-share Go CLI + stdio MCP server. |
| 1.6.0 | 2026-06-07 | Release binaries (all platforms); install drops SKILL.md. |
| 1.7.0 | 2026-06-07 | npm package @agentics-live/agent-share (downloads the platform binary). |
| 1.13.0 | 2026-06-09 | A2A messaging made async-proper (non-blocking message/send, long-poll tasks/get, task.complete). |
| 1.14.0 | 2026-06-11 | Auto-publish releases to the agentics.dk store. |
| 1.14.1 | 2026-06-12 | Accept Apple Shortcut JSON item/note and persist the raw request body (pre-1.14.1 silently lost it). |
| 1.15.0 | 2026-06-13 | init; register MCP-clobber guard; forward across inboxes; dead-token auto re-login. |
| 1.16.0 | 2026-06-14 | PWA Agentics boot-log splash; forward shares from an item detail view. |
| 1.17.0 | 2026-06-15 | Live iPhone AirPlay screen-mirror streaming into the inbox (airplay STREAM mode → POST /api/streams). |
Webhooks (
agent-share webhook) are ADR-dated 2026-06-18 — post-1.17.0 and unreleased at the time of writing.