Skip to main content

MemoryBot CLI — your personal knowledge graph from the command line

Project description

MemoryBot CLI

Your personal knowledge graph from the command line.

Install

pipx install memorybot

(or pip install memorybot inside a venv).

Quick start

mb login              # opens browser, OAuth flow
mb memo search "..."  # full-text + semantic search
mb memo get <SID>     # fetch a memo by sid
mb run <SID>          # execute a Python script memo

--json on the read commands emits machine-readable output for piping into jq.

Running script memos

mb run <sid> fetches the memo, extracts the first ```python fenced block, and runs the code via uv run --python $(which python3) <tmpfile> with MEMORYBOT_TOKEN and MEMORYBOT_URL set in the env. Stdout and stderr stream live; the script's exit code propagates.

mb run eaQ5a4Hgxl              # run with whatever token the CLI is using
mb run eaQ5a4Hgxl --no-log     # skip writing the run-audit memo

Inside the script, from memorybot.client import Client picks up the env vars set by the runner. Requires uv on PATH.

The CLI does not mint its own per-run token. The script subprocess inherits the same identity (MEMORYBOT_TOKEN) the CLI is using. To get a narrower scope, shorter TTL, or script_sid-bound audit attribution, mint a cli token via the mint_cli_token MCP tool (Claude Desktop / claude.ai) first and set its output as MEMORYBOT_TOKEN before invoking mb run.

Audit trail

After the script exits, mb run posts a memo titled Run of <script-title> — rc=<N> with rc, duration, started_at, and a captured stdout excerpt, plus an instance_of ref pointing to the script. Pass --no-log to skip the memo. If your token was minted with script_sid=<sid>, every API call the script makes is also attributed in server logs.

Configuration

  • MEMORYBOT_URL — server URL (default https://www.memorybot.com).
  • --base-url — per-command override.

Credentials are stored at ~/.config/memorybot/config.json (mode 0600).

Auth

mb login runs the OAuth 2.0 authorization-code flow with PKCE: it registers a client via Dynamic Client Registration (RFC 7591), opens your browser to the authorize endpoint, and captures the callback on a one-shot loopback server. Tokens auto-refresh on 401.

mb logout clears stored credentials.

License

MIT

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

memorybot-0.6.0.tar.gz (11.7 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

memorybot-0.6.0-py3-none-any.whl (13.9 kB view details)

Uploaded Python 3

File details

Details for the file memorybot-0.6.0.tar.gz.

File metadata

  • Download URL: memorybot-0.6.0.tar.gz
  • Upload date:
  • Size: 11.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for memorybot-0.6.0.tar.gz
Algorithm Hash digest
SHA256 84680172e69d2343bc7b7f0e78d1330a0152167f3156b780a22ac1ba42159c12
MD5 4b429602d83c14a2d1fc87e4df468899
BLAKE2b-256 0fa51a4125f0adc7d7fa4f2a3ad7ee3baebabf1e4a494903ff7851188bd7c177

See more details on using hashes here.

Provenance

The following attestation bundles were made for memorybot-0.6.0.tar.gz:

Publisher: publish.yml on nolanlove/memorybot-cli

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file memorybot-0.6.0-py3-none-any.whl.

File metadata

  • Download URL: memorybot-0.6.0-py3-none-any.whl
  • Upload date:
  • Size: 13.9 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for memorybot-0.6.0-py3-none-any.whl
Algorithm Hash digest
SHA256 ce47d21736c22409efa09ad40a7d4a81791267a9449f614bb5f7b0505584fbe3
MD5 cd3c073e5b332b6e95cbf513cb3ac2de
BLAKE2b-256 f7d77e23c162f5ab387fb72800f9a5d7eaf9779898508ab906e2880ba736acfb

See more details on using hashes here.

Provenance

The following attestation bundles were made for memorybot-0.6.0-py3-none-any.whl:

Publisher: publish.yml on nolanlove/memorybot-cli

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page