memento is a fast, local Rust CLI for indexing project files and personal workspace memory, then retrieving relevant context with semantic search.
It is inspired by OpenViking, with a narrower CLI-first workflow focused on local files, local memory, and a single-user developer setup.
- Index local text files into a workspace-managed vector store
- Store user and agent notes under stable
mem://URIs - Search indexed content with local embedding models
- Inspect, list, read, reindex, and remove tracked items
- Run entirely on your machine with a local loopback server
memento init [--model <model>] [--port <port>]
memento serve
memento doctor
memento models
memento add [--force] <path>...
memento rm <path|uri>
memento remember <uri> (<text> | --file <source>)
memento forget <uri>
memento reindex [path]...
memento ls [uri]
memento cat <uri>
memento show <uri>
memento find <query>
curl -LsSf https://raw.githubusercontent.com/dagnele/memento/main/install.sh | bash& ([scriptblock]::Create((irm "https://raw.githubusercontent.com/dagnele/memento/main/install.ps1")))Or download a release from GitHub Releases.
Build the CLI:
cargo buildInitialize a workspace in the current directory:
cargo run -- initStart the local server in another terminal:
cargo run -- serveIndex some project files:
cargo run -- add README.md srcSearch for relevant context:
cargo run -- find "workspace config loading"Store a user memory item:
cargo run -- remember mem://user/preferences/writing-style.md "Prefer concise technical explanations"Inspect what is stored:
cargo run -- ls
cargo run -- show mem://user/preferences/writing-style.md
cargo run -- cat mem://user/preferences/writing-style.mdRunning memento init creates a local .memento/ workspace:
.memento/
config.toml
index.db
user/
agent/
config.tomlstores workspace settings such as embedding model and server portindex.dbstores indexed items, metadata, and vectorsuser/stores Memento-owned user memory filesagent/stores Memento-owned agent memory files
Tracked resources use mem://resources/... URIs. Stored notes use mem://user/... and mem://agent/....
memento uses local embedding models via fastembed.
- Default model:
bge-base-en-v1.5 - Supported models:
bge-small-en-v1.5- fast lightweight indexing on local machinesbge-base-en-v1.5- balanced default for English notes and docsbge-large-en-v1.5- highest-quality English retrievaljina-embeddings-v2-base-code- code-heavy repositories and source searchnomic-embed-text-v1.5- longer English notes and general semantic searchbge-m3- multilingual content across mixed repositories
- List models with
cargo run -- models - Pick one during setup with
cargo run -- init --model <model>
Downloaded model files are cached locally. By default, the cache lives under ~/.memento/models, or you can override it with MEMENTO_MODEL_CACHE_DIR.
Check workspace health:
cargo run -- doctorReindex changed files:
cargo run -- reindex src/main.rsRemove a tracked resource without deleting the source file:
cargo run -- rm src/main.rsDelete a stored memory item and its backing file:
cargo run -- forget mem://agent/skills/refactor-cliUseful commands while working on the project:
cargo fmt --check
cargo build
cargo test
cargo clippy --all-targets --all-features -- -D warningsThe project is currently an MVP-oriented local CLI. It is intentionally small in scope: local-first, single-binary, and focused on fast setup and simple command-driven workflows.