A powerful command-line tool for managing your personal knowledge base with SQLite full-text search, Git integration, and a beautiful terminal interface.
- π Unified CLI: Single
emdxcommand with intuitive subcommands - π Full-Text Search: SQLite FTS5-powered search with ranking and fuzzy matching
- π Multiple Input Methods: Save files, create notes, pipe output, or paste from clipboard
- π¨ Rich Terminal UI: Beautiful tables, markdown rendering, and syntax highlighting
- π§ Git Integration: Automatically detects project names from Git repositories
- π₯οΈ Interactive Browser: FZF-based document browser for quick navigation
- πΎ SQLite Backend: Zero-setup, portable, fast local storage
- Python 3.8+
- fzf (for interactive mode)
- mdcat (optional, for better markdown viewing with pagination)
git clone https://github.com/yourusername/emdx.git
cd emdx
pip install -e .emdx uses SQLite and stores your knowledge base at ~/.config/emdx/knowledge.db. It's created automatically on first use.
# Save a markdown file
emdx save README.md
# Save with custom title
emdx save notes.md "Project Notes"
# Save with specific project
emdx save doc.md "API Docs" "my-project"# Basic search
emdx find "python async"
# Search with snippets
emdx find "database" --snippets
# Search within a project
emdx find "todo" --project "my-app"
# Fuzzy search (typo-tolerant)
emdx find "datbase" --fuzzy# View by ID
emdx view 42
# View by title
emdx view "Project Notes"
# View raw markdown (no formatting)
emdx view 42 --raw# List all documents
emdx list
# List from specific project
emdx list --project "my-app"
# Export as JSON
emdx list --format json
# Export as CSV
emdx list --format csv# Save a quick note
emdx note "Remember to review PR #123"
# Save clipboard contents
emdx clip "Useful code snippet"
# Pipe command output
ls -la | emdx pipe "Directory structure"
# Execute and save command output
emdx cmd "git log --oneline -10" --title "Recent commits"
# Direct text input
emdx direct "Meeting notes" "Discussed project timeline..."# Launch interactive FZF browser
emdx guiIn the browser:
j/korβ/β- Navigate/- Toggle searchEnter- View documentCtrl-R- Refresh listq- Quit
emdx save <file> [title] [project]- Save a markdown fileemdx find <query> [--project] [--limit] [--snippets] [--fuzzy]- Search documentsemdx view <id|title> [--raw]- View a documentemdx list [--project] [--limit] [--format]- List documentsemdx edit <id|title>- Edit a documentemdx delete <id|title> [--force]- Delete a document
emdx note <text>- Save a quick noteemdx clip [title]- Save clipboard contentsemdx pipe <title>- Save piped inputemdx cmd <command>- Execute and save command outputemdx direct <title> <content>- Save text directly
emdx recent [count]- Show recently accessed documentsemdx stats [--project]- Show statisticsemdx gui- Launch interactive browser
By default, emdx stores your knowledge base at ~/.config/emdx/knowledge.db. This location is created automatically.
emdx automatically detects the Git repository name when saving files. This helps organize documents by project without manual tagging.
emdx uses SQLite with FTS5 (Full-Text Search 5) for powerful search capabilities:
- Instant search across all your documents
- Ranked results based on relevance
- Stemming support (search "running" finds "run", "runs")
- Phrase search with quotation marks
- Portable database - just one file you can backup or sync
Contributions are welcome! Please feel free to submit a Pull Request.
MIT License - see LICENSE file for details