A zero-friction CLI for capturing and retrieving thoughts. Memories are stored as daily markdown journals with optional semantic search. Built with TypeScript, runs on Bun.
npm install -g segundo# Create your brain
segundo init
# Capture thoughts
segundo add "read Designing Data-Intensive Applications" --tag book
segundo add "John recommended restaurant on 5th" --tag food
# Search
segundo search "restaurant"
# List recent memories
segundo list --limit 5| Command | Description |
|---|---|
init |
Create a new brain |
add <text> |
Capture a memory |
search <query> |
Search memories (semantic or text) |
list |
List memories, newest first |
edit <id> [text] |
Edit a memory (--tag/--untag) |
delete <id> |
Delete one or more memories |
import <path> |
Import .md/.txt files as memories |
export |
Export memories to stdout |
stats |
Show brain statistics |
Tags go on the last line of an entry. Add via --tag flag or inline:
segundo add "great chapter on consistency\n#book #engineering"
segundo add "lunch spot" --tag foodsegundo list --tag book
segundo list --from 2026-03-01 --to 2026-03-10
segundo search "data" --limit 5 --from 2026-01-01# Escaped newlines
segundo add "line one\nline two"
# Pipe from stdin
echo "thought from pipe" | segundo add
# Batch from stdin (split on blank lines)
cat notes.txt | segundo add --batchsegundo add "thought one" "thought two" "thought three"
segundo delete id1 id2 id3
segundo edit id1 "new content" id2 "other content"
segundo edit id1 --tag work --tag urgent
segundo edit id1 --untag draftsegundo --profile work add "quarterly review notes"
segundo --profile personal add "book recommendation"
segundo --brain /custom/path listConfigure an embedding provider in ~/.segundo/config.json:
{
"embeddings": {
"provider": "ollama",
"model": "nomic-embed-text",
"ollamaUrl": "http://localhost:11434"
}
}Supports Ollama (local, free) and OpenAI (cloud, requires API key). Falls back to text search when unavailable.
Rebuild the index anytime with segundo init --reindex.
All commands support --json for structured output:
segundo list --json
segundo add "thought" --jsonMemories live in ~/.segundo/memories/ as daily markdown files:
~/.segundo/
config.json
memories/
2026-03-10.md
embeddings/
index.bin
meta.json