# 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 `+tag` syntax, 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 ```bash go build -o jade ``` ## Usage ### Initialize and List Notes ```bash # List all notes in the default depository (~/jade-depository) jade list # Use a specific depository jade --depo /path/to/notes list ``` ### Create a Note ```bash # 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 ```bash # Search by content jade search "kubernetes" # Search by tag jade search --tag docker jade search --tag +work # prefix is optional ``` ### Edit a Note ```bash # 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 ```bash # Delete a note (moves to trash with confirmation) jade rm "My Note" # Skip confirmation jade rm --force "My Note" ``` ### List All Tags ```bash # Show all tags with their occurrence counts jade tags ``` ## Configuration Configuration is stored in `~/.config/jade/config.yml` (by default). Example config: ```yaml 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: ```markdown # 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 - `$EDITOR` environment variable set (falls back to `vi`) ## Roadmap ### v1.0 (Current) - [x] Basic note operations (add, edit, delete, list) - [x] Tag extraction and listing - [x] Content and tag search - [x] 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