CLI & Editor Plugins

ExploreSelf-hostDocumentationBlogSign In
Documentation
Overview
Getting Started
Getting StartedPlatform IntegrationsAgentPlaybooks in ClaudePortable Bot TeamsHermes Memory ProviderHermes for OrganisationsAgentPlaybooks Tools in HermesCLI & Editor PluginsPython SecretsCross-platform Agent BackupsRelease DistributionTeam CollaborationFederated MCP & OpenAPI ToolsMCP Registry PublishingRoadmap
Core Concepts
PlaybooksSkillsMemoryMCP Integration
Reference
ArchitectureAPI ReferenceManagement APIDeveloper GuideSelf-HostingEnvironment Setup
View on GitHub
DocsCLI & Editor Plugins

CLI & Editor Plugins

The AgentPlaybooks CLI (@agentplaybooks/cli, binary agentplaybooks or apb) keeps your agent configuration — instruction files, Agent Skills, and MCP server definitions — healthy, consistent across AI coding tools, and shareable as a hosted playbook. It is a zero-dependency Node.js (>= 20) package that lives in packages/cli.

Hermes native memory setup

The source CLI includes apb memory setup --target=hermes. It previews installation by default; --apply installs the provider into the selected profile. Set its key through hermes memory setup afterward. Use HERMES_HOME or --hermes-home= to select the profile.

See the Hermes memory guide for source-build commands, direct installation without the AgentPlaybooks CLI, credential scope, and plugin store status. An older installed npm release may not contain this command.

Hermes for organisations

apb hermes sync --managed-dir=

[--memory=] --apply applies an organisation's bundle playbook to this machine's Hermes. The bundle's config.hermes becomes Hermes's managed layer, its skills become a pinned skills directory, and each bot playbook becomes a profile that Hermes installs or updates. --memory configures personal memory in every one of those profiles. See Hermes for Organisations.

Doctor: audit your agent configuration

apb doctor .            # human-readable health report
apb doctor . --json     # stable machine-readable output
apb doctor . --strict   # exit code 2 on high/critical findings (CI)

Doctor is read-only and local-only. It discovers AGENTS.md, CLAUDE.md, .cursorrules, SKILL.md files, and MCP configs across platform folders and reports:

  • Agent Skills specification violations (missing name/description, bad names)
  • Likely hard-coded credentials, including in the scripts and references a
skill bundles (values are never printed, only line numbers)
  • Insecure http:// MCP URLs outside localhost
  • Same-named skills or MCP servers whose definitions drift between platforms
  • A deterministic 0–100 health score

Sync: one playbook, every agent

apb sync .                       # plan only — shows what would be written
apb sync . --apply               # write the manifest and missing platform files
apb sync . --target=codex        # write only the named target(s) this run

Sync normalizes what it finds into the canonical agentplaybook.json manifest, then generates the files missing from each enabled deployment target:

TargetSkillsMCP serversInstructions

claude — Claude Code / Claude Cowork.claude/skills//SKILL.md.mcp.jsonCLAUDE.md importing AGENTS.md
cursor — Cursor.cursor/skills//SKILL.md.cursor/mcp.json—
codex — ChatGPT / OpenAI Codex.codex/skills//SKILL.md.codex/config.tomlreads AGENTS.md natively
copilot — GitHub Copilot.github/skills//SKILL.md.mcp.jsonproject instructions / native agents
gemini — Gemini CLI.gemini/skills//SKILL.md.gemini/settings.json MCP sectionGEMINI.md / native agents
antigravity — Google Antigravity.agents/skills//SKILL.md— (global config)—
grok — Grok Bot (xAI).agents/skills//SKILL.md— (account MCP Box; reported)reads AGENTS.md natively
hermes — Hermes Agent (Nous Research).agents/skills//SKILL.md, registered in ~/.hermes/config.yamlmcp_servers: in ~/.hermes/config.yamlreads AGENTS.md natively; persona → ~/.hermes/SOUL.md

Without --target, detected platforms are enabled automatically. Passing --target= writes only those named targets this run, not in addition to what was auto-detected. antigravity and hermes are opt-in — add an entry to spec.targets in agentplaybook.json:

{ "id": "codex", "type": "codex", "enabled": true, "config": {} }

Syncing across tools instead of inside a project

Most people's skills do not live in a project at all — they sit in ~/.cursor/skills, ~/.claude/skills, or a Hermes profile. --global plans the same fan-out across those home stores:

apb sync --global --target=claude,cursor,hermes        # plan
apb sync --global --target=claude,cursor,hermes --apply

The portable store for the global scope is ~/.agents/skills, and the manifest lives in ~/.agentplaybooks/agentplaybook.json rather than in your home directory. Two deliberate limits:

  • Skills and custom agents only. A global MCP config holds credentials — an auth header, a
