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
mb media upload <PATH> [--tag <SID>] # upload a file (image, PDF, etc.)
--json on the read commands emits machine-readable output for piping into jq.
Uploading files
mb media upload ~/photo.jpg # auto-tagged under System > Uploads
mb media upload ~/scan.pdf --tag <leaf-tag-sid> # attach to a specific tag
mb media upload ~/big.mp4 --json # machine-readable response
mb media upload runs a three-step dance: it asks the server for a presigned
S3 URL, PUTs the bytes directly to S3 (the MemoryBot server never sees the
file body), and finalizes by creating a Media memo. Re-uploading a file
you've already uploaded short-circuits at the first step (no PUT, no wasted
bandwidth) — the client SHA-256s the file once and the server matches it
against existing memos.
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 (defaulthttps://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
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file memorybot-0.9.0.tar.gz.
File metadata
- Download URL: memorybot-0.9.0.tar.gz
- Upload date:
- Size: 18.1 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
ab368a44a1493e26c3a55f9d0cdbd3bbab72c968bb53e8cda2f93545e833d6e2
|
|
| MD5 |
c99d75aa562ad7cd4f12d9ea48ff7414
|
|
| BLAKE2b-256 |
a2f1acbd1f8d0e3142685216990972e551d173df0763ec9649d7e10d7901d343
|
Provenance
The following attestation bundles were made for memorybot-0.9.0.tar.gz:
Publisher:
publish.yml on nolanlove/memorybot-cli
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
memorybot-0.9.0.tar.gz -
Subject digest:
ab368a44a1493e26c3a55f9d0cdbd3bbab72c968bb53e8cda2f93545e833d6e2 - Sigstore transparency entry: 1469571729
- Sigstore integration time:
-
Permalink:
nolanlove/memorybot-cli@4550bcb007f8569ded5a76ffd02cce26d128dd3a -
Branch / Tag:
refs/tags/v0.9.0 - Owner: https://github.com/nolanlove
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@4550bcb007f8569ded5a76ffd02cce26d128dd3a -
Trigger Event:
release
-
Statement type:
File details
Details for the file memorybot-0.9.0-py3-none-any.whl.
File metadata
- Download URL: memorybot-0.9.0-py3-none-any.whl
- Upload date:
- Size: 21.2 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
678e7b9ab4ccaf5bd14a36735e2fa7b4deffad8cc885d49d8e2b39669a145634
|
|
| MD5 |
a9fbe1a0e3d0edb47625368567b260c2
|
|
| BLAKE2b-256 |
72c223cd17abd8f72ca5b5914ce6adc2e0af2bab2bb8aea4c37de07d1ed5455a
|
Provenance
The following attestation bundles were made for memorybot-0.9.0-py3-none-any.whl:
Publisher:
publish.yml on nolanlove/memorybot-cli
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
memorybot-0.9.0-py3-none-any.whl -
Subject digest:
678e7b9ab4ccaf5bd14a36735e2fa7b4deffad8cc885d49d8e2b39669a145634 - Sigstore transparency entry: 1469571812
- Sigstore integration time:
-
Permalink:
nolanlove/memorybot-cli@4550bcb007f8569ded5a76ffd02cce26d128dd3a -
Branch / Tag:
refs/tags/v0.9.0 - Owner: https://github.com/nolanlove
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@4550bcb007f8569ded5a76ffd02cce26d128dd3a -
Trigger Event:
release
-
Statement type: