52160345bf
Complete implementation of note management CLI with all core features: Commands: - add: Create new notes in $EDITOR with auto-generated filenames - list: Display all notes with titles, paths, and tags - search: Full-text search via ripgrep, tag-based filtering - tags: List all tags with occurrence counts - edit: Fuzzy search and edit notes by title - rm: Move notes to trash with confirmation prompt Features: - Automatic depository structure initialization (.jade/trash/) - Configurable tag prefix (default '+') - Parse title from first # heading (filename fallback) - Extract tags anywhere in content - Parse both [[wiki-links]] and [markdown](links) - Trash system with timestamps to prevent conflicts Technical: - Global config at ~/.config/jade/config.yml - Per-depository settings support - Ripgrep integration for fast search - $EDITOR integration for note editing - Comprehensive README with usage examples
3.0 KiB
3.0 KiB
Jade CLI
A simple CLI tool for managing markdown notes in a depository (vault). Inspired by Obsidian but focused on simplicity and command-line usage.
Features
- Note Management: Create, edit, list, and delete markdown notes
- Tag Support: Extract and search notes by tags (default
+tagsyntax, configurable) - Full-Text Search: Search note content using ripgrep
- Link Support: Parse both
[[wiki-style]]and[markdown](links) - Trash System: Deleted notes moved to
.jade/trash/instead of permanent deletion - Flexible Configuration: Per-depository settings for tag prefix and other options
Installation
go build -o jade
Usage
Initialize and List Notes
# List all notes in the default depository (~/jade-depository)
jade list
# Use a specific depository
jade --depo /path/to/notes list
Create a Note
# Create a new note with a title
jade add "My New Note"
# This creates 'my-new-note.md' and opens it in $EDITOR
Search Notes
# Search by content
jade search "kubernetes"
# Search by tag
jade search --tag docker
jade search --tag +work # prefix is optional
Edit a Note
# Find and edit a note by title (fuzzy search)
jade edit "My Note"
# If multiple matches, you'll be prompted to select
Delete a Note
# Delete a note (moves to trash with confirmation)
jade rm "My Note"
# Skip confirmation
jade rm --force "My Note"
List All Tags
# Show all tags with their occurrence counts
jade tags
Configuration
Configuration is stored in ~/.config/jade/config.yml (by default).
Example config:
depo_path: /home/user/jade-depository
config_path: /home/user/.config/jade
tag_prefix: "+"
You can override these with flags:
--depo: Depository path--config: Config directory path
Depository Structure
jade-depository/
├── .jade/
│ └── trash/ # Deleted notes go here
├── note-1.md
├── note-2.md
└── subfolder/
└── note-3.md
The .jade/ directory is automatically created and should be added to .gitignore.
Note Format
Notes are standard markdown files. The first # heading is used as the title (filename is fallback).
Example note:
# My Note Title
This is a note about +kubernetes and +docker.
I can reference [[another-note.md]] or use [regular links](other-note.md).
Tags can appear anywhere in +content.
Requirements
- Go 1.25+ (for building)
- ripgrep (
rg) for search functionality $EDITORenvironment variable set (falls back tovi)
Roadmap
v1.0 (Current)
- Basic note operations (add, edit, delete, list)
- Tag extraction and listing
- Content and tag search
- Trash system
v1.1 (Future)
- SQLite indexing for faster search
- Graph visualization
- Backlinks
- Watch mode (auto-index on changes)
v2.0 (Future)
- Mobile access (native app or PWA)
- Web interface with authentication
- OCR support
License
MIT