token — and copying it into two more files on disk would spread the secret instead of fixing it. Run apb doctor --global to see MCP drift between your clients and decide what to do about it.
  • Skills a client ships with itself are left out: Cursor's managed set and
Hermes' bundled skills are the vendor's files, not your configuration. Pass --include-vendored if you really want them (apb doctor --global --include-vendored shows them too).

Publishing this machine as a playbook

apb login                    # once, per remote
apb push --global            # plan
apb push --global --apply    # create or update the workstation playbook

This uploads the machine's own skills, links ~/.agentplaybooks/remote.json to that playbook, and leaves MCP configuration entirely local — a home-scoped MCP config is where auth headers live, and a playbook is something you share.

Adopting a credential that is already hard-coded

apb secrets adopt --global                                  # plan: read-only, no vault key needed
apb secrets adopt --global --apply                          # store in the vault, change no file
apb secrets adopt --global --apply --rewrite=.cursor/mcp.json  # also replace the literal with ${VAR}

The plan names every credential it found, the file and key path it sits in, its length, and whether that client is documented to expand ${VAR} — never the value itself. --apply on its own only fills the vault: nothing on disk changes, so a configuration that works today keeps working. A literal is replaced only in a file you name explicitly.

No backup of the original is written, on purpose: it would be a second plaintext copy of the credential. And once a value has been on disk it should be rotated — it may also be in git history, shell history, and editor backups. Afterwards the value can reach a client without ever being written down again:

apb secrets run -- claude        # or: hermes chat, codex, ...

Safety rules:

  • Plan-only unless --apply is passed explicitly.
  • Same-named definitions with different content are conflicts: reported
and skipped, never overwritten. Resolve the drift, then re-run.
  • Modified files are backed up under .agentplaybooks/backups/ first.
  • Secret values never enter the manifest — only environment references.
  • Line endings are normalized (CRLF is treated as LF), so the same skill has
the same digest on Windows, macOS, and Linux. A mixed-platform team never sees phantom drift from a checkout difference.

Remote sync: share playbooks with your team

export AGENTPLAYBOOKS_API_KEY=<your-user-api-key>
apb login               # verify and store the key (~/.agentplaybooks, 0600)
apb playbooks           # list playbooks your key can access

apb push --apply        # hosted records + private versioned portable backup
apb backups <guid>      # list backup revision IDs
apb pull <guid> --apply # restore the latest portable backup
apb pull <guid> --snapshot=<id> --apply # restore an earlier revision

The private backup carries instructions, the full skill tree (including scripts/assets), custom agents, MCP references, and the manifest. It is immutable, survives deletion of the playbook record, and is owner-recoverable by GUID. Vault values are never fetched into it; review arbitrary skill assets for embedded credentials. The hosted playbook's separate skills and MCP records remain available for live use:

  • Local → hosted (push): the project's instruction file, the skills and
MCP server definitions discovered in any platform folder, plus the canonical manifest, are uploaded to the linked (or a new) playbook. AGENTS.md wins when several root instruction files exist; if they disagree with each other that is a conflict, and nested instruction files stay local because they scope a subdirectory rather than the project. Local files are authoritative for the connection itself (command, args, env, url, headers); federation settings that only exist on the hosted side — timeouts, auth, access, curated tool lists, descriptions — are preserved, not overwritten. Remote entries that no longer exist locally are left untouched.
  • Hosted → local (pull + sync --apply): a snapshot restores the
portable files into AGENTS.md and .agents/, then sync fans them out to enabled platforms. Existing differing files are conflicts, never silently overwritten. Older playbooks without a snapshot fall back to their legacy instructions, SKILL.md content, and MCP server records.

push refuses an incomplete upload if source definitions conflict. The backup is bounded to 1,000 files, 4 MiB total, and 1 MiB per file. See Cross-platform Agent Backups for the exact scope and platform limits; local overrides, hooks, permission settings, and worktrees are deliberately not portable.

Claude Code reads CLAUDE.md and does not read AGENTS.md, but it does support @ imports. So the claude target does not copy your instructions — it writes a CLAUDE.md containing @AGENTS.md. One source of truth, nothing to drift. If you already have a CLAUDE.md without that import, sync says so instead of rewriting your file.

On a fresh machine the portable store is the only thing on disk, and it is not a deployment target — so nothing would be written. Enable the tools you have:

apb pull <guid> --apply
apb sync --target=claude,codex --apply

sync also lists the agent tools it detects for your user when no target is enabled, so you know what to pass.

OpenAPI federation servers are a hosted-only capability with no local client equivalent; pull reports them instead of writing a half-translated config. Secret values never move in either direction — see below. Use --url= or AGENTPLAYBOOKS_URL for self-hosted deployments.

Export: one playbook, one Hermes bot

