Skip to content

Halyard CLI

The Halyard CLI scaffolds MCP client configs and syncs your coding-session logs back to Halyard as knowledge. For developers who want to wire up multiple clients at once, or feed agent sessions into the knowledge base. It is one on-ramp among several — you can also configure each client by hand from its own page.

The package is @halyard/cli and the binary is halyard. Install it globally, or run it once without installing:

Terminal window
npm i -g @halyard/cli
Terminal window
pnpm dlx @halyard/cli
Terminal window
halyard login

login runs a browser-based PKCE OAuth flow and writes your credentials to ~/.halyard/credentials.json.

For headless or CI environments, skip the browser flow by setting a token instead:

Terminal window
export HALYARD_TOKEN=sk_halyard_
Terminal window
halyard setup

setup (alias init) writes the MCP server config for each client it supports:

ClientWhat setup writes
Claude CodeRegisters the halyard HTTP server
CursorUpserts halyard in .cursor/mcp.json, preserving existing servers
CodexAdds [mcp_servers.halyard] to ~/.codex/config.toml

Preview the changes without writing anything:

Terminal window
halyard setup --dry-run
Terminal window
halyard sync

sync discovers coding-session logs in ~/.claude/projects/ and ~/.codex/sessions/, then ingests them as knowledge. It tracks what it has already sent in ~/.halyard/sync-state.json so re-runs only pick up new sessions.

Flags:

  • --provider — limit the sync to one provider’s sessions
  • --dry-run — show what would be ingested without sending anything
Terminal window
halyard push <file> --provider <provider> --session-id <id>

push ingests one session file directly. Both sync and push send to the ingest endpoint /api/v1/sessions/ingest.

After halyard setup, open a configured client and ask the agent to identify you:

Use Halyard to tell me who I am.

Expect a whoami call returning your user and organization. If the tools do not appear, see Troubleshooting.