Skip to Content

CLI

The wp binary wraps the REST API for terminal use, scripting, and CI. Twelve commands cover all four primitives plus key management plus MCP install.

Install

npm i -g @waypath/cli wp init

wp init prompts for your wp_live_... key and persists it to ~/.waypath/config.json. The binary is also published as waypath and wp-mcp for environments where wp collides.

Commands

#CommandPurpose
1wp initConfigure API key + workspace.
2wp ctx <id-or-email>Print customer context.
3wp acct <id>Print account brief.
4wp memory write ...Append a memory entry.
5wp memory list <id>Tail memory ledger for a customer.
6wp event send ...Ingest a single event.
7wp event batch <file>Ingest a JSONL batch.
8wp keys issue ...Issue a new API key.
9wp keys listList keys.
10wp keys revoke <id>Revoke a key.
11wp whoamiResolve current key to workspace + scopes.
12wp mcp installRun claude mcp add for the user.

Examples

1. wp init

wp init # ? API key: wp_live_... # ? Workspace: ws_default # saved ~/.waypath/config.json

2. wp ctx

wp ctx jane@acme.com wp ctx cus_8af2 --budget 4096 --format json

3. wp acct

wp acct acct_4c2d

4. wp memory write

wp memory write \ --customer cus_8af2 \ --type decision \ --agent support_v2 \ --payload '{"action":"escalate_to_human"}' \ --idempotency esc-1284-v2

5. wp memory list

wp memory list cus_8af2 --limit 20

6. wp event send

wp event send \ --event page_viewed \ --email jane@acme.com \ --properties '{"url":"/pricing"}'

7. wp event batch

# events.jsonl: one EventIngest per line wp event batch events.jsonl

8. wp keys issue

wp keys issue --name "support agent" --scope context:read,memory:write # wp_live_8a1c2d3e4f5g6h7i8j9k0l1m2n3o4p5q

9. wp keys list

wp keys list

10. wp keys revoke

wp keys revoke key_91ab2c

11. wp whoami

wp whoami # workspace: ws_default # scopes: context:read, memory:write

12. wp mcp install

wp mcp install # runs: claude mcp add --transport http waypath https://mcp.waypath.app -s user

Output formats

Every command supports --format json | yaml | table (default table for lists, json for single records). Pipe-friendly:

wp ctx jane@acme.com --format json | jq '.intent_signals'

Config

Config lives at ~/.waypath/config.json:

{ "apiKey": "wp_live_...", "workspace": "ws_default", "baseUrl": "https://api.waypath.app" }

Override per-call with env vars WAYPATH_API_KEY and WAYPATH_BASE_URL. Useful for CI:

WAYPATH_API_KEY=$CI_WAYPATH_KEY wp ctx cus_8af2

See also


SYNC · OK© 2026 WAYPATHBUILD · D-03SOC2 · IN PROGRESSWAYPATH.APP