A Hermes Agent bot is a profile: its own persona, skills, model, memory and history. Hermes installs and updates one from a directory or a git URL, so export hermes writes that directory from a playbook rather than inventing a second delivery mechanism.

apb pull <playbook-guid> --apply            # the playbook onto disk
apb export hermes ./bots/research --apply   # as a Hermes distribution
hermes profile install ./bots/research --name research
apb sync --target=hermes --profile=research --apply

What lands in the directory is distribution.yaml, SOUL.md from the playbook's persona, and skills// holding each skill's SKILL.md with the files it bundles. Nothing is fetched: the source is what pull already wrote, so the same project produces the same distribution offline.

The fourth command is not optional. Unlike hermes profile create, profile install copies no config.yaml, so a bot installed from a distribution has no providers and no model and cannot answer anything. sync --profile= seeds the bot's configuration from the installation's own and merges the playbook's MCP servers into it. The plan says when it is seeding rather than copying a whole configuration silently.

A distribution carries no config.yaml of its own on purpose. profile install replaces that file rather than merging it, so shipping one would overwrite the providers the machine is configured for and pin the bot's model to whatever was true at export time. Which model a bot runs is a local decision, and changing it per bot is most of the reason to have one.

To take a later change, re-run pull and export hermes, then:

hermes profile update research

The distribution's files are replaced; the bot's sessions, memories, .env and configuration are not touched. The manifest declares only what the export actually ships, so a playbook with no persona does not claim SOUL.md and an update cannot delete a SOUL.md someone wrote by hand.

Because the bot is a playbook, sharing the playbook shares the bot. A colleague who accepts a collaboration invite runs the same four commands and has the same agent, with their own memory and history.

Which playbook a command works on

The working directory decides. pull --apply and push write .agentplaybooks/remote.json in the project root, and every command that talks to a playbook reads the guid from there:

apb secrets status                     # the playbook linked to this directory
apb secrets status ../other-project    # the playbook linked to that directory
apb secrets status --playbook=<guid>   # ignore the link, name the playbook

The credential is resolved separately, and never from the link file: AGENTPLAYBOOKS_PLAYBOOK_KEY if it is set, otherwise the playbook-scoped key secrets login stored for that server and guid. One machine can hold keys for several playbooks without them being interchangeable, and a link to a playbook you have no key for is an error that names the command to run.

Commands that write name their target first. Being one directory over is an easy mistake, and a credential in the wrong vault is a tedious one to undo.

Secrets: no plaintext value ever touches the disk

apb secrets login <guid>     # a playbook-scoped key, stored 0600
apb secrets status           # what's needed vs in the vault vs in this shell
pass show deploy/api | apb secrets push DEPLOY_API_KEY
apb secrets run -- npm run deploy

  • status prints names and state only: needed by the playbook, present in
the vault, marked revealable by the owner, already set in your shell. Never a value.
  • push takes the value from stdin or --from-env= — never from a
command-line argument, because argv lands in shell history and in the process list. It shows the name, the target playbook and the character count, then requires you to type yes. An existing secret is rotated in place, leaving the owner's reveal flag, host allow-list, category and expiry untouched.
  • run fetches the declared secrets into memory, injects them into one child
process, and exits. Nothing is written anywhere. Secrets the owner has not marked revealable stay in the vault and are reported as skipped.
  • These commands use a playbook-scoped API key rather than your account-wide
key, so the credential that can reach secrets is limited to one playbook. Use AGENTPLAYBOOKS_PLAYBOOK_KEY to avoid storing it at all.

If your agent talks to the hosted playbook as an MCP server, you need none of this: the use_secret tool makes the platform inject the credential server-side, so the value never enters the agent's context either.

Connecting an OAuth provider

Some connections are authorized rather than pasted: they need a refresh token, and only a browser can obtain the first one. auth does that once.

apb secrets push GOOGLE_CLIENT_SECRET   # the exchange needs it
apb auth gmail

It runs authorization-code + PKCE against a loopback redirect, then hands the code to the server, which performs the exchange and writes the refresh token straight to the vault. Neither the client secret nor the refresh token touches this machine.

client_id is not a secret — it travels in the authorize URL your browser opens — so it is a literal value in the MCP server's transport_config.auth.client_id, which is also where federation reads it. auth reads the same field, so it need not be passed; --client-id=… and AGENTPLAYBOOKS_OAUTH_CLIENT_ID override it. Full detail in Federated MCP & OpenAPI Tools.

The playbook carries the contract, not the credential

A playbook states which credentials it needs; the values stay where they belong. sync collects every environment reference it finds in your MCP configuration (${VAR}, $VAR, env:VAR) into spec.secrets:

"secrets": [
  { "name": "DEPLOY_API_KEY", "ref": "env:DEPLOY_API_KEY", "required": true }
]

