Skip to content

sorrycc/segundo

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

segundo

npm version npm downloads License: MIT clawhub

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.

Install

npm install -g segundo

Quick Start

# 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

Commands

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

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 food

Filtering

segundo list --tag book
segundo list --from 2026-03-01 --to 2026-03-10
segundo search "data" --limit 5 --from 2026-01-01

Multi-line & Stdin

# 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 --batch

Batch Operations

segundo 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 draft

Profiles

segundo --profile work add "quarterly review notes"
segundo --profile personal add "book recommendation"
segundo --brain /custom/path list

Semantic Search

Configure 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.

JSON Output

All commands support --json for structured output:

segundo list --json
segundo add "thought" --json

Storage

Memories live in ~/.segundo/memories/ as daily markdown files:

~/.segundo/
  config.json
  memories/
    2026-03-10.md
  embeddings/
    index.bin
    meta.json

License

MIT

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Packages

 
 
 

Contributors