Connect

CLI

Install the hm command-line tool, sign in, set up your agents and work with memory from the shell

hm (hypermemory-cli) is HyperMemory’s command-line tool. It does three jobs:

  • Sets up your agents — Claude Code, Codex, Hermes Agent, Kimi Code and OpenClaw — with the HyperMemory skill, hooks and memory-writer, in one command.
  • Reads and writes memory from scripts and shells, with every MCP tool available as a command.
  • Gives agents a shell interface to memory, with machine-readable --json output and stable exit codes.

Install

Requires Python 3.10 or newer.

pipx install hypermemory-cli

Check it with hm version.

Sign in

hm login

Opens your browser to sign in to HyperMemory. Over SSH or without a display, hm login switches to a paste-back flow automatically; force it with --no-browser.

Credentials are stored in your operating system’s keyring (service hypermemory-cli). Without a keyring — or with HYPERMEMORY_NO_KEYRING=1 — they go in ~/.config/hypermemory/config.json with 0600 permissions.

hm logout clears OAuth tokens and keeps any stored API key; hm config --clear-key removes the key.

Set up your agents

hm setup installs the HyperMemory protocol into the agents on your machine: the skill, the hooks that make the agent recall and save every turn, and the memory-writer.

hm setup all                    # every supported agent it finds
hm setup claude hermes kimi     # only these
hm setup codex --scope project  # this project only, not your whole user
hm setup all --dry-run          # show what would change
AgentWhat hm setup installs
claude (Claude Code)Hooks in ~/.claude/settings.json, the hypermemory-cli skill, the hypermemory-memory-writer agent and a marked block in ~/.claude/CLAUDE.md.
codex (Codex)The skill, hooks and memory-writer for Codex.
hermes (Hermes Agent)A HyperMemory memory provider in $HERMES_HOME/plugins/hypermemory/, the skill, and memory.provider set to hypermemory.
kimi (Kimi Code)The skill, hooks and memory-writer for Kimi Code.
openclaw (OpenClaw)A native hypermemory-cli plugin that recalls before each prompt and saves after each run.

Options: --scope user|project (default user), --dry-run, --no-hooks (install the skill without hooks).

hm doctor              # check every installed agent and your connection
hm uninstall kimi      # remove HyperMemory from one agent
hm uninstall all       # remove it everywhere

For Claude Code and Codex, the plugins are the recommended install: they update through the marketplace and connect over MCP. hm setup is the alternative when you prefer the CLI or can’t use a marketplace.

Organizations

If you belong to several organizations, bind each project to one so recall includes the right organization’s memory:

hm org list            # your organizations
hm org use org_8c1f…   # bind this project (git work tree, else directory)
hm org use none        # personal memory only for this project
hm org show            # the current binding
hm org clear           # remove the binding

Bindings are stored in ~/.config/hypermemory/projects.json and shared with the plugins. Override one call with hm recall "query" --org ID|none.

hm org, hm recall --org and hm skill install need hypermemory-cli 2.3.0 or newer.

Memory commands

Every MCP tool has a command.

CommandToolExample
hm recall QUERYhm_recallhm recall "release plan" -n 5
hm store KEY DESChm_storehm store fact_launch "Launch is 2 Nov" -t fact -r '[{"to_key":"project_web","relationship":"launch date of the web project"}]'
hm update KEYhm_updatehm update fact_launch --desc "Launch moved to 9 Nov"
hm forget KEYhm_forgethm forget fact_old or hm forget --edge-id ID
hm nodes KEY...hm_get_nodeshm nodes fact_launch project_web --relationship-detail full
hm find KEYhm_find_relatedhm find project_web --depth 2 -q "decisions"
hm relatehm_add_relationshipshm relate --from person_alice --to project_web --rel "Alice leads the web project"
hm relationships KEY—List a node’s relationships.
hm ingest TEXThm_ingesthm ingest "$(cat notes.md)" -c "Platform sync"
hm orphanshm_list_orphanshm orphans -l 100
hm overviewhm_get_overview
hm timelinehm_timelinehm timeline -p 7d -q "deploy"
hm timeline-write SUMMARYhm_timeline_writehm timeline-write "Shipped 2.4"
hm upload FILEhm_upload_filehm upload report.pdf -d "Q3 board report"
hm fileshm_list_fileshm files -t document -s report
hm tabular outline|range|search|tracehm_tabularhm tabular range FILE_ID -s Sheet1 -r A1:D20
hm hm_tokens JSONhm_tokenshm hm_tokens @turn.json
hm skill list|get|check|installhm_skillhm skill get -v general -o SKILL.md
hm export—hm export -o backup.json (waits for the export to finish)

Any option that takes JSON also accepts @path/to/file.json.

Output for scripts and agents

Add --json anywhere on the command line. Standard output is then the server’s JSON on one line, and errors go to standard error as JSON with error, detail, exit_code, status, retryable and request_id.

hm --json overview | jq '.type_counts'
hm --json recall "decisions about auth" | jq -r '.results[].key'
hm export -o "backup-$(date +%F).json"

Exit codes

CodeMeaning
0Success
1General error
2Usage error
3Not signed in or credentials rejected (401)
4Forbidden or plan limit reached (402, 403)
5Not found (404, 410)
6Request rejected (400, 409, 413, 415, 422)
7Rate limited (429) — retry later
8Server error (5xx)
9Network error
10Export incomplete

Configuration

SettingDefaultHow to change
API URLhttps://api.hypermemory.ioHYPERMEMORY_API_URL or hm config --set-url URL
API key—HYPERMEMORY_API_KEY, hm login --api-key, or hm config --set-key KEY
KeyringonHYPERMEMORY_NO_KEYRING=1

Credentials are resolved in this order: environment variable, stored API key, stored OAuth token.

FileContents
~/.config/hypermemory/config.jsonSettings, and credentials when no keyring is available
~/.config/hypermemory/projects.jsonProject → organization bindings
~/.config/hypermemory/setup-manifest.jsonWhat hm setup installed, so hm uninstall can remove exactly that

hm health checks that the API is reachable; hm ready also checks its dependencies (exit code 8 when not ready).