That makes the playbook portable and self-describing: a teammate who pulls it knows exactly which variables to set, without anyone ever transmitting a key. If you edit an entry — pointing it at a vault, or marking it optional — your version is preserved on the next sync. Literal credential values are never written into the manifest and never uploaded; doctor flags them and push refuses to run until they are replaced with references.

Connect: reach the playbook itself, not a copy of it

sync and pull move a playbook's contents into the files your tools read. connect does the other direction: it points a tool at the playbook's own MCP endpoint, so memory, skills, and every federated tool arrive live through one connection.

agentplaybooks connect 011d8a7fa0ec4016 --target=claude --name=apbks-dev --apply

That writes the entry and nothing else:

{
  "mcpServers": {
    "apbks-dev": {
      "type": "http",
      "url": "https://agentplaybooks.ai/api/mcp/011d8a7fa0ec4016",
      "headers": { "X-API-Key": "${APBKS_KEY_APBKS_DEV}" }
    }
  }
}

The key is never written — the config carries the reference, and the tool expands it at launch. Two details worth knowing, because both fail silently:

  • Set the variable before starting the tool. A variable added afterwards is
invisible to a process already running, and from the inside that is indistinguishable from a rejected key: the connection establishes, no tools appear, and refreshing fails.
  • The credential goes in X-API-Key by default, not Authorization. A
client may reserve Authorization for its own authentication handling and drop what you put there without reporting anything. The endpoint accepts either header; use --key-header=Authorization if you prefer it.

Claude Code & Claude Cowork plugin

The repository marketplace installs the AgentPlaybooks Claude plugin: the account MCP connector (OAuth, no key), a playbooks skill, and /agentplaybooks:doctor and :sync, which run this CLI through a pinned npx. It works in claude.ai chat and Cowork as well as Claude Code — on claude.ai, add it under Customize → Plugins → Add marketplace. See AgentPlaybooks in Claude. In Claude Code:

/plugin marketplace add matebenyovszky/agentplaybooks
/plugin install agentplaybooks@agentplaybooks

After installing, ask Claude things like "audit my agent config" or "make my Claude skills available in Cursor and ChatGPT" — the skill knows the safe workflow (plan first, apply after your approval).

Other platforms

  • ChatGPT / Codex: skills land in .codex/skills/, MCP servers in
.codex/config.toml — picked up by the Codex CLI and ChatGPT's coding agent automatically.
  • Google Antigravity: reads project skills from .agents/skills/, which
is exactly AgentPlaybooks' portable store — a pulled playbook is Antigravity-ready with no extra step.
  • Grok Bot (xAI): discovers skills from a fixed set of roots that already
includes the portable .agents/skills/ store (alongside .claude/skills/, .codex/skills/ and .cursor/skills/), and its system prompt loads AGENTS.md directly — so a synced project is Grok-ready with no bridge file. Its MCP servers are the exception: Grok Bot stores only an array of server ids in ~/.grokbot/settings.json (mcpBoxServers), with the definitions living in your account's MCP Box, so no project file can provision them. sync reports the servers it could not deliver rather than dropping them silently. The way around it is one entry, once: add the playbook's own MCP endpoint (POST /api/mcp/) to the Box, and its skills, memory, canvas and use_secret reach every Grok Bot session without any further per-server setup.
  • Hermes Agent: everything for one profile lives in ~/.hermes (or
$HERMES_HOME). Rather than copying skills into that profile, sync registers the portable store under skills.external_dirs in ~/.hermes/config.yaml, so Hermes reads them where they are — nothing is duplicated, and the next pull is live without another sync. Hermes' own skills in ~/.hermes/skills/ keep precedence on a name collision. MCP servers are merged into the same config.yaml (comments and unrelated settings preserved), and a pulled persona becomes ~/.hermes/SOUL.md — never overwriting an existing one, since Hermes seeds a default there on first run. Instructions are read from AGENTS.md natively, but Hermes loads only the first project context file it finds (.hermes.md → AGENTS.md → CLAUDE.md → .cursorrules), so a .hermes.md that hides AGENTS.md is reported as a conflict. Public playbook skills can also be installed straight from the web: hermes skills install well-known:https://agentplaybooks.ai/playbooks//.well-known/skills/. To make a playbook a Bot rather than part of the main profile, see export hermes below.
  • Cursor: skills in .cursor/skills/, MCP servers in .cursor/mcp.json.
Edit this page on GitHub
On this page
Hermes native memory setupHermes for organisationsDoctor: audit your agent configurationSync: one playbook, every agentSyncing across tools instead of inside a projectPublishing this machine as a playbookAdopting a credential that is already hard-codedRemote sync: share playbooks with your teamExport: one playbook, one Hermes botWhich playbook a command works onSecrets: no plaintext value ever touches the diskConnecting an OAuth providerThe playbook carries the contract, not the credentialConnect: reach the playbook itself, not a copy of itClaude Code & Claude Cowork pluginOther platforms