cli + tui to publish to leaflet (wip) & manage tasks, notes & watch/read lists ๐Ÿƒ
charm leaflet readability golang

docs(wip): new user facing docs

+2746 -4067
-168
website/TODO.md
··· 2 2 3 3 This document tracks documentation coverage for the Noteleaf website. The goal is to provide comprehensive documentation for both the productivity system features and the leaflet.pub publishing capabilities. 4 4 5 - ## Core Concepts 6 - 7 - - [ ] Introduction to Noteleaf 8 - - [ ] What is Noteleaf? 9 - - [ ] Why terminal-based productivity? 10 - - [ ] Unified data model philosophy 11 - - [ ] Installation and Setup 12 - - [ ] System requirements 13 - - [ ] Building from source 14 - - [ ] Configuration overview 15 - - [ ] Database initialization 16 - - [ ] Seeding sample data 17 - - [ ] Architecture Overview 18 - - [ ] Application structure 19 - - [ ] Storage and database 20 - - [ ] TUI framework (Bubble Tea) 21 - - [ ] Color palette and design system 22 - 23 - ## Task Management 24 - 25 - - [ ] Task Basics 26 - - [ ] Creating tasks 27 - - [ ] Task properties (priority, project, tags, due dates) 28 - - [ ] Task statuses and lifecycle 29 - - [ ] Task dependencies 30 - - [ ] Task Operations 31 - - [ ] Listing and filtering tasks 32 - - [ ] Updating tasks 33 - - [ ] Completing and deleting tasks 34 - - [ ] Recurring tasks 35 - - [ ] Time Tracking 36 - - [ ] Starting and stopping time tracking 37 - - [ ] Viewing timesheets 38 - - [ ] Time reports and analytics 39 - - [ ] Task Organization 40 - - [ ] Projects 41 - - [ ] Contexts 42 - - [ ] Tags 43 - - [ ] Custom attributes 44 - - [ ] Advanced Task Features 45 - - [ ] Task queries and filters 46 - - [ ] Custom views 47 - - [ ] Batch operations 48 - - [ ] Task templates 49 - 50 - ## Note Taking 51 - 52 - - [ ] Note Basics 53 - - [ ] Creating notes 54 - - [ ] Note metadata (title, tags, dates) 55 - - [ ] Markdown support 56 - - [ ] Note Operations 57 - - [ ] Creating from command line vs editor 58 - - [ ] Creating from files 59 - - [ ] Editing notes 60 - - [ ] Reading and viewing notes 61 - - [ ] Searching notes 62 - - [ ] Note Organization 63 - - [ ] Tagging system 64 - - [ ] Linking notes to tasks 65 - - [ ] Note templates 66 - - [ ] Advanced Note Features 67 - - [ ] Full-text search 68 - - [ ] Note exports 69 - - [ ] Backlinks and references 70 - 71 - ## Media Tracking 72 - 73 - - [ ] Books 74 - - [ ] Adding books (manual and Open Library integration) 75 - - [ ] Reading progress tracking 76 - - [ ] Reading status (to-read, reading, finished) 77 - - [ ] Book metadata and search 78 - - [ ] Reading lists 79 - - [ ] Movies 80 - - [ ] Adding movies 81 - - [ ] Watch status 82 - - [ ] Movie metadata 83 - - [ ] Watchlists 84 - - [ ] TV Shows 85 - - [ ] Adding TV shows 86 - - [ ] Watch status 87 - - [ ] Episode tracking 88 - - [ ] Show metadata 89 - - [ ] Media Organization 90 - - [ ] Tags and categories 91 - - [ ] Custom lists 92 - - [ ] Ratings and reviews 93 - - [ ] Linking media to notes 94 - 95 - ## Articles 96 - 97 - - [ ] Article Management 98 - - [ ] Saving articles from URLs 99 - - [ ] Article parsing and extraction 100 - - [ ] Reading articles in terminal 101 - - [ ] Article metadata (author, date, source) 102 - - [ ] Article Organization 103 - - [ ] Filtering by author 104 - - [ ] Tagging articles 105 - - [ ] Read/unread status 106 - - [ ] Article archives 107 - 108 - ## Leaflet.pub Publishing 109 - 110 - - [ ] Introduction to Leaflet 111 - - [ ] What is leaflet.pub? 112 - - [ ] ATProto and decentralized publishing 113 - - [ ] How Noteleaf integrates with Leaflet 114 - - [ ] Publications 115 - - [ ] Creating publications 116 - - [ ] Publication metadata 117 - - [ ] Managing publications 118 - - [ ] Documents 119 - - [ ] Document structure 120 - - [ ] Creating documents 121 - - [ ] Document drafts 122 - - [ ] Publishing workflow 123 - - [ ] Rich Text and Blocks 124 - - [ ] Text blocks 125 - - [ ] Headers 126 - - [ ] Code blocks 127 - - [ ] Images and media 128 - - [ ] Blockquotes 129 - - [ ] Lists 130 - - [ ] Horizontal rules 131 - - [ ] Rich Text Formatting 132 - - [ ] Bold, italic, code 133 - - [ ] Links 134 - - [ ] Strikethrough, underline, highlight 135 - - [ ] Facets and styling 136 - - [ ] Publishing Workflow 137 - - [ ] Converting notes to leaflet documents 138 - - [ ] Draft management 139 - - [ ] Publishing to leaflet.pub 140 - - [ ] Updating published documents 141 - - [ ] Authentication and identity 142 - 143 - ## Configuration 144 - 145 - - [ ] Configuration File 146 - - [ ] Config file location and structure 147 - - [ ] Configuration options reference 148 - - [ ] Editor integration 149 - - [ ] Default values 150 - - [ ] Environment Variables 151 - - [ ] Supported environment variables 152 - - [ ] Overriding defaults 153 - - [ ] Customization 154 - - [ ] Custom themes (if supported) 155 - - [ ] Keyboard shortcuts 156 - - [ ] Output formats 157 - 158 5 ## TUI (Terminal UI) 159 6 160 7 - [ ] Interactive Mode ··· 227 74 - [ ] Service layer 228 75 - [ ] Data models 229 76 - [ ] UI component system 230 - 231 - ## Troubleshooting 232 - 233 - - [ ] Common Issues 234 - - [ ] Database errors 235 - - [ ] Configuration problems 236 - - [ ] Integration failures 237 - - [ ] Debugging 238 - - [ ] Verbose output 239 - - [ ] Log files 240 - - [ ] Development mode 241 - - [ ] FAQ 242 - - [ ] General questions 243 - - [ ] Platform-specific issues 244 - - [ ] Performance optimization 245 77 246 78 ## Examples and Tutorials 247 79
+101 -8
website/docs/Configuration.md
··· 1 + --- 2 + id: configuration 3 + title: Configuration 4 + sidebar_label: Configuration 5 + sidebar_position: 6 6 + description: Reference for configuration locations, defaults, and options. 7 + --- 8 + 1 9 # Configuration 2 10 3 11 Noteleaf stores its configuration in a TOML file. The configuration file location depends on your operating system and can be overridden with environment variables. ··· 31 39 ```sh 32 40 export NOTELEAF_CONFIG=/path/to/custom/config.toml 33 41 ``` 42 + 43 + ### File Structure 44 + 45 + Configuration is stored as [TOML](https://toml.io). Each key maps 1:1 with the fields shown by `noteleaf config show`. A minimal file looks like: 46 + 47 + ```toml 48 + date_format = "2006-01-02" 49 + color_scheme = "default" 50 + ``` 51 + 52 + There is no required orderingโ€”the parser loads the file, applies defaults for missing keys, and writes a normalized version whenever you run `noteleaf config set ...`. This means you can edit the file manually or stick entirely to CLI helpers. 34 53 35 54 ## Configuration Options 36 55 ··· 318 337 **Type:** String (ISO8601) 319 338 **Default:** None 320 339 340 + ## Editor Integration 341 + 342 + The `editor` key wires Noteleaf into your preferred text editor. Resolution order: 343 + 344 + 1. `editor` inside `.noteleaf.conf.toml` 345 + 2. `$EDITOR` environment variable 346 + 3. System default (usually `vi` on Unix) 347 + 348 + Where it is used: 349 + 350 + - `noteleaf note edit <id>` always opens the configured editor. 351 + - `noteleaf note create -e` or `--editor` lets you capture inline text and immediately refine it in the editor. 352 + - Interactive creation (`noteleaf note create -i`) respects the same setting when you choose to open the note. 353 + 354 + Example configuration: 355 + 356 + ```toml 357 + editor = "nvim" 358 + ``` 359 + 360 + If you frequently switch editors, leave the config empty and export `$EDITOR` before launching Noteleaf: 361 + 362 + ```sh 363 + EDITOR="zed" noteleaf note edit 5 364 + ``` 365 + 321 366 ## Managing Configuration 322 367 323 368 ### View Current Configuration ··· 389 434 390 435 ## Environment Variables 391 436 392 - Noteleaf respects the following environment variables: 437 + Environment overrides are resolved before configuration values. Set them when you need temporary behavior (CI jobs, alternate workspaces, etc.). 393 438 394 - - `NOTELEAF_CONFIG` - Custom path to configuration file 395 - - `NOTELEAF_DATA_DIR` - Custom path to data directory 396 - - `EDITOR` - Default text editor (fallback if `editor` config not set) 439 + | Variable | Purpose | Notes | 440 + |----------|---------|-------| 441 + | `NOTELEAF_CONFIG` | Absolute path to the TOML file | Overrides platform defaults. Parent directories are created automatically. | 442 + | `NOTELEAF_DATA_DIR` | Root directory for the SQLite DB, notes, articles, and attachments | Useful for portable installs (USB drive, synced folder). | 443 + | `EDITOR` | Fallback editor when the `editor` config key is empty | Checked by all note-related commands. | 397 444 398 - Example: 445 + Usage example: 399 446 400 447 ```sh 401 - export NOTELEAF_CONFIG=~/.config/noteleaf/config.toml 402 - export NOTELEAF_DATA_DIR=~/Documents/noteleaf-data 403 - export EDITOR=nvim 448 + export NOTELEAF_CONFIG=~/.config/noteleaf/work.conf.toml 449 + export NOTELEAF_DATA_DIR=~/Sync/workspace-data 450 + export EDITOR=helix 404 451 ``` 452 + 453 + Because `NOTELEAF_DATA_DIR` cascades to the article and note directories, a single export is all you need to relocate the entire knowledge base. 454 + 455 + ## Customization 456 + 457 + ### Themes and Colors 458 + 459 + The `color_scheme` option controls how Fang (the underlying Cobra replacement) styles command help and certain UI components. Right now the only valid value is `"default"`, which maps to Noteleafโ€™s Iceberg-inspired palette. Future releases will add explicit `light`/`dark` options; until then customization requires overriding your terminal theme or building Noteleaf from source with changes in `internal/ui/palette.go`. 460 + 461 + ```toml 462 + color_scheme = "default" # leave blank to adopt upcoming auto-mode 463 + ``` 464 + 465 + ### Keyboard Shortcuts 466 + 467 + All interactive views share the same key map: 468 + 469 + | Keys | Action | 470 + |------|--------| 471 + | `โ†‘ / k`, `โ†“ / j` | Move selection | 472 + | `enter` | Open the selected row | 473 + | `v` | View details in a side panel (where supported) | 474 + | `/` | Search/filter (live) | 475 + | `r` | Reload data | 476 + | `?` | Show full help, including custom actions for the current view | 477 + | `q`, `ctrl+c` | Quit the view | 478 + | `esc`, `backspace` | Exit search/help/detail panels | 479 + | `1-9` | Jump directly to the corresponding row index | 480 + 481 + Press `?` inside any list/table to confirm the bindingsโ€”this uses Bubble Teaโ€™s built-in help component so it always reflects the current screen. 482 + 483 + ### Output Formats 484 + 485 + - `export_format` sets the default for future export commands (currently `json`). 486 + - Task commands support JSON today: `noteleaf todo view 12 --json` or `noteleaf todo list --static --json`. 487 + - The `--format` flag on `noteleaf todo view` switches between `detailed` and `brief` layouts, which is handy when scripting. 488 + 489 + Examples: 490 + 491 + ```sh 492 + noteleaf todo view 12 --format brief --json | jq '.status' 493 + noteleaf todo list --static --json > tasks.json 494 + noteleaf config set export_format "csv" # prepare for upcoming exporters 495 + ``` 496 + 497 + Even when there is no dedicated exporter yet, the SQLite database lives in the open, so you can always run your own `SELECT ...` queries or use `sqlite-utils` to produce CSV/JSON.
+8
website/docs/Quickstart.md
··· 1 + --- 2 + id: quickstart 3 + title: Quickstart Guide 4 + sidebar_label: Quickstart 5 + sidebar_position: 1 6 + description: Install Noteleaf and learn the essentials in minutes. 7 + --- 8 + 1 9 # Quickstart Guide 2 10 3 11 This guide will walk you through installing Noteleaf and getting productive with tasks, notes, and media tracking in under 15 minutes.
+9
website/docs/articles/_category_.json
··· 1 + { 2 + "label": "Articles", 3 + "position": 6, 4 + "link": { 5 + "type": "generated-index", 6 + "title": "Article Archive", 7 + "description": "Save, read, and organize web articles locally." 8 + } 9 + }
+75
website/docs/articles/management.md
··· 1 + --- 2 + title: Article Management 3 + sidebar_label: Management 4 + description: Save URLs, inspect metadata, and read articles without leaving the CLI. 5 + sidebar_position: 2 6 + --- 7 + 8 + # Article Management 9 + 10 + ## Save Articles from URLs 11 + 12 + ```sh 13 + noteleaf article add https://example.com/long-form-piece 14 + ``` 15 + 16 + What happens: 17 + 18 + 1. The CLI checks the database to ensure the URL was not imported already. 19 + 2. It fetches the page with a reader-friendly User-Agent (`curl/8.4.0`) and English `Accept-Language` headers to avoid blocked responses. 20 + 3. Parsed content is written to Markdown and HTML files under `articles_dir`. 21 + 4. A database record is inserted with all metadata and file paths. 22 + 23 + If parsing fails (unsupported domain, network issue, etc.) nothing is written to disk, so partial entries never appear in your archive. 24 + 25 + ## Parsing and Extraction 26 + 27 + The parser uses a two-layer strategy: 28 + 29 + 1. **Domain-specific rules** check the XPath selectors defined in `internal/articles/rules`. These rules strip unwanted elements (cookie banners, nav bars), capture the main body, and record author/date fields accurately. 30 + 2. **Heuristic fallback** scores every DOM node, penalizes high link-density sections, and picks the most โ€œarticle-likeโ€ block. It also pulls metadata from JSON-LD `Article` objects when available. 31 + 32 + During saving, the Markdown file gets a generated header: 33 + 34 + ```markdown 35 + # Article Title 36 + 37 + **Author:** Jane Smith 38 + 39 + **Date:** 2024-01-02 40 + 41 + **Source:** https://example.com/long-form-piece 42 + 43 + **Saved:** 2024-02-05 10:45:12 44 + ``` 45 + 46 + Everything after the `---` separator is the cleaned article content. 47 + 48 + ## Reading in the Terminal 49 + 50 + There are two ways to inspect what you saved: 51 + 52 + - `noteleaf article view <id>` shows metadata, verifies whether the files still exist, and prints the first ~20 lines as a preview. 53 + - `noteleaf article read <id>` renders the full Markdown using [Charmโ€™s Glamour](https://github.com/charmbracelet/glamour), giving you syntax highlighting, proper headings, and wrapped paragraphs directly in the terminal. 54 + 55 + If you prefer your editor, open the Markdown path printed by `view`. Both Markdown and HTML copies belong to you, so feel free to annotate or reformat them. 56 + 57 + ## Article Metadata Reference 58 + 59 + Use `noteleaf article list` to see titles and authors: 60 + 61 + ```sh 62 + noteleaf article list # newest first 63 + noteleaf article list "sqlite" # full-text filter on titles 64 + noteleaf article list --author "Kim" # author filter 65 + noteleaf article list -l 5 # top 5 results 66 + ``` 67 + 68 + Each entry includes the created timestamp. The `view` command provides the raw paths so you can script around them, for example: 69 + 70 + ```sh 71 + md=$(noteleaf article view 12 | rg 'Markdown:' | awk '{print $3}') 72 + $EDITOR "$md" 73 + ``` 74 + 75 + All metadata lives in the SQLite `articles` table, making it easy to run your own reports with `sqlite3` if needed.
+71
website/docs/articles/organization.md
··· 1 + --- 2 + title: Article Organization 3 + sidebar_label: Organization 4 + description: Filter your archive, add lightweight tags, and keep backups tidy. 5 + sidebar_position: 3 6 + --- 7 + 8 + # Article Organization 9 + 10 + ## Filter by Author or Title 11 + 12 + `noteleaf article list` accepts both a free-form query (matches the title) and dedicated flags: 13 + 14 + ```sh 15 + # Anything with "SQLite" in the title 16 + noteleaf article list SQLite 17 + 18 + # Limit to a single author 19 + noteleaf article list --author "Ada Palmer" 20 + 21 + # Cap the output for quick reviews 22 + noteleaf article list --author "Ada Palmer" --limit 3 23 + ``` 24 + 25 + Because the database stores created timestamps, results come back with the newest article first, making it easy to run weekly reviews. 26 + 27 + ## Tagging Articles 28 + 29 + There is no first-class tagging UI yet, but Markdown files are yours to edit. Common patterns: 30 + 31 + ```markdown 32 + --- 33 + tags: [distributed-systems, reference] 34 + project: moonshot 35 + --- 36 + ``` 37 + 38 + Drop that block right after the generated metadata and tools like `rg` or `ripgrep --json` can surface tagged snippets instantly. You can also maintain a separate note that lists article IDs per topic if you prefer not to edit the captured files. 39 + 40 + ## Read vs Unread 41 + 42 + Opening an article in the terminal does not flip a status flag. Use one of these lightweight conventions instead: 43 + 44 + - Prefix the Markdown filename with `read-` once you are done. 45 + - Keep a running checklist note (e.g., โ€œArticles Inboxโ€) that references IDs and mark them off as you read them. 46 + - Create a task linked to the article ID (`todo add "Summarize article #14"`), then close the task when you finish. 47 + 48 + All three approaches work today and will map cleanly to future built-in read/unread tracking. 49 + 50 + ## Archiving and Backups 51 + 52 + The archive lives under `articles_dir`. By default that is `<data_dir>/articles`, where `<data_dir>` depends on your OS: 53 + 54 + | Platform | Default | 55 + |----------|---------| 56 + | Linux | `~/.local/share/noteleaf/articles` | 57 + | macOS | `~/Library/Application Support/noteleaf/articles` | 58 + | Windows | `%LOCALAPPDATA%\noteleaf\articles` | 59 + 60 + You can override the location via the `articles_dir` setting in `~/.config/noteleaf/.noteleaf.conf.toml` (or by pointing `NOTELEAF_DATA_DIR` to a different root before launching the CLI). 61 + 62 + Because every import produces Markdown + HTML, the directory is perfect for version control: 63 + 64 + ```sh 65 + cd ~/.local/share/noteleaf/articles 66 + git init 67 + git add . 68 + git commit -m "Initial snapshot of article archive" 69 + ``` 70 + 71 + Pair that with your cloud backup tool of choice and you have a durable, fully-offline knowledge base that still integrates seamlessly with Noteleafโ€™s search commands.
+54
website/docs/articles/overview.md
··· 1 + --- 2 + title: Article Overview 3 + sidebar_label: Overview 4 + description: How the article parser saves content for offline reading. 5 + sidebar_position: 1 6 + --- 7 + 8 + # Article Overview 9 + 10 + The `noteleaf article` command turns any supported URL into two files on disk: 11 + 12 + - A clean Markdown document (great for terminal reading). 13 + - A rendered HTML copy (handy for rich export or sharing). 14 + 15 + Both files live inside your configured `articles_dir` (defaults to `<data_dir>/articles`). The SQLite database stores the metadata and file paths so you can query, list, and delete articles without worrying about directories. 16 + 17 + ## How Parsing Works 18 + 19 + 1. **Domain rules first**: Each supported site has a small XPath rule file (`internal/articles/rules/*.txt`). 20 + 2. **Heuristic fallback**: When no rule exists, the parser falls back to the readability-style heuristic extractor that scores DOM nodes, removes nav bars, and preserves headings/links. 21 + 3. **Metadata extraction**: The parser also looks for OpenGraph/JSON-LD tags to capture author names and publish dates. 22 + 23 + You can see the currently loaded rule set by running: 24 + 25 + ```sh 26 + noteleaf article --help 27 + ``` 28 + 29 + The help output prints the supported domains and the storage directory that is currently in use. 30 + 31 + ## Saved Metadata 32 + 33 + Every article record contains: 34 + 35 + - URL and canonical title 36 + - Author (if present in metadata) 37 + - Publication date (stored as plain text, e.g., `2024-01-02`) 38 + - Markdown file path 39 + - HTML file path 40 + - Created/modified timestamps 41 + 42 + These fields make it easy to build reading logs, cite sources in notes, or reference articles from tasks. 43 + 44 + ## Commands at a Glance 45 + 46 + | Command | Purpose | 47 + |----------------------------------|---------| 48 + | `noteleaf article add <url>` | Parse, save, and index a URL | 49 + | `noteleaf article list [query]` | Show saved items; filter with `--author` or `--limit` | 50 + | `noteleaf article view <id>` | Inspect metadata + a short preview | 51 + | `noteleaf article read <id>` | Render the Markdown nicely in your terminal | 52 + | `noteleaf article remove <id>` | Delete the DB entry and the files | 53 + 54 + The CLI automatically prevents duplicate imports by checking the URL before parsing.
+9
website/docs/concepts/_category_.json
··· 1 + { 2 + "label": "Concepts", 3 + "position": 2, 4 + "link": { 5 + "type": "generated-index", 6 + "title": "Concepts", 7 + "description": "Core ideas, architecture, and design principles behind Noteleaf." 8 + } 9 + }
+44
website/docs/concepts/architecture.md
··· 1 + --- 2 + title: Architecture Overview 3 + sidebar_label: Architecture 4 + description: Application structure, storage, and UI layers. 5 + sidebar_position: 3 6 + --- 7 + 8 + # Architecture Overview 9 + 10 + ## Architecture Overview 11 + 12 + ### Application Structure 13 + 14 + Noteleaf follows a clean architecture pattern with clear separation of concerns: 15 + 16 + ``` 17 + cmd/ - CLI commands and user interface 18 + internal/ 19 + handlers/ - Business logic and orchestration 20 + repo/ - Database access layer 21 + ui/ - Terminal UI components (Bubble Tea) 22 + models/ - Domain models 23 + public/ - Leaflet.pub integration 24 + ``` 25 + 26 + Each layer has defined responsibilities with minimal coupling between them. 27 + 28 + ### Storage and Database 29 + 30 + **SQLite Database**: All structured data (tasks, metadata, relationships) lives in a single SQLite file at `~/.local/share/noteleaf/noteleaf.db` (Linux) or `~/Library/Application Support/noteleaf/noteleaf.db` (macOS). 31 + 32 + **Markdown Files**: Note content is stored as individual markdown files on disk. The database tracks metadata while keeping your notes in a portable, human-readable format. 33 + 34 + **Database Schema**: Tables for tasks, notes, articles, books, movies, TV shows, publications, and linking tables for tags and relationships. Migrations handle schema evolution. 35 + 36 + ### TUI Framework (Bubble Tea) 37 + 38 + The interactive interface is built with [Bubble Tea](https://github.com/charmbracelet/bubbletea), a Go framework for terminal user interfaces based on The Elm Architecture: 39 + 40 + - **Model**: Application state (current view, selected item, filters) 41 + - **Update**: State transitions based on user input 42 + - **View**: Render the current state to the terminal 43 + 44 + This architecture makes the UI predictable, testable, and composable. Each screen is an independent component that can be developed and tested in isolation.
+19
website/docs/concepts/data-model.md
··· 1 + --- 2 + title: Unified Data Model 3 + sidebar_label: Data Model 4 + description: How tasks, notes, and media connect inside Noteleaf. 5 + sidebar_position: 2 6 + --- 7 + 8 + # Unified Data Model 9 + 10 + ## Philosophy 11 + 12 + Noteleaf treats all personal information as interconnected. Tasks, notes, articles, books, movies, and TV shows exist in a single database where relationships between items are first-class citizens: 13 + 14 + - Link notes to tasks to document your work 15 + - Tag books and articles with the same taxonomy as your tasks 16 + - Track reading lists alongside project work 17 + - Connect media items to research notes 18 + 19 + This unified approach mirrors how knowledge work actually happensโ€”projects involve research, reading generates ideas, and ideas spawn tasks.
+33
website/docs/concepts/design-system.md
··· 1 + --- 2 + title: Design System 3 + sidebar_label: Design System 4 + description: Color palette guidance that keeps the terminal UI cohesive. 5 + sidebar_position: 4 6 + --- 7 + 8 + # Design System 9 + 10 + ## Color Palette and Design System 11 + 12 + Noteleaf uses a carefully chosen color palette defined in `internal/ui/palette.go`: 13 + 14 + **Brand Colors**: 15 + 16 + - **Malibu** (`#00A4FF`): Primary blue for accents and highlights 17 + - **Julep** (`#00FFB2`): Success green for completed items 18 + - **Sriracha** (`#EB4268`): Warning red for urgent/error states 19 + - **Tang** (`#FF985A`): Orange for warnings and attention 20 + - **Lichen** (`#5CDFEA`): Teal for informational elements 21 + 22 + **Neutral Palette** (Dark to Light): 23 + 24 + - **Pepper** (`#201F26`): Dark background 25 + - **BBQ** (`#2d2c35`): Secondary background 26 + - **Charcoal** (`#3A3943`): Tertiary background 27 + - **Iron** (`#4D4C57`): Borders and subtle elements 28 + - **Oyster** (`#605F6B`): Muted text 29 + - **Smoke** (`#BFBCC8`): Secondary text 30 + - **Salt** (`#F1EFEF`): Primary text in dark mode 31 + - **Butter** (`#FFFAF1`): Light background 32 + 33 + This palette ensures consistency across all UI components and provides excellent contrast for readability in terminal environments.
+111
website/docs/concepts/getting-started.md
··· 1 + --- 2 + title: Getting Started 3 + sidebar_label: Getting Started 4 + description: Installation steps, configuration overview, and ways to find help. 5 + sidebar_position: 5 6 + --- 7 + 8 + # Getting Started 9 + 10 + ## Installation and Setup 11 + 12 + ### System Requirements 13 + 14 + - Go 1.24 or higher 15 + - SQLite 3.35 or higher (usually bundled) 16 + - Terminal with 256-color support 17 + - Unix-like OS (Linux, macOS, WSL) 18 + 19 + ### Building from Source 20 + 21 + Clone the repository and build: 22 + 23 + ```sh 24 + git clone https://github.com/stormlightlabs/noteleaf 25 + cd noteleaf 26 + go build -o ./tmp/noteleaf ./cmd 27 + ``` 28 + 29 + Install to your GOPATH: 30 + 31 + ```sh 32 + go install 33 + ``` 34 + 35 + ### Database Initialization 36 + 37 + Run setup to create the database and configuration file: 38 + 39 + ```sh 40 + noteleaf setup 41 + ``` 42 + 43 + This creates: 44 + 45 + - Database at platform-specific application data directory 46 + - Configuration file at platform-specific config directory 47 + - Default settings for editor, priorities, and display options 48 + 49 + ### Seeding Sample Data 50 + 51 + For exploration and testing, populate the database with example data: 52 + 53 + ```sh 54 + noteleaf setup seed 55 + ``` 56 + 57 + This creates sample tasks, notes, books, and other items to help you understand the system's capabilities. 58 + 59 + ## Configuration Overview 60 + 61 + Configuration lives in `config.toml` at the platform-specific config directory. 62 + 63 + **Editor Settings**: 64 + 65 + ```toml 66 + [editor] 67 + command = "nvim" 68 + args = [] 69 + ``` 70 + 71 + **Task Defaults**: 72 + 73 + ```toml 74 + [task] 75 + default_priority = "medium" 76 + default_status = "pending" 77 + ``` 78 + 79 + **Display Options**: 80 + 81 + ```toml 82 + [display] 83 + date_format = "2006-01-02" 84 + time_format = "15:04" 85 + ``` 86 + 87 + View current configuration: 88 + 89 + ```sh 90 + noteleaf config show 91 + ``` 92 + 93 + Update settings: 94 + 95 + ```sh 96 + noteleaf config set editor vim 97 + ``` 98 + 99 + See the [Configuration](../Configuration.md) guide for complete options. 100 + 101 + ## Getting Help 102 + 103 + Every command includes help text: 104 + 105 + ```sh 106 + noteleaf --help 107 + noteleaf task --help 108 + noteleaf task add --help 109 + ``` 110 + 111 + For detailed command reference, run `noteleaf --help` and drill into the subcommand-specific help pages.
+26
website/docs/concepts/overview.md
··· 1 + --- 2 + title: Overview 3 + sidebar_label: Overview 4 + description: Noteleaf philosophy and reasons for a terminal-first approach. 5 + sidebar_position: 1 6 + --- 7 + 8 + # Overview 9 + 10 + ## What is Noteleaf? 11 + 12 + Noteleaf is a terminal-based personal information manager that combines task management, note-taking, media tracking, and decentralized publishing into a unified system. Built for developers and power users who prefer keyboard-driven workflows, Noteleaf brings TaskWarrior-inspired task management together with a personal knowledge base and reading list tracker. 13 + 14 + ## Why the Terminal? 15 + 16 + Terminal applications offer several advantages for focused productivity work: 17 + 18 + **Keyboard-First Interface**: Navigate and manage information without context-switching to a mouse. Every action is a keystroke away, making workflows faster once learned. 19 + 20 + **Scriptability**: Command-line tools integrate seamlessly with shell scripts, automation tools, and other CLI utilities. Noteleaf can be incorporated into your existing terminal-based workflow. 21 + 22 + **Distraction-Free**: Terminal UIs remove visual clutter and web-based distractions, keeping you focused on the task at hand. 23 + 24 + **Performance**: Native applications built with Go start instantly and consume minimal resources compared to Electron-based alternatives. 25 + 26 + **Data Ownership**: Your data lives in a local SQLite database and markdown files. No cloud dependencies, no vendor lock-in, no privacy concerns.
-99
website/docs/development/ARCHITECTURE.md
··· 1 - # System Architecture 2 - 3 - Noteleaf is a CLI/TUI application for task and content management built on Go with SQLite persistence and terminal-based interfaces. 4 - 5 - ## Core Architecture 6 - 7 - ### Application Structure 8 - 9 - The application follows a layered architecture with clear separation between presentation, business logic, and data access layers. 10 - 11 - **Entry Point** - `cmd/main.go` initializes the application with dependency injection, creates handlers, and configures the Cobra command tree using the CommandGroup pattern. 12 - 13 - **CLI Framework** - Built on `spf13/cobra` with `charmbracelet/fang` providing enhanced CLI features including color schemes, versioning, and improved help formatting. 14 - 15 - **TUI Components** - Interactive interfaces use `charmbracelet/bubbletea` for state management and `charmbracelet/lipgloss` for styling with a consistent color palette system in `internal/ui/colors.go`. 16 - 17 - ### Data Layer 18 - 19 - **Database** - SQLite with schema migrations in `internal/store/sql/migrations/`. The `internal/store` package manages database connections and configuration. 20 - 21 - **Repository Pattern** - Data access abstracts through repository interfaces in `internal/repo/` with validation logic ensuring data integrity at the persistence boundary. 22 - 23 - **Models** - Entity definitions in `internal/models/` implement standardized Model interfaces with common fields (ID, Created, Modified). 24 - 25 - ### Business Logic 26 - 27 - **Handlers** - Business logic resides in `internal/handlers/` with one handler per domain (TaskHandler, NoteHandler, ArticleHandler, etc.). 28 - Handlers receive repository dependencies through constructor injection. 29 - 30 - **Services** - Domain-specific operations in `internal/services/` handle complex business workflows and external integrations. 31 - 32 - **Validation** - Schema-based validation at repository level with custom ValidationError types providing detailed field-level error messages. 33 - 34 - ## Domain Features 35 - 36 - ### Content Management 37 - 38 - **Articles** - Web scraping using `gocolly/colly` with domain-specific extraction rules stored in `internal/articles/rules/`. 39 - Articles are parsed to markdown and stored with dual file references (markdown + HTML). 40 - 41 - **Tasks** - Todo/task management inspired by TaskWarrior with filtering, status tracking, and interactive TUI views. 42 - 43 - **Notes** - Simple note management with markdown support and glamour-based terminal rendering. 44 - 45 - **Media Queues** - Separate queues for books, movies, and TV shows with status tracking and metadata management. 46 - 47 - ### User Interface 48 - 49 - **Command Groups** - Commands organized into core functionality (task, note, article, media) and management operations (setup, config, status) using the CommandGroup interface pattern. 50 - 51 - **Interactive Views** - Bubbletea-based TUI components for list navigation, item selection, and data entry with consistent styling through the lipgloss color system. 52 - 53 - **Terminal Output** - Markdown rendering through `charmbracelet/glamour` for rich text display in terminal environments. 54 - 55 - ## Dependencies 56 - 57 - **CLI/TUI** - Cobra command framework, Bubbletea state management, Lipgloss styling, Fang CLI enhancements. 58 - 59 - **Data** - SQLite driver (`mattn/go-sqlite3`), TOML configuration parsing. 60 - 61 - **Content Processing** - Colly web scraping, HTML/XML query libraries, Glamour markdown rendering, text processing utilities. 62 - 63 - **Utilities** - UUID generation, time handling, logging through `charmbracelet/log`. 64 - 65 - ## Design Decisions and Tradeoffs 66 - 67 - ### Technology Choices 68 - 69 - **Go over Rust** - Go was selected for its simplicity, excellent CLI ecosystem (Cobra, Charm libraries), and faster development velocity. 70 - While Rust + Ratatui would provide better memory safety and potentially superior performance, Go's straightforward concurrency model and mature tooling ecosystem made it the pragmatic choice for rapid prototyping and iteration. 71 - 72 - **SQLite over PostgreSQL** - SQLite provides zero-configuration deployment and sufficient performance for single-user CLI applications. 73 - The embedded database eliminates setup complexity while supporting full SQL features needed for filtering and querying. 74 - PostgreSQL would add deployment overhead without meaningful benefits for this use case. 75 - 76 - **Repository Pattern over Active Record** - Repository interfaces enable clean separation between business logic and data access, facilitating testing through dependency injection. 77 - This pattern scales better than Active Record for complex domain logic while maintaining clear boundaries between layers. 78 - 79 - ### Architectural Tradeoffs 80 - 81 - **CommandGroup Interface** - Centralizes command registration while enabling modular command organization. 82 - The pattern requires additional abstraction but provides consistent dependency injection and testing capabilities across all command groups. 83 - 84 - **Handler-based Business Logic** - Business logic in handlers rather than rich domain models keeps the codebase simple and avoids over-engineering. 85 - While this approach may not scale to complex business rules, it provides clear separation of concerns for the current feature set. 86 - 87 - **Dual Storage for Articles** - Articles store both markdown and HTML versions to balance processing speed with format flexibility. 88 - This doubles storage requirements but eliminates runtime conversion overhead and preserves original formatting. 89 - 90 - ### Component Interactions 91 - 92 - **Handler โ†’ Repository โ†’ Database** - Request flow follows a linear path from CLI commands through business logic to data persistence. 93 - This pattern ensures consistent validation and error handling while maintaining clear separation of concerns. 94 - 95 - **TUI State Management** - Bubbletea's unidirectional data flow provides predictable state updates for interactive components. 96 - The model-view-update pattern ensures consistent UI behavior across different terminal environments. 97 - 98 - **Configuration and Migration** - Application startup validates configuration and runs database migrations before initializing handlers. 99 - This fail-fast approach prevents runtime errors and ensures consistent database schema across deployments.
-292
website/docs/development/TESTING.md
··· 1 - # Testing Documentation 2 - 3 - This document outlines the testing patterns and practices used in the `noteleaf` application. 4 - 5 - ## Overview 6 - 7 - The codebase follows Go's standard testing practices with specialized testing utilities for complex scenarios. 8 - Tests use the standard library along with carefully selected dependencies like faker for data generation and BubbleTea for TUI testing. 9 - This approach keeps dependencies minimal while providing robust testing infrastructure for interactive components and complex integrations. 10 - 11 - ### Organization 12 - 13 - Each package contains its own test files alongside the source code. Test files are organized by functionality and mirror the structure of the source code they test. 14 - The codebase includes four main test utility files that provide specialized testing infrastructure: 15 - 16 - - `internal/services/test_utilities.go` - HTTP mocking and media service testing 17 - - `internal/repo/test_utilities.go` - Database testing and data generation 18 - - `internal/ui/test_utilities.go` - TUI testing framework and interactive component testing 19 - - `internal/handlers/test_utilities.go` - Handler testing with database isolation and input simulation 20 - 21 - ## Patterns 22 - 23 - ### Handler Creation 24 - 25 - Tests create real handler instances using temporary databases to ensure test isolation. 26 - Factory functions handle both database setup and handler initialization, returning both the handler and a cleanup function. 27 - 28 - ### Database Isolation 29 - 30 - Tests use temporary directories and environment variable manipulation to create isolated database instances. 31 - Each test gets its own temporary SQLite database that is automatically cleaned up after the test completes. 32 - 33 - The `setupCommandTest` function creates a temporary directory, sets `XDG_CONFIG_HOME` to point to it, and initializes the database schema. 34 - This ensures tests don't interfere with each other or with development data. 35 - 36 - ### Resource Management 37 - 38 - Tests properly manage resources using cleanup functions returned by factory methods. 39 - The cleanup function handles both handler closure and temporary directory removal. 40 - This pattern ensures complete resource cleanup even if tests fail. 41 - 42 - ### Error Handling 43 - 44 - Tests use `t.Fatal` for setup errors that prevent test execution and `t.Error` for test assertion failures. 45 - Fatal errors stop test execution while errors allow tests to continue checking other conditions. 46 - 47 - ### Context Cancellation 48 - 49 - Error case testing frequently uses context cancellation to simulate database and network failures. 50 - The pattern creates a context, immediately cancels it, then calls the function under test to verify error handling. 51 - This provides a reliable way to test error paths without requiring complex mock setups or external failure injection. 52 - 53 - ### Command Structure 54 - 55 - Command group tests verify cobra command structure including use strings, aliases, short descriptions, and subcommand presence. 56 - Tests check that commands are properly configured without executing their logic. 57 - 58 - ### Interface Compliance 59 - 60 - Tests verify interface compliance using compile-time checks with blank identifier assignments. 61 - This ensures structs implement expected interfaces without runtime overhead. 62 - 63 - ## Test Infrastructure 64 - 65 - ### Test Utility Frameworks 66 - 67 - The codebase provides comprehensive testing utilities organized by layer and functionality. 68 - Each test utility file contains specialized helpers, mocks, and test infrastructure for its respective domain. 69 - 70 - #### Database Testing Utilities 71 - 72 - `internal/repo/test_utilities.go` provides comprehensive database testing infrastructure: 73 - 74 - - **In-Memory Database Creation**: `CreateTestDB` creates isolated SQLite databases with full schema 75 - - **Sample Data Factories**: Functions like `CreateSampleTask`, `CreateSampleBook` generate realistic test data 76 - - **Faker Integration**: Uses jaswdr/faker for generating realistic fake data with `CreateFakeArticle` 77 - - **Test Setup Helpers**: `SetupTestData` creates a full set of sample data across all models 78 - - **Custom Assertions**: Generic assertion helpers like `AssertEqual`, `AssertContains`, `AssertNoError` 79 - 80 - #### HTTP Service Testing 81 - 82 - `internal/services/test_utilities.go` provides HTTP mocking and media service testing: 83 - 84 - - **Mock Configuration**: `MockConfig` structure for configuring service behavior 85 - - **Function Replacement**: `SetupMediaMocks` replaces service functions with controllable mocks 86 - - **Sample Data Access**: Helper functions that use embedded HTML samples for realistic testing 87 - - **Specialized Scenarios**: Pre-configured mock setups for success and failure scenarios 88 - - **Assertion Helpers**: Domain-specific assertions for movies, TV shows, and error conditions 89 - 90 - #### TUI Testing Framework 91 - 92 - `internal/ui/test_utilities.go` provides a comprehensive BubbleTea testing framework: 93 - 94 - - **TUITestSuite**: Complete testing infrastructure for interactive TUI components 95 - - **Controlled I/O**: `ControlledOutput` and `ControlledInput` for deterministic testing 96 - - **Message Simulation**: Key press simulation, message queuing, and timing control 97 - - **State Verification**: Model state checking and view content assertions 98 - - **Timeout Handling**: Configurable timeouts for async operations 99 - - **Mock Repository**: Test doubles for repository interfaces 100 - 101 - #### Handler Testing Infrastructure 102 - 103 - `internal/handlers/test_utilities.go` provides end-to-end handler testing: 104 - 105 - - **Environment Isolation**: `HandlerTestHelper` creates isolated test environments 106 - - **Input Simulation**: `InputSimulator` for testing interactive components that use `fmt.Scanf` 107 - - **HTTP Mocking**: Comprehensive HTTP server mocking for external API testing 108 - - **Database Helpers**: Database corruption and error scenario testing 109 - - **Editor Mocking**: `MockEditor` for testing file editing workflows 110 - - **Assertion Helpers**: Handler-specific assertions and verification functions 111 - 112 - ### Advanced Testing Patterns 113 - 114 - #### Input Simulation for Interactive Components 115 - 116 - Interactive handlers that use `fmt.Scanf` require special testing infrastructure with an `io.Reader` implementation. 117 - 118 - The `InputSimulator` provides controlled input sequences that prevent tests from hanging while maintaining coverage of interactive code paths. 119 - 120 - #### TUI Testing with BubbleTea Framework 121 - 122 - The TUI testing framework addresses the fundamental challenge of testing interactive terminal applications in a deterministic, concurrent environment. 123 - BubbleTea's message-passing architecture creates unique testing requirements that standard Go testing patterns cannot adequately address. 124 - 125 - The framework implements a controlled execution environment that replaces BubbleTea's typical program loop with a deterministic testing harness. 126 - Rather than running an actual terminal program, the "testing suite" directly manages model state transitions by simulating the Update/View cycle. 127 - This approach eliminates the non-deterministic behavior inherent in real terminal interactions while preserving the exact message flow patterns that production code experiences. 128 - 129 - State verification relies on function composition patterns where test conditions are expressed as closures that capture specific model states. 130 - The `WaitFor` mechanism uses polling with configurable timeouts, addressing the async nature of BubbleTea model updates without creating race conditions. 131 - This pattern bridges imperative test assertions with BubbleTea's declarative update model. 132 - This is inspired by front-end/TS/JS testing patterns. 133 - 134 - The framework's I/O abstraction layer replaces terminal input/output with controlled buffers that implement standard Go interfaces. 135 - This design maintains interface compatibility while providing complete control over timing and content. 136 - The controlled I/O system captures all output for later verification and injects precise input sequences, enabling complex interaction testing without external dependencies. 137 - 138 - Concurrency management uses channels and context propagation to coordinate between the testing framework and the model under test. 139 - The suite manages goroutine lifecycle and ensures proper cleanup, preventing test interference and resource leaks. 140 - This architecture supports testing of models that perform background operations or handle async events. 141 - 142 - #### HTTP Service Mocking 143 - 144 - Service testing uses HTTP mocking with request capture. A `MockServer` is instantiated, and its URL is used in test scoped services. 145 - 146 - #### Database Schema Testing 147 - 148 - Database tests use comprehensive schema setup with (automatic) cleanup 149 - 150 - #### Environment Manipulation 151 - 152 - Environment testing utilities provide controlled environment manipulation. Environment variables are restored after instantiation. 153 - 154 - ## Test Organization Patterns 155 - 156 - ### Single Root Test 157 - 158 - The preferred test organization pattern uses a single root test function with nested subtests using `t.Run`. 159 - This provides clear hierarchical organization and allows running specific test sections while maintaining shared setup and context. 160 - This pattern offers several advantages: clear test hierarchy with logical grouping, ability to run specific test sections, consistent test structure across the codebase, and shared setup that can be inherited by subtests. 161 - 162 - ### Integration vs Unit Testing 163 - 164 - The codebase emphasizes integration testing over heavy mocking by using real handlers and services to verify actual behavior rather than mocked interactions. 165 - The goal is to catch integration issues while maintaining test reliability. 166 - 167 - ### Static Output 168 - 169 - UI components support static output modes for testing. Tests capture output using bytes.Buffer and verify content using string contains checks rather than exact string matching for better test maintainability. 170 - 171 - ### Standard Output Redirection 172 - 173 - For testing functions that write to stdout, tests use a pipe redirection pattern with goroutines to capture output. 174 - The pattern saves the original stdout, redirects to a pipe, captures output in a separate goroutine, and restores stdout after the test. 175 - This ensures clean output capture without interfering with the testing framework. 176 - 177 - ## Utilities 178 - 179 - ### Test Data Generation 180 - 181 - The codebase uses sophisticated data generation strategies: 182 - 183 - - **Factory Functions**: Each package provides factory functions for creating valid test data 184 - - **Faker Integration**: Uses `jaswdr/faker` for generating realistic fake data with proper randomization 185 - - **Sample Data Creators**: Functions like `CreateSampleTask`, `CreateSampleBook` provide consistent test data 186 - - **Embedded Resources**: Services use embedded HTML samples from real API responses for realistic testing 187 - 188 - ### Assertion Helpers 189 - 190 - Custom assertion functions provide clear error messages and reduce test code duplication: 191 - 192 - - **Generic Assertions**: `AssertEqual`, `AssertNoError`, `AssertContains` for common checks 193 - - **Domain-Specific Assertions**: `AssertMovieInResults`, `AssertNoteExists` for specialized verification 194 - - **TUI Assertions**: `AssertViewContains`, `AssertModelState` for BubbleTea model testing 195 - - **HTTP Assertions**: `AssertRequestMade` for verifying HTTP interactions 196 - 197 - ### Mock Infrastructure 198 - 199 - Each layer provides specialized mocking capabilities: 200 - 201 - - **Service Mocking**: Function replacement with configurable behavior and embedded test data 202 - - **HTTP Mocking**: `HTTPMockServer` with request capture and response customization 203 - - **Input Mocking**: `InputSimulator` for deterministic interactive component testing 204 - - **Editor Mocking**: `MockEditor` for file editing workflow testing 205 - - **Repository Mocking**: `MockTaskRepository` for TUI component testing 206 - 207 - ### Environment and Resource Management 208 - 209 - Testing utilities provide comprehensive resource management: 210 - 211 - - **Environment Isolation**: `EnvironmentTestHelper` for controlled environment variable manipulation 212 - - **Database Isolation**: Temporary SQLite databases with automatic cleanup 213 - - **File System Isolation**: Temporary directories with automatic cleanup 214 - - **Process Isolation**: Handler helpers that create completely isolated test environments 215 - 216 - ## Testing CLI Commands 217 - 218 - Command group tests focus on structure verification rather than execution testing. 219 - Tests check command configuration, subcommand presence, and interface compliance. This approach ensures command trees are properly constructed without requiring complex execution mocking. 220 - 221 - ### CommandGroup Interface Testing 222 - 223 - The CommandGroup interface enables testable CLI architecture. Tests verify that command groups implement the interface correctly and return properly configured cobra commands. 224 - This pattern separates command structure from command execution. 225 - 226 - Interface compliance is tested using compile-time checks within the "Interface Implementations" subtest, ensuring all command structs properly implement the CommandGroup interface without runtime overhead. 227 - 228 - ## Performance Considerations 229 - 230 - Tests avoid expensive operations in setup functions. Handler creation uses real instances but tests focus on structure verification rather than full execution paths. 231 - This keeps test suites fast while maintaining coverage of critical functionality. 232 - 233 - The single root test pattern allows for efficient resource management where setup costs can be amortized across multiple related test cases. 234 - 235 - ## Interactive Component Testing 236 - 237 - The codebase provides comprehensive testing infrastructure for interactive components, including both terminal UI applications and command-line interfaces that require user input. 238 - 239 - ### Input Simulation Framework 240 - 241 - Interactive handlers that use `fmt.Scanf` require specialized testing infrastructure: 242 - 243 - - **InputSimulator**: Provides controlled input sequences that implement `io.Reader` 244 - - **Menu Selection Helpers**: `MenuSelection`, `MenuCancel`, `MenuSequence` for common interaction patterns 245 - - **Handler Integration**: Handlers can accept `io.Reader` for input, enabling deterministic testing 246 - - **Cleanup Management**: Automatic cleanup prevents resource leaks in test environments 247 - 248 - ### TUI Testing with BubbleTea 249 - 250 - The TUI testing framework provides complete testing infrastructure for interactive terminal interfaces: 251 - 252 - - **TUITestSuite**: Comprehensive testing framework for BubbleTea models 253 - - **Message Simulation**: Key press simulation, window resize events, and custom message handling 254 - - **State Verification**: Model state checking with custom condition functions 255 - - **View Assertions**: Content verification and output capture 256 - - **Timing Control**: Configurable timeouts and delay handling for async operations 257 - - **Mock Integration**: Repository mocking for isolated component testing 258 - 259 - ### Interactive Test Scenarios 260 - 261 - Interactive handlers should test comprehensive scenarios: 262 - 263 - - **Valid user selections** - User chooses valid menu options and inputs 264 - - **Cancellation flows** - User chooses to cancel operations (option 0 or escape keys) 265 - - **Invalid choices** - User selects out-of-range options or provides invalid input 266 - - **Navigation patterns** - Keyboard navigation, scrolling, and multi-step interactions 267 - - **Error handling** - Network errors, service failures, and data validation errors 268 - - **Empty states** - Search returns no results, empty lists, and missing data 269 - - **Edge cases** - Boundary conditions, malformed input, and resource constraints 270 - 271 - ### TUI Component Testing Patterns 272 - 273 - BubbleTea components use specialized testing patterns: 274 - 275 - - **Key Sequence Testing**: Simulate complex user interactions with timing 276 - - **State Transition Testing**: Verify model state changes through user actions 277 - - **View Content Testing**: Assert specific content appears in rendered output 278 - - **Async Operation Testing**: Handle loading states and network operations 279 - - **Responsive Design Testing**: Test different terminal sizes and window resize handling 280 - 281 - This comprehensive testing approach ensures interactive components work reliably in automated environments while maintaining full coverage of user interaction paths. 282 - 283 - ## Errors 284 - 285 - Error coverage follows a systematic approach to identify and test failure scenarios: 286 - 287 - 1. **Context Cancellation** - Primary method for testing database and network timeout scenarios 288 - 2. **Invalid Input** - Malformed data, empty inputs, boundary conditions 289 - 3. **Resource Exhaustion** - Database connection failures, memory limits 290 - 4. **Constraint Violations** - Duplicate keys, foreign key failures 291 - 5. **State Validation** - Testing functions with invalid system states 292 - 6. **Interactive Input** - Invalid user choices, cancellation handling, input simulation errors
-340
website/docs/examples/articles.md
··· 1 - # Article Examples 2 - 3 - Examples of saving and managing articles using Noteleaf. 4 - 5 - ## Saving Articles 6 - 7 - ### Save Article from URL 8 - 9 - ```sh 10 - noteleaf article add https://example.com/interesting-article 11 - ``` 12 - 13 - ### Save with Custom Title 14 - 15 - ```sh 16 - noteleaf article add https://example.com/article --title "My Custom Title" 17 - ``` 18 - 19 - ### Save Multiple Articles 20 - 21 - ```sh 22 - noteleaf article add https://example.com/article-1 23 - noteleaf article add https://example.com/article-2 24 - noteleaf article add https://example.com/article-3 25 - ``` 26 - 27 - ## Viewing Articles 28 - 29 - ### List All Articles 30 - 31 - ```sh 32 - noteleaf article list 33 - ``` 34 - 35 - ### Filter by Author 36 - 37 - ```sh 38 - noteleaf article list --author "Jane Smith" 39 - noteleaf article list --author "John Doe" 40 - ``` 41 - 42 - ### Filter with Query 43 - 44 - ```sh 45 - noteleaf article list --query "golang" 46 - noteleaf article list --query "machine learning" 47 - ``` 48 - 49 - ### Limit Results 50 - 51 - ```sh 52 - noteleaf article list --limit 10 53 - noteleaf article list --limit 5 54 - ``` 55 - 56 - ### View Article Content 57 - 58 - Display in terminal: 59 - 60 - ```sh 61 - noteleaf article view 1 62 - ``` 63 - 64 - Read in browser: 65 - 66 - ```sh 67 - noteleaf article read 1 68 - ``` 69 - 70 - ## Managing Articles 71 - 72 - ### Update Article Metadata 73 - 74 - Update title: 75 - 76 - ```sh 77 - noteleaf article update 1 --title "Updated Title" 78 - ``` 79 - 80 - Update author: 81 - 82 - ```sh 83 - noteleaf article update 1 --author "Jane Doe" 84 - ``` 85 - 86 - Add notes: 87 - 88 - ```sh 89 - noteleaf article update 1 --notes "Great insights on API design" 90 - ``` 91 - 92 - ### Remove Article 93 - 94 - ```sh 95 - noteleaf article remove 1 96 - ``` 97 - 98 - Remove multiple: 99 - 100 - ```sh 101 - noteleaf article remove 1 2 3 102 - ``` 103 - 104 - ## Common Workflows 105 - 106 - ### Reading List Management 107 - 108 - Save articles to read later: 109 - 110 - ```sh 111 - noteleaf article add https://blog.example.com/microservices 112 - noteleaf article add https://dev.to/understanding-async 113 - noteleaf article add https://medium.com/best-practices 114 - 115 - # View reading list 116 - noteleaf article list 117 - ``` 118 - 119 - ### Research Collection 120 - 121 - Collect articles for research: 122 - 123 - ```sh 124 - # Save research articles 125 - noteleaf article add https://arxiv.org/paper1 --notes "Research: ML optimization" 126 - noteleaf article add https://arxiv.org/paper2 --notes "Research: Neural networks" 127 - 128 - # Find research articles 129 - noteleaf article list --query "Research" 130 - ``` 131 - 132 - ### Technical Documentation 133 - 134 - Archive technical articles: 135 - 136 - ```sh 137 - noteleaf article add https://docs.example.com/api-guide --notes "Category: Documentation" 138 - noteleaf article add https://tutorials.example.com/setup --notes "Category: Tutorial" 139 - 140 - # Find documentation 141 - noteleaf article list --query "Documentation" 142 - ``` 143 - 144 - ### Author Following 145 - 146 - Track articles by favorite authors: 147 - 148 - ```sh 149 - # Save articles 150 - noteleaf article add https://blog.author1.com/post1 --author "Martin Fowler" 151 - noteleaf article add https://blog.author1.com/post2 --author "Martin Fowler" 152 - 153 - # View articles by author 154 - noteleaf article list --author "Martin Fowler" 155 - ``` 156 - 157 - ### Topic Collections 158 - 159 - Organize by topic using notes: 160 - 161 - ```sh 162 - # Backend articles 163 - noteleaf article add https://example.com/databases --notes "Topic: Backend, Database" 164 - noteleaf article add https://example.com/caching --notes "Topic: Backend, Performance" 165 - 166 - # Frontend articles 167 - noteleaf article add https://example.com/react --notes "Topic: Frontend, React" 168 - noteleaf article add https://example.com/css --notes "Topic: Frontend, CSS" 169 - 170 - # Find by topic 171 - noteleaf article list --query "Backend" 172 - noteleaf article list --query "Frontend" 173 - ``` 174 - 175 - ### Daily Reading Routine 176 - 177 - Save articles during the day: 178 - 179 - ```sh 180 - # Morning 181 - noteleaf article add https://news.ycombinator.com/article1 182 - noteleaf article add https://reddit.com/r/programming/article2 183 - 184 - # Evening - review saved articles 185 - noteleaf article list 186 - noteleaf article view 1 187 - noteleaf article view 2 188 - ``` 189 - 190 - ### Offline Reading 191 - 192 - Save articles for offline access: 193 - 194 - ```sh 195 - # Save articles before travel 196 - noteleaf article add https://longform.com/essay1 197 - noteleaf article add https://magazine.com/feature 198 - 199 - # Read offline (articles are saved locally) 200 - noteleaf article view 1 201 - noteleaf article view 2 202 - ``` 203 - 204 - ### Archive and Cleanup 205 - 206 - Remove read articles: 207 - 208 - ```sh 209 - # List articles 210 - noteleaf article list 211 - 212 - # Remove articles you've read 213 - noteleaf article remove 1 2 3 4 5 214 - 215 - # Keep only recent articles (manual filtering) 216 - noteleaf article list --limit 20 217 - ``` 218 - 219 - ### Share-worthy Content 220 - 221 - Mark articles worth sharing: 222 - 223 - ```sh 224 - noteleaf article add https://excellent.article.com --notes "Share: Twitter, Newsletter" 225 - noteleaf article add https://must-read.com/post --notes "Share: Team, Blog" 226 - 227 - # Find share-worthy articles 228 - noteleaf article list --query "Share" 229 - ``` 230 - 231 - ### Learning Path 232 - 233 - Create structured learning collections: 234 - 235 - ```sh 236 - # Beginner articles 237 - noteleaf article add https://tutorial.com/intro --notes "Level: Beginner, Go" 238 - noteleaf article add https://tutorial.com/basics --notes "Level: Beginner, Go" 239 - 240 - # Advanced articles 241 - noteleaf article add https://advanced.com/patterns --notes "Level: Advanced, Go" 242 - 243 - # Find by level 244 - noteleaf article list --query "Beginner" 245 - noteleaf article list --query "Advanced" 246 - ``` 247 - 248 - ### Weekly Digests 249 - 250 - Collect interesting articles weekly: 251 - 252 - ```sh 253 - # Week 1 254 - noteleaf article add https://example.com/week1-1 --notes "Week: 2024-W01" 255 - noteleaf article add https://example.com/week1-2 --notes "Week: 2024-W01" 256 - 257 - # Week 2 258 - noteleaf article add https://example.com/week2-1 --notes "Week: 2024-W02" 259 - 260 - # Review week's articles 261 - noteleaf article list --query "2024-W01" 262 - ``` 263 - 264 - ## Exporting Articles 265 - 266 - ### Export Article to File 267 - 268 - ```sh 269 - noteleaf article export 1 --format markdown > article.md 270 - noteleaf article export 1 --format html > article.html 271 - ``` 272 - 273 - ### Export Multiple Articles 274 - 275 - ```sh 276 - noteleaf article export --all --format markdown --output articles/ 277 - ``` 278 - 279 - ### Export by Query 280 - 281 - ```sh 282 - noteleaf article export --query "golang" --format markdown --output go-articles/ 283 - ``` 284 - 285 - ## Integration with Notes 286 - 287 - ### Create Note from Article 288 - 289 - After reading: 290 - 291 - ```sh 292 - # Read article 293 - noteleaf article view 1 294 - 295 - # Create summary note 296 - noteleaf note create "Article Summary: Title" " 297 - Source: [Article URL] 298 - Author: [Author Name] 299 - 300 - Key Points: 301 - - Point 1 302 - - Point 2 303 - 304 - My Thoughts: 305 - - Observation 1 306 - - Observation 2 307 - " --tags article-summary,topic 308 - ``` 309 - 310 - ### Link Article to Task 311 - 312 - Create follow-up task: 313 - 314 - ```sh 315 - # Save article 316 - noteleaf article add https://example.com/implement-feature 317 - 318 - # Create related task 319 - noteleaf task add "Implement feature from article #1" --tags implementation 320 - ``` 321 - 322 - ## Article Statistics 323 - 324 - ### Count Articles 325 - 326 - ```sh 327 - noteleaf article list | wc -l 328 - ``` 329 - 330 - ### Articles by Author 331 - 332 - ```sh 333 - noteleaf article list --author "Author Name" | wc -l 334 - ``` 335 - 336 - ### Articles by Topic 337 - 338 - ```sh 339 - noteleaf article list --query "topic" | wc -l 340 - ```
-397
website/docs/examples/media.md
··· 1 - # Media Examples 2 - 3 - Examples of managing your reading lists and watch queues using Noteleaf. 4 - 5 - ## Books 6 - 7 - ### Adding Books 8 - 9 - Search and add from Open Library: 10 - 11 - ```sh 12 - noteleaf media book add "The Name of the Wind" 13 - noteleaf media book add "Project Hail Mary" 14 - noteleaf media book add "Dune" 15 - ``` 16 - 17 - Add by author: 18 - 19 - ```sh 20 - noteleaf media book add "Foundation by Isaac Asimov" 21 - ``` 22 - 23 - Add with specific year: 24 - 25 - ```sh 26 - noteleaf media book add "1984 by George Orwell 1949" 27 - ``` 28 - 29 - ### Viewing Books 30 - 31 - List all books: 32 - 33 - ```sh 34 - noteleaf media book list 35 - ``` 36 - 37 - Filter by status: 38 - 39 - ```sh 40 - noteleaf media book list --status queued 41 - noteleaf media book list --status reading 42 - noteleaf media book list --status finished 43 - ``` 44 - 45 - ### Managing Reading Status 46 - 47 - Start reading: 48 - 49 - ```sh 50 - noteleaf media book reading 1 51 - ``` 52 - 53 - Mark as finished: 54 - 55 - ```sh 56 - noteleaf media book finished 1 57 - ``` 58 - 59 - ### Tracking Progress 60 - 61 - Update reading progress (percentage): 62 - 63 - ```sh 64 - noteleaf media book progress 1 25 65 - noteleaf media book progress 1 50 66 - noteleaf media book progress 1 75 67 - ``` 68 - 69 - Update with page numbers: 70 - 71 - ```sh 72 - noteleaf media book progress 1 150 --total 400 73 - ``` 74 - 75 - ### Book Details 76 - 77 - View book details: 78 - 79 - ```sh 80 - noteleaf media book view 1 81 - ``` 82 - 83 - ### Updating Book Information 84 - 85 - Update book notes: 86 - 87 - ```sh 88 - noteleaf media book update 1 --notes "Excellent worldbuilding and magic system" 89 - ``` 90 - 91 - Add rating: 92 - 93 - ```sh 94 - noteleaf media book update 1 --rating 5 95 - ``` 96 - 97 - ### Removing Books 98 - 99 - Remove from list: 100 - 101 - ```sh 102 - noteleaf media book remove 1 103 - ``` 104 - 105 - ## Movies 106 - 107 - ### Adding Movies 108 - 109 - Add movie: 110 - 111 - ```sh 112 - noteleaf media movie add "The Matrix" 113 - noteleaf media movie add "Inception" 114 - noteleaf media movie add "Interstellar" 115 - ``` 116 - 117 - Add with year: 118 - 119 - ```sh 120 - noteleaf media movie add "Blade Runner 1982" 121 - ``` 122 - 123 - ### Viewing Movies 124 - 125 - List all movies: 126 - 127 - ```sh 128 - noteleaf media movie list 129 - ``` 130 - 131 - Filter by status: 132 - 133 - ```sh 134 - noteleaf media movie list --status queued 135 - noteleaf media movie list --status watched 136 - ``` 137 - 138 - ### Managing Watch Status 139 - 140 - Mark as watched: 141 - 142 - ```sh 143 - noteleaf media movie watched 1 144 - ``` 145 - 146 - ### Movie Details 147 - 148 - View movie details: 149 - 150 - ```sh 151 - noteleaf media movie view 1 152 - ``` 153 - 154 - ### Updating Movie Information 155 - 156 - Add notes and rating: 157 - 158 - ```sh 159 - noteleaf media movie update 1 --notes "Mind-bending sci-fi" --rating 5 160 - ``` 161 - 162 - ### Removing Movies 163 - 164 - Remove from list: 165 - 166 - ```sh 167 - noteleaf media movie remove 1 168 - ``` 169 - 170 - ## TV Shows 171 - 172 - ### Adding TV Shows 173 - 174 - Add TV show: 175 - 176 - ```sh 177 - noteleaf media tv add "Breaking Bad" 178 - noteleaf media tv add "The Wire" 179 - noteleaf media tv add "Better Call Saul" 180 - ``` 181 - 182 - ### Viewing TV Shows 183 - 184 - List all shows: 185 - 186 - ```sh 187 - noteleaf media tv list 188 - ``` 189 - 190 - Filter by status: 191 - 192 - ```sh 193 - noteleaf media tv list --status queued 194 - noteleaf media tv list --status watching 195 - noteleaf media tv list --status watched 196 - ``` 197 - 198 - ### Managing Watch Status 199 - 200 - Start watching: 201 - 202 - ```sh 203 - noteleaf media tv watching 1 204 - ``` 205 - 206 - Mark as finished: 207 - 208 - ```sh 209 - noteleaf media tv watched 1 210 - ``` 211 - 212 - Put on hold: 213 - 214 - ```sh 215 - noteleaf media tv update 1 --status on-hold 216 - ``` 217 - 218 - ### TV Show Details 219 - 220 - View show details: 221 - 222 - ```sh 223 - noteleaf media tv view 1 224 - ``` 225 - 226 - ### Updating TV Show Information 227 - 228 - Update current episode: 229 - 230 - ```sh 231 - noteleaf media tv update 1 --season 2 --episode 5 232 - ``` 233 - 234 - Add notes and rating: 235 - 236 - ```sh 237 - noteleaf media tv update 1 --notes "Intense character development" --rating 5 238 - ``` 239 - 240 - ### Removing TV Shows 241 - 242 - Remove from list: 243 - 244 - ```sh 245 - noteleaf media tv remove 1 246 - ``` 247 - 248 - ## Common Workflows 249 - 250 - ### Weekend Watch List 251 - 252 - Plan your weekend viewing: 253 - 254 - ```sh 255 - # Add movies 256 - noteleaf media movie add "The Shawshank Redemption" 257 - noteleaf media movie add "Pulp Fiction" 258 - noteleaf media movie add "Forrest Gump" 259 - 260 - # View queue 261 - noteleaf media movie list --status queued 262 - ``` 263 - 264 - ### Reading Challenge 265 - 266 - Track annual reading goal: 267 - 268 - ```sh 269 - # Add books to queue 270 - noteleaf media book add "The Lord of the Rings" 271 - noteleaf media book add "The Hobbit" 272 - noteleaf media book add "Mistborn" 273 - 274 - # Check progress 275 - noteleaf media book list --status finished 276 - noteleaf media book list --status reading 277 - ``` 278 - 279 - ### Binge Watching Tracker 280 - 281 - Track TV series progress: 282 - 283 - ```sh 284 - # Start series 285 - noteleaf media tv add "Game of Thrones" 286 - noteleaf media tv watching 1 287 - 288 - # Update progress 289 - noteleaf media tv update 1 --season 1 --episode 1 290 - noteleaf media tv update 1 --season 1 --episode 2 291 - 292 - # View current shows 293 - noteleaf media tv list --status watching 294 - ``` 295 - 296 - ### Media Recommendations 297 - 298 - Keep track of recommendations: 299 - 300 - ```sh 301 - # Add recommended items 302 - noteleaf media book add "Sapiens" --notes "Recommended by John" 303 - noteleaf media movie add "Parasite" --notes "Won Best Picture 2020" 304 - noteleaf media tv add "Succession" --notes "From Reddit recommendations" 305 - 306 - # View recommendations 307 - noteleaf media book list --static | grep "Recommended" 308 - ``` 309 - 310 - ### Review and Rating 311 - 312 - After finishing, add review: 313 - 314 - ```sh 315 - # Book review 316 - noteleaf media book finished 1 317 - noteleaf media book update 1 \ 318 - --rating 5 \ 319 - --notes "Masterful storytelling. The magic system is one of the best in fantasy." 320 - 321 - # Movie review 322 - noteleaf media movie watched 2 323 - noteleaf media movie update 2 \ 324 - --rating 4 \ 325 - --notes "Great cinematography but slow pacing in second act." 326 - 327 - # TV show review 328 - noteleaf media tv watched 3 329 - noteleaf media tv update 3 \ 330 - --rating 5 \ 331 - --notes "Best character development I've seen. Final season was perfect." 332 - ``` 333 - 334 - ### Genre Organization 335 - 336 - Organize by genre using notes: 337 - 338 - ```sh 339 - noteleaf media book add "Snow Crash" --notes "Genre: Cyberpunk" 340 - noteleaf media book add "Neuromancer" --notes "Genre: Cyberpunk" 341 - noteleaf media book add "The Expanse" --notes "Genre: Space Opera" 342 - 343 - # Find by genre 344 - noteleaf media book list --static | grep "Cyberpunk" 345 - ``` 346 - 347 - ### Currently Consuming 348 - 349 - See what you're currently reading/watching: 350 - 351 - ```sh 352 - noteleaf media book list --status reading 353 - noteleaf media tv list --status watching 354 - ``` 355 - 356 - ### Completed This Month 357 - 358 - View completed items: 359 - 360 - ```sh 361 - noteleaf media book list --status finished 362 - noteleaf media movie list --status watched 363 - noteleaf media tv list --status watched 364 - ``` 365 - 366 - ### Clear Finished Items 367 - 368 - Archive or remove completed media: 369 - 370 - ```sh 371 - # Remove watched movies 372 - noteleaf media movie remove 1 2 3 373 - 374 - # Remove finished books 375 - noteleaf media book remove 4 5 6 376 - ``` 377 - 378 - ## Statistics and Reports 379 - 380 - ### Reading Statistics 381 - 382 - Count books by status: 383 - 384 - ```sh 385 - echo "Queued: $(noteleaf media book list --status queued --static | wc -l)" 386 - echo "Reading: $(noteleaf media book list --status reading --static | wc -l)" 387 - echo "Finished: $(noteleaf media book list --status finished --static | wc -l)" 388 - ``` 389 - 390 - ### Viewing Habits 391 - 392 - Track watch queue size: 393 - 394 - ```sh 395 - echo "Movies to watch: $(noteleaf media movie list --status queued --static | wc -l)" 396 - echo "Shows in progress: $(noteleaf media tv list --status watching --static | wc -l)" 397 - ```
-294
website/docs/examples/notes.md
··· 1 - # Note Examples 2 - 3 - Examples of note-taking workflows using Noteleaf. 4 - 5 - ## Creating Notes 6 - 7 - ### Create Note from Command Line 8 - 9 - ```sh 10 - noteleaf note create "Meeting Notes" "Discussed Q4 roadmap and priorities" 11 - ``` 12 - 13 - ### Create Note with Tags 14 - 15 - ```sh 16 - noteleaf note create "API Design Ideas" "REST vs GraphQL considerations" --tags api,design 17 - ``` 18 - 19 - ### Create Note from File 20 - 21 - ```sh 22 - noteleaf note create --file notes.md 23 - ``` 24 - 25 - ### Create Note Interactively 26 - 27 - Opens your editor for composition: 28 - 29 - ```sh 30 - noteleaf note create --interactive 31 - ``` 32 - 33 - Specify editor: 34 - 35 - ```sh 36 - EDITOR=vim noteleaf note create --interactive 37 - ``` 38 - 39 - ### Create Note with Multiple Paragraphs 40 - 41 - ```sh 42 - noteleaf note create "Project Retrospective" " 43 - What went well: 44 - - Good team collaboration 45 - - Met all deadlines 46 - - Quality code reviews 47 - 48 - What to improve: 49 - - Better documentation 50 - - More automated tests 51 - - Earlier stakeholder feedback 52 - " 53 - ``` 54 - 55 - ## Viewing Notes 56 - 57 - ### List All Notes 58 - 59 - Interactive mode: 60 - 61 - ```sh 62 - noteleaf note list 63 - ``` 64 - 65 - Static output: 66 - 67 - ```sh 68 - noteleaf note list --static 69 - ``` 70 - 71 - ### Filter by Tags 72 - 73 - ```sh 74 - noteleaf note list --tags meeting 75 - noteleaf note list --tags api,design 76 - ``` 77 - 78 - ### View Archived Notes 79 - 80 - ```sh 81 - noteleaf note list --archived 82 - ``` 83 - 84 - ### Read a Note 85 - 86 - Display note content: 87 - 88 - ```sh 89 - noteleaf note read 1 90 - ``` 91 - 92 - ### Search Notes 93 - 94 - ```sh 95 - noteleaf note search "API design" 96 - noteleaf note search "meeting notes" 97 - ``` 98 - 99 - ## Editing Notes 100 - 101 - ### Edit Note in Editor 102 - 103 - Opens note in your editor: 104 - 105 - ```sh 106 - noteleaf note edit 1 107 - ``` 108 - 109 - With specific editor: 110 - 111 - ```sh 112 - EDITOR=nvim noteleaf note edit 1 113 - ``` 114 - 115 - ### Update Note Title 116 - 117 - ```sh 118 - noteleaf note update 1 --title "Updated Meeting Notes" 119 - ``` 120 - 121 - ### Add Tags to Note 122 - 123 - ```sh 124 - noteleaf note tag 1 --add important,todo 125 - ``` 126 - 127 - ### Remove Tags from Note 128 - 129 - ```sh 130 - noteleaf note tag 1 --remove draft 131 - ``` 132 - 133 - ## Organizing Notes 134 - 135 - ### Archive a Note 136 - 137 - ```sh 138 - noteleaf note archive 1 139 - ``` 140 - 141 - ### Unarchive a Note 142 - 143 - ```sh 144 - noteleaf note unarchive 1 145 - ``` 146 - 147 - ### Delete a Note 148 - 149 - ```sh 150 - noteleaf note remove 1 151 - ``` 152 - 153 - With confirmation: 154 - 155 - ```sh 156 - noteleaf note remove 1 --confirm 157 - ``` 158 - 159 - ## Common Workflows 160 - 161 - ### Quick Meeting Notes 162 - 163 - ```sh 164 - noteleaf note create "Team Standup $(date +%Y-%m-%d)" --interactive --tags meeting,standup 165 - ``` 166 - 167 - ### Project Documentation 168 - 169 - ```sh 170 - noteleaf note create "Project Architecture" "$(cat architecture.md)" --tags docs,architecture 171 - ``` 172 - 173 - ### Research Notes 174 - 175 - Create research note: 176 - 177 - ```sh 178 - noteleaf note create "GraphQL Research" --interactive --tags research,api 179 - ``` 180 - 181 - List all research notes: 182 - 183 - ```sh 184 - noteleaf note list --tags research 185 - ``` 186 - 187 - ### Code Snippets 188 - 189 - ```sh 190 - noteleaf note create "Useful Git Commands" " 191 - # Rebase last 3 commits 192 - git rebase -i HEAD~3 193 - 194 - # Undo last commit 195 - git reset --soft HEAD~1 196 - 197 - # Show files changed in commit 198 - git show --name-only <commit> 199 - " --tags git,snippets,reference 200 - ``` 201 - 202 - ### Daily Journal 203 - 204 - ```sh 205 - noteleaf note create "Journal $(date +%Y-%m-%d)" --interactive --tags journal 206 - ``` 207 - 208 - ### Ideas and Brainstorming 209 - 210 - ```sh 211 - noteleaf note create "Product Ideas" --interactive --tags ideas,product 212 - ``` 213 - 214 - List all ideas: 215 - 216 - ```sh 217 - noteleaf note list --tags ideas 218 - ``` 219 - 220 - ## Exporting Notes 221 - 222 - ### Export Single Note 223 - 224 - ```sh 225 - noteleaf note export 1 --format markdown > note.md 226 - noteleaf note export 1 --format html > note.html 227 - ``` 228 - 229 - ### Export All Notes 230 - 231 - ```sh 232 - noteleaf note export --all --format markdown --output notes/ 233 - ``` 234 - 235 - ### Export Notes by Tag 236 - 237 - ```sh 238 - noteleaf note export --tags meeting --format markdown --output meetings/ 239 - ``` 240 - 241 - ## Advanced Usage 242 - 243 - ### Template-based Notes 244 - 245 - Create a note template file: 246 - 247 - ```sh 248 - cat > ~/templates/meeting.md << 'EOF' 249 - # Meeting: [TITLE] 250 - Date: [DATE] 251 - Attendees: [NAMES] 252 - 253 - ## Agenda 254 - - 255 - 256 - ## Discussion 257 - - 258 - 259 - ## Action Items 260 - - [ ] 261 - 262 - ## Next Meeting 263 - Date: 264 - EOF 265 - ``` 266 - 267 - Use template: 268 - 269 - ```sh 270 - noteleaf note create --file ~/templates/meeting.md 271 - ``` 272 - 273 - ### Linking Notes 274 - 275 - Reference other notes in content: 276 - 277 - ```sh 278 - noteleaf note create "Implementation Plan" " 279 - Based on the design in Note #5, we will: 280 - 1. Set up database schema (see Note #12) 281 - 2. Implement API endpoints 282 - 3. Add frontend components 283 - 284 - Related: Note #5 (Design), Note #12 (Schema) 285 - " --tags implementation,plan 286 - ``` 287 - 288 - ### Note Statistics 289 - 290 - View note count by tag: 291 - 292 - ```sh 293 - noteleaf note list --static | grep -c "tag:meeting" 294 - ```
-482
website/docs/examples/publication.md
··· 1 - # Publication Examples 2 - 3 - Examples of publishing notes to leaflet.pub using the AT Protocol integration. 4 - 5 - ## Overview 6 - 7 - The publication system allows you to sync your local notes with leaflet.pub, an AT Protocol-based publishing platform. You can pull drafts from leaflet, publish local notes, and maintain a synchronized writing workflow across platforms. 8 - 9 - ## Authentication 10 - 11 - ### Initial Authentication 12 - 13 - Authenticate with your BlueSky account: 14 - 15 - ```sh 16 - noteleaf pub auth username.bsky.social 17 - ``` 18 - 19 - This will prompt for your app password interactively. 20 - 21 - ### Authenticate with Password Flag 22 - 23 - Provide credentials directly: 24 - 25 - ```sh 26 - noteleaf pub auth username.bsky.social --password "your-app-password" 27 - ``` 28 - 29 - ### Creating an App Password 30 - 31 - 1. Visit [bsky.app/settings/app-passwords](https://bsky.app/settings/app-passwords) 32 - 2. Create a new app password named "noteleaf" 33 - 3. Use that password (not your main password) for authentication 34 - 35 - ### Check Authentication Status 36 - 37 - ```sh 38 - noteleaf pub status 39 - ``` 40 - 41 - ## Pulling Documents from Leaflet 42 - 43 - ### Pull All Documents 44 - 45 - Fetch all drafts and published documents: 46 - 47 - ```sh 48 - noteleaf pub pull 49 - ``` 50 - 51 - This will: 52 - - Connect to your leaflet account 53 - - Fetch all documents in your repository 54 - - Create new notes for documents not yet synced 55 - - Update existing notes that have changed 56 - 57 - ### After Pulling 58 - 59 - List the synced notes: 60 - 61 - ```sh 62 - noteleaf pub list 63 - ``` 64 - 65 - View synced notes interactively: 66 - 67 - ```sh 68 - noteleaf pub list --interactive 69 - ``` 70 - 71 - ## Publishing Local Notes 72 - 73 - ### Publish a Note 74 - 75 - Create a new document on leaflet from a local note: 76 - 77 - ```sh 78 - noteleaf pub post 123 79 - ``` 80 - 81 - ### Publish as Draft 82 - 83 - Create as draft instead of publishing immediately: 84 - 85 - ```sh 86 - noteleaf pub post 123 --draft 87 - ``` 88 - 89 - ### Preview Before Publishing 90 - 91 - See what would be posted without actually posting: 92 - 93 - ```sh 94 - noteleaf pub post 123 --preview 95 - ``` 96 - 97 - ### Validate Conversion 98 - 99 - Check if markdown conversion will work: 100 - 101 - ```sh 102 - noteleaf pub post 123 --validate 103 - ``` 104 - 105 - ## Updating Published Documents 106 - 107 - ### Update an Existing Document 108 - 109 - Update a previously published note: 110 - 111 - ```sh 112 - noteleaf pub patch 123 113 - ``` 114 - 115 - ### Preview Update 116 - 117 - See what would be updated: 118 - 119 - ```sh 120 - noteleaf pub patch 123 --preview 121 - ``` 122 - 123 - ### Validate Update 124 - 125 - Check conversion before updating: 126 - 127 - ```sh 128 - noteleaf pub patch 123 --validate 129 - ``` 130 - 131 - ## Batch Operations 132 - 133 - ### Publish Multiple Notes 134 - 135 - Create or update multiple documents at once: 136 - 137 - ```sh 138 - noteleaf pub push 1 2 3 4 5 139 - ``` 140 - 141 - This will: 142 - - Create new documents for notes never published 143 - - Update existing documents for notes already on leaflet 144 - 145 - ### Batch Publish as Drafts 146 - 147 - ```sh 148 - noteleaf pub push 10 11 12 --draft 149 - ``` 150 - 151 - ## Viewing Publications 152 - 153 - ### List All Synced Notes 154 - 155 - ```sh 156 - noteleaf pub list 157 - ``` 158 - 159 - Aliases: 160 - ```sh 161 - noteleaf pub ls 162 - ``` 163 - 164 - ### Filter by Status 165 - 166 - Published documents only: 167 - ```sh 168 - noteleaf pub list --published 169 - ``` 170 - 171 - Drafts only: 172 - ```sh 173 - noteleaf pub list --draft 174 - ``` 175 - 176 - All documents: 177 - ```sh 178 - noteleaf pub list --all 179 - ``` 180 - 181 - ### Interactive Browser 182 - 183 - Browse with TUI interface: 184 - 185 - ```sh 186 - noteleaf pub list --interactive 187 - noteleaf pub list -i 188 - ``` 189 - 190 - With filters: 191 - ```sh 192 - noteleaf pub list --published --interactive 193 - noteleaf pub list --draft -i 194 - ``` 195 - 196 - ## Common Workflows 197 - 198 - ### Initial Setup and Pull 199 - 200 - Set up leaflet integration and pull existing documents: 201 - 202 - ```sh 203 - # Authenticate 204 - noteleaf pub auth username.bsky.social 205 - 206 - # Check status 207 - noteleaf pub status 208 - 209 - # Pull all documents 210 - noteleaf pub pull 211 - 212 - # View synced notes 213 - noteleaf pub list --interactive 214 - ``` 215 - 216 - ### Publishing Workflow 217 - 218 - Write locally, then publish to leaflet: 219 - 220 - ```sh 221 - # Create a note 222 - noteleaf note create "My Blog Post" --interactive 223 - 224 - # List notes to get ID 225 - noteleaf note list 226 - 227 - # Publish as draft first 228 - noteleaf pub post 42 --draft 229 - 230 - # Review draft on leaflet.pub 231 - # Make edits locally 232 - noteleaf note edit 42 233 - 234 - # Update the draft 235 - noteleaf pub patch 42 236 - 237 - # When ready, republish without --draft flag 238 - noteleaf pub post 42 239 - ``` 240 - 241 - ### Sync Workflow 242 - 243 - Keep local notes in sync with leaflet: 244 - 245 - ```sh 246 - # Pull latest changes from leaflet 247 - noteleaf pub pull 248 - 249 - # Make local edits 250 - noteleaf note edit 123 251 - 252 - # Push changes back 253 - noteleaf pub patch 123 254 - 255 - # Check sync status 256 - noteleaf pub list --published 257 - ``` 258 - 259 - ### Draft Management 260 - 261 - Work with drafts before publishing: 262 - 263 - ```sh 264 - # Create drafts 265 - noteleaf pub post 10 --draft 266 - noteleaf pub post 11 --draft 267 - noteleaf pub post 12 --draft 268 - 269 - # View all drafts 270 - noteleaf pub list --draft 271 - 272 - # Edit a draft locally 273 - noteleaf note edit 10 274 - 275 - # Update on leaflet 276 - noteleaf pub patch 10 277 - 278 - # Promote draft to published (re-post without --draft) 279 - noteleaf pub post 10 280 - ``` 281 - 282 - ### Batch Publishing 283 - 284 - Publish multiple notes at once: 285 - 286 - ```sh 287 - # Create several notes 288 - noteleaf note create "Post 1" "Content 1" 289 - noteleaf note create "Post 2" "Content 2" 290 - noteleaf note create "Post 3" "Content 3" 291 - 292 - # Get note IDs 293 - noteleaf note list --static 294 - 295 - # Publish all at once 296 - noteleaf pub push 50 51 52 297 - 298 - # Or as drafts 299 - noteleaf pub push 50 51 52 --draft 300 - ``` 301 - 302 - ### Review Before Publishing 303 - 304 - Always preview and validate before publishing: 305 - 306 - ```sh 307 - # Validate markdown conversion 308 - noteleaf pub post 99 --validate 309 - 310 - # Preview the output 311 - noteleaf pub post 99 --preview 312 - 313 - # If everything looks good, publish 314 - noteleaf pub post 99 315 - ``` 316 - 317 - ### Cross-Platform Editing 318 - 319 - Edit on leaflet.pub, sync to local: 320 - 321 - ```sh 322 - # Pull changes from leaflet 323 - noteleaf pub pull 324 - 325 - # View what changed 326 - noteleaf pub list --interactive 327 - 328 - # Make additional edits locally 329 - noteleaf note edit 123 330 - 331 - # Push updates back 332 - noteleaf pub patch 123 333 - ``` 334 - 335 - ### Status Monitoring 336 - 337 - Check authentication and publication status: 338 - 339 - ```sh 340 - # Check auth status 341 - noteleaf pub status 342 - 343 - # List published documents 344 - noteleaf pub list --published 345 - 346 - # Count publications 347 - noteleaf pub list --published --static | wc -l 348 - ``` 349 - 350 - ## Troubleshooting 351 - 352 - ### Re-authenticate 353 - 354 - If authentication expires: 355 - 356 - ```sh 357 - noteleaf pub auth username.bsky.social 358 - ``` 359 - 360 - ### Check Status 361 - 362 - Verify connection: 363 - 364 - ```sh 365 - noteleaf pub status 366 - ``` 367 - 368 - ### Force Pull 369 - 370 - Re-sync all documents: 371 - 372 - ```sh 373 - noteleaf pub pull 374 - ``` 375 - 376 - ### Validate Before Publishing 377 - 378 - If publishing fails, validate first: 379 - 380 - ```sh 381 - noteleaf pub post 123 --validate 382 - ``` 383 - 384 - Check for markdown formatting issues that might not convert properly. 385 - 386 - ## Integration with Notes 387 - 388 - ### Publishing Flow 389 - 390 - ```sh 391 - # Create note locally 392 - noteleaf note create "Article Title" --interactive 393 - 394 - # Add tags for organization 395 - noteleaf note tag 1 --add published,blog 396 - 397 - # Publish to leaflet 398 - noteleaf pub post 1 399 - 400 - # Continue editing locally 401 - noteleaf note edit 1 402 - 403 - # Sync updates 404 - noteleaf pub patch 1 405 - ``` 406 - 407 - ### Import from Leaflet 408 - 409 - ```sh 410 - # Pull from leaflet 411 - noteleaf pub pull 412 - 413 - # View imported notes 414 - noteleaf pub list 415 - 416 - # Edit locally 417 - noteleaf note edit 123 418 - 419 - # Continue working with standard note commands 420 - noteleaf note read 123 421 - noteleaf note tag 123 --add imported 422 - ``` 423 - 424 - ## Advanced Usage 425 - 426 - ### Selective Publishing 427 - 428 - Publish only specific notes with a tag: 429 - 430 - ```sh 431 - # Tag notes for publication 432 - noteleaf note tag 10 --add ready-to-publish 433 - noteleaf note tag 11 --add ready-to-publish 434 - 435 - # List tagged notes 436 - noteleaf note list --tags ready-to-publish 437 - 438 - # Publish those notes 439 - noteleaf pub push 10 11 440 - ``` 441 - 442 - ### Draft Review Cycle 443 - 444 - ```sh 445 - # Publish drafts 446 - noteleaf pub push 1 2 3 --draft 447 - 448 - # Review on leaflet.pub in browser 449 - # Make edits locally based on feedback 450 - 451 - # Update drafts 452 - noteleaf pub push 1 2 3 453 - 454 - # When ready, publish (create as non-drafts) 455 - noteleaf pub post 1 456 - noteleaf pub post 2 457 - noteleaf pub post 3 458 - ``` 459 - 460 - ### Publication Archive 461 - 462 - Keep track of published work: 463 - 464 - ```sh 465 - # Tag published notes 466 - noteleaf note tag 123 --add published,2024,blog 467 - 468 - # List all published notes 469 - noteleaf note list --tags published 470 - 471 - # Archive old publications 472 - noteleaf note archive 123 473 - ``` 474 - 475 - ## Notes 476 - 477 - - Authentication tokens are stored in the configuration file 478 - - Notes are matched by their leaflet record key (rkey) 479 - - The `push` command intelligently chooses between `post` and `patch` 480 - - Draft status is preserved when patching existing documents 481 - - Use `--preview` and `--validate` flags to test before publishing 482 - - Pull regularly to stay synced with changes made on leaflet.pub
-288
website/docs/examples/tasks.md
··· 1 - # Task Examples 2 - 3 - Examples of common task management workflows using Noteleaf. 4 - 5 - ## Basic Task Management 6 - 7 - ### Create a Simple Task 8 - 9 - ```sh 10 - noteleaf task add "Buy groceries" 11 - ``` 12 - 13 - ### Create Task with Priority 14 - 15 - ```sh 16 - noteleaf task add "Fix critical bug" --priority urgent 17 - noteleaf task add "Update documentation" --priority low 18 - ``` 19 - 20 - ### Create Task with Project 21 - 22 - ```sh 23 - noteleaf task add "Design new homepage" --project website 24 - noteleaf task add "Refactor auth service" --project backend 25 - ``` 26 - 27 - ### Create Task with Due Date 28 - 29 - ```sh 30 - noteleaf task add "Submit report" --due 2024-12-31 31 - noteleaf task add "Review PRs" --due tomorrow 32 - ``` 33 - 34 - ### Create Task with Tags 35 - 36 - ```sh 37 - noteleaf task add "Write blog post" --tags writing,blog 38 - noteleaf task add "Server maintenance" --tags ops,backend,infra 39 - ``` 40 - 41 - ### Create Task with Context 42 - 43 - ```sh 44 - noteleaf task add "Call client" --context phone 45 - noteleaf task add "Deploy to production" --context office 46 - ``` 47 - 48 - ### Create Task with All Attributes 49 - 50 - ```sh 51 - noteleaf task add "Launch marketing campaign" \ 52 - --project marketing \ 53 - --priority high \ 54 - --due 2024-06-15 \ 55 - --tags campaign,social \ 56 - --context office 57 - ``` 58 - 59 - ## Viewing Tasks 60 - 61 - ### List All Tasks 62 - 63 - Interactive mode: 64 - 65 - ```sh 66 - noteleaf task list 67 - ``` 68 - 69 - Static output: 70 - 71 - ```sh 72 - noteleaf task list --static 73 - ``` 74 - 75 - ### Filter by Status 76 - 77 - ```sh 78 - noteleaf task list --status pending 79 - noteleaf task list --status completed 80 - ``` 81 - 82 - ### Filter by Priority 83 - 84 - ```sh 85 - noteleaf task list --priority high 86 - noteleaf task list --priority urgent 87 - ``` 88 - 89 - ### Filter by Project 90 - 91 - ```sh 92 - noteleaf task list --project website 93 - noteleaf task list --project backend 94 - ``` 95 - 96 - ### Filter by Tags 97 - 98 - ```sh 99 - noteleaf task list --tags urgent,bug 100 - ``` 101 - 102 - ### View Task Details 103 - 104 - ```sh 105 - noteleaf task view 1 106 - ``` 107 - 108 - ## Updating Tasks 109 - 110 - ### Mark Task as Done 111 - 112 - ```sh 113 - noteleaf task done 1 114 - ``` 115 - 116 - ### Update Task Priority 117 - 118 - ```sh 119 - noteleaf task update 1 --priority high 120 - ``` 121 - 122 - ### Update Task Project 123 - 124 - ```sh 125 - noteleaf task update 1 --project website 126 - ``` 127 - 128 - ### Add Tags to Task 129 - 130 - ```sh 131 - noteleaf task update 1 --add-tags backend,api 132 - ``` 133 - 134 - ### Remove Tags from Task 135 - 136 - ```sh 137 - noteleaf task update 1 --remove-tags urgent 138 - ``` 139 - 140 - ### Edit Task Interactively 141 - 142 - Opens task in your editor: 143 - 144 - ```sh 145 - noteleaf task edit 1 146 - ``` 147 - 148 - ## Time Tracking 149 - 150 - ### Start Time Tracking 151 - 152 - ```sh 153 - noteleaf task start 1 154 - ``` 155 - 156 - ### Stop Time Tracking 157 - 158 - ```sh 159 - noteleaf task stop 1 160 - ``` 161 - 162 - ### View Timesheet 163 - 164 - All entries: 165 - 166 - ```sh 167 - noteleaf task timesheet 168 - ``` 169 - 170 - Filtered by date: 171 - 172 - ```sh 173 - noteleaf task timesheet --from 2024-01-01 --to 2024-01-31 174 - ``` 175 - 176 - Filtered by project: 177 - 178 - ```sh 179 - noteleaf task timesheet --project website 180 - ``` 181 - 182 - ## Project Management 183 - 184 - ### List All Projects 185 - 186 - ```sh 187 - noteleaf task projects 188 - ``` 189 - 190 - ### View Tasks in Project 191 - 192 - ```sh 193 - noteleaf task list --project website 194 - ``` 195 - 196 - ## Tag Management 197 - 198 - ### List All Tags 199 - 200 - ```sh 201 - noteleaf task tags 202 - ``` 203 - 204 - ### View Tasks with Tag 205 - 206 - ```sh 207 - noteleaf task list --tags urgent 208 - ``` 209 - 210 - ## Context Management 211 - 212 - ### List All Contexts 213 - 214 - ```sh 215 - noteleaf task contexts 216 - ``` 217 - 218 - ### View Tasks in Context 219 - 220 - ```sh 221 - noteleaf task list --context office 222 - ``` 223 - 224 - ## Advanced Workflows 225 - 226 - ### Daily Planning 227 - 228 - View today's tasks: 229 - 230 - ```sh 231 - noteleaf task list --due today 232 - ``` 233 - 234 - View overdue tasks: 235 - 236 - ```sh 237 - noteleaf task list --due overdue 238 - ``` 239 - 240 - ### Weekly Review 241 - 242 - View completed tasks this week: 243 - 244 - ```sh 245 - noteleaf task list --status completed --from monday 246 - ``` 247 - 248 - View pending high-priority tasks: 249 - 250 - ```sh 251 - noteleaf task list --status pending --priority high 252 - ``` 253 - 254 - ### Project Focus 255 - 256 - List all tasks for a project, sorted by priority: 257 - 258 - ```sh 259 - noteleaf task list --project website --sort priority 260 - ``` 261 - 262 - ### Bulk Operations 263 - 264 - Mark multiple tasks as done: 265 - 266 - ```sh 267 - noteleaf task done 1 2 3 4 268 - ``` 269 - 270 - Delete multiple tasks: 271 - 272 - ```sh 273 - noteleaf task delete 5 6 7 274 - ``` 275 - 276 - ## Task Deletion 277 - 278 - ### Delete a Task 279 - 280 - ```sh 281 - noteleaf task delete 1 282 - ``` 283 - 284 - ### Delete with Confirmation 285 - 286 - ```sh 287 - noteleaf task delete 1 --confirm 288 - ```
-47
website/docs/intro.md
··· 1 - --- 2 - sidebar_position: 1 3 - --- 4 - 5 - # Tutorial Intro 6 - 7 - Let's discover **Docusaurus in less than 5 minutes**. 8 - 9 - ## Getting Started 10 - 11 - Get started by **creating a new site**. 12 - 13 - Or **try Docusaurus immediately** with **[docusaurus.new](https://docusaurus.new)**. 14 - 15 - ### What you'll need 16 - 17 - - [Node.js](https://nodejs.org/en/download/) version 20.0 or above: 18 - - When installing Node.js, you are recommended to check all checkboxes related to dependencies. 19 - 20 - ## Generate a new site 21 - 22 - Generate a new Docusaurus site using the **classic template**. 23 - 24 - The classic template will automatically be added to your project after you run the command: 25 - 26 - ```bash 27 - npm init docusaurus@latest my-website classic 28 - ``` 29 - 30 - You can type this command into Command Prompt, Powershell, Terminal, or any other integrated terminal of your code editor. 31 - 32 - The command also installs all necessary dependencies you need to run Docusaurus. 33 - 34 - ## Start your site 35 - 36 - Run the development server: 37 - 38 - ```bash 39 - cd my-website 40 - npm run start 41 - ``` 42 - 43 - The `cd` command changes the directory you're working with. In order to work with your newly created Docusaurus site, you'll need to navigate the terminal there. 44 - 45 - The `npm run start` command builds your website locally and serves it through a development server, ready for you to view at http://localhost:3000/. 46 - 47 - Open `docs/intro.md` (this page) and edit some lines: the site **reloads automatically** and displays your changes.
+9
website/docs/leaflet/_category_.json
··· 1 + { 2 + "label": "Leaflet Publishing", 3 + "position": 5, 4 + "link": { 5 + "type": "generated-index", 6 + "title": "Leaflet Publishing", 7 + "description": "Publish and sync documents with leaflet.pub and the AT Protocol." 8 + } 9 + }
+41
website/docs/leaflet/authentication.md
··· 1 + --- 2 + title: Authentication and Identity 3 + sidebar_label: Auth & Identity 4 + description: AT Protocol authentication, security, and session handling. 5 + sidebar_position: 8 6 + --- 7 + 8 + # Authentication and Identity 9 + 10 + ## AT Protocol Authentication 11 + 12 + Noteleaf uses AT Protocol's authentication system: 13 + 14 + 1. **Handle Resolution**: Your handle (e.g., `username.bsky.social`) is resolved to a DID (Decentralized Identifier) 15 + 2. **Session Creation**: Authenticate with your app password to create a session 16 + 3. **Session Token**: Noteleaf stores the session token for future requests 17 + 4. **Token Refresh**: Sessions are refreshed automatically when they expire 18 + 19 + ## Security Considerations 20 + 21 + **Use app passwords**: Never use your main BlueSky password with third-party tools. App passwords can be revoked without affecting your account. 22 + 23 + **Token storage**: Session tokens are stored locally in the Noteleaf database. Protect your database file. 24 + 25 + **Revocation**: If compromised, revoke the app password at [bsky.app/settings/app-passwords](https://bsky.app/settings/app-passwords). 26 + 27 + ## Session Management 28 + 29 + **Check status**: 30 + 31 + ```sh 32 + noteleaf pub status 33 + ``` 34 + 35 + **Re-authenticate**: 36 + 37 + ```sh 38 + noteleaf pub auth 39 + ``` 40 + 41 + Sessions typically last 2-4 hours before requiring refresh. Noteleaf handles refresh automatically, but if authentication fails, run `pub auth` again.
+85
website/docs/leaflet/examples.md
··· 1 + --- 2 + title: Publishing Examples 3 + sidebar_label: Examples 4 + description: End-to-end examples for posting, drafting, and syncing. 5 + sidebar_position: 6 6 + --- 7 + 8 + # Publishing Examples 9 + 10 + ## Publishing a Blog Post 11 + 12 + **Write the post locally**: 13 + 14 + ```sh 15 + noteleaf note create "Understanding AT Protocol" --editor 16 + ``` 17 + 18 + Write in markdown, save, and close editor. 19 + 20 + **Preview the conversion**: 21 + 22 + ```sh 23 + noteleaf pub post <note-id> --preview 24 + ``` 25 + 26 + Review the output to ensure formatting is correct. 27 + 28 + **Publish**: 29 + 30 + ```sh 31 + noteleaf pub post <note-id> 32 + ``` 33 + 34 + **Update later**: 35 + 36 + ```sh 37 + noteleaf note edit <note-id> 38 + # Make changes 39 + noteleaf pub patch <note-id> 40 + ``` 41 + 42 + ## Draft Workflow 43 + 44 + **Create draft**: 45 + 46 + ```sh 47 + noteleaf note create "Work in Progress" --editor 48 + noteleaf pub post <note-id> --draft 49 + ``` 50 + 51 + **Iterate locally**: 52 + 53 + ```sh 54 + noteleaf note edit <note-id> 55 + noteleaf pub patch <note-id> # Updates draft 56 + ``` 57 + 58 + **Publish when ready**: Use leaflet.pub web interface to change draft to published status (CLI command coming in future versions). 59 + 60 + ## Syncing Existing Content 61 + 62 + **Pull all leaflet documents**: 63 + 64 + ```sh 65 + noteleaf pub pull 66 + ``` 67 + 68 + **List synced documents**: 69 + 70 + ```sh 71 + noteleaf pub list 72 + ``` 73 + 74 + **Read a synced document**: 75 + 76 + ```sh 77 + noteleaf pub read <note-id> 78 + ``` 79 + 80 + **Edit locally and push updates**: 81 + 82 + ```sh 83 + noteleaf note edit <note-id> 84 + noteleaf pub patch <note-id> 85 + ```
+26
website/docs/leaflet/future.md
··· 1 + --- 2 + title: Leaflet Future Features 3 + sidebar_label: Future 4 + description: Upcoming enhancements planned for the leaflet integration. 5 + sidebar_position: 10 6 + --- 7 + 8 + # Leaflet Future Features 9 + 10 + Planned improvements to leaflet.pub integration: 11 + 12 + **Multiple Publications**: Create and manage separate publications for different topics 13 + 14 + **Image Upload**: Automatically upload images to blob storage and embed in documents 15 + 16 + **Status Management**: Publish drafts and unpublish documents from CLI 17 + 18 + **Metadata Editing**: Update document titles, summaries, and tags 19 + 20 + **Backlink Support**: Parse and resolve cross-references between documents 21 + 22 + **Collaborative Editing**: Pull and merge changes from multiple devices 23 + 24 + **Offline Mode**: Queue posts and patches for later upload 25 + 26 + For the latest roadmap, check the [GitHub repository](https://github.com/stormlightlabs/noteleaf).
+53
website/docs/leaflet/getting-started.md
··· 1 + --- 2 + title: Getting Started with Leaflet 3 + sidebar_label: Getting Started 4 + description: Prerequisites, app passwords, and authentication commands. 5 + sidebar_position: 2 6 + --- 7 + 8 + # Getting Started with Leaflet 9 + 10 + ## Prerequisites 11 + 12 + - Noteleaf installed and configured 13 + - A BlueSky & [Leaflet](https://leaflet.pub) account (create at [bsky.app](https://bsky.app)) 14 + - App password for authentication 15 + 16 + ## Creating an App Password 17 + 18 + For security, Noteleaf uses app passwords instead of your main BlueSky password: 19 + 20 + 1. Go to [bsky.app/settings/app-passwords](https://bsky.app/settings/app-passwords) 21 + 2. Click "Add App Password" 22 + 3. Name it "noteleaf" or similar 23 + 4. Copy the generated password (you won't see it again) 24 + 25 + ### Authentication 26 + 27 + Authenticate with your BlueSky handle and app password: 28 + 29 + ```sh 30 + noteleaf pub auth username.bsky.social 31 + ``` 32 + 33 + You'll be prompted for the app password. Alternatively, provide it via flag: 34 + 35 + ```sh 36 + noteleaf pub auth username.bsky.social --password <app-password> 37 + ``` 38 + 39 + **Re-authentication**: If your session expires, run `pub auth` again. Noteleaf remembers your last authenticated handle, so you can just run: 40 + 41 + ```sh 42 + noteleaf pub auth 43 + ``` 44 + 45 + ### Check Authentication Status 46 + 47 + Verify you're authenticated: 48 + 49 + ```sh 50 + noteleaf pub status 51 + ``` 52 + 53 + Shows your handle and session state.
+36
website/docs/leaflet/intro.md
··· 1 + --- 2 + title: Leaflet.pub Introduction 3 + sidebar_label: Introduction 4 + description: Understand leaflet.pub and how Noteleaf integrates with it. 5 + sidebar_position: 1 6 + --- 7 + 8 + # Leaflet.pub Introduction 9 + 10 + ## What is Leaflet.pub? 11 + 12 + [Leaflet.pub](https://leaflet.pub) is a decentralized publishing platform built on the AT Protocol (the same protocol that powers BlueSky). It allows you to publish long-form content as structured documents while maintaining ownership and control of your data through decentralized identity. 13 + 14 + ## AT Protocol and Decentralized Publishing 15 + 16 + AT Protocol provides: 17 + 18 + **Portable Identity**: Your identity (DID) is separate from any single service. You own your content and can move it between providers. 19 + 20 + **Verifiable Data**: All documents are content-addressed and cryptographically signed, ensuring authenticity and preventing tampering. 21 + 22 + **Interoperability**: Content published to leaflet.pub can be discovered and consumed by any AT Protocol-compatible client. 23 + 24 + **Decentralized Storage**: Data is stored in personal data repositories (PDSs) under your control, not locked in a proprietary platform. 25 + 26 + ## How Noteleaf Integrates with Leaflet 27 + 28 + Noteleaf can act as a leaflet.pub client, allowing you to: 29 + 30 + 1. **Authenticate** with your BlueSky/AT Protocol identity 31 + 2. **Pull** existing documents from leaflet.pub into local notes 32 + 3. **Publish** local notes as new leaflet documents 33 + 4. **Update** previously published documents with changes 34 + 5. **Manage** drafts and published content from the command line 35 + 36 + This integration lets you write locally in markdown, manage content alongside tasks and research notes, and publish to a decentralized platform when ready.
+57
website/docs/leaflet/listing.md
··· 1 + --- 2 + title: Listing and Reading Publications 3 + sidebar_label: Listing & Reading 4 + description: Browse leaflet-backed notes and read content locally. 5 + sidebar_position: 7 6 + --- 7 + 8 + # Listing and Reading Publications 9 + 10 + ## List Published Documents 11 + 12 + **All leaflet-synced notes**: 13 + 14 + ```sh 15 + noteleaf pub list 16 + ``` 17 + 18 + **Only published documents**: 19 + 20 + ```sh 21 + noteleaf pub list --published 22 + ``` 23 + 24 + **Only drafts**: 25 + 26 + ```sh 27 + noteleaf pub list --draft 28 + ``` 29 + 30 + **Interactive browser**: 31 + 32 + ```sh 33 + noteleaf pub list --interactive 34 + ``` 35 + 36 + Navigate with arrow keys, press Enter to read, `q` to quit. 37 + 38 + ## Reading a Publication 39 + 40 + **Read specific document**: 41 + 42 + ```sh 43 + noteleaf pub read 123 44 + ``` 45 + 46 + The identifier can be: 47 + 48 + - Note ID (e.g., `123`) 49 + - Leaflet record key (rkey, e.g., `3jxx...`) 50 + 51 + **Read newest publication**: 52 + 53 + ```sh 54 + noteleaf pub read 55 + ``` 56 + 57 + Omitting the identifier shows the most recently published document.
+16
website/docs/leaflet/publications.md
··· 1 + --- 2 + title: Leaflet Publications 3 + sidebar_label: Publications 4 + description: How publications work and how Noteleaf interacts with them. 5 + sidebar_position: 3 6 + --- 7 + 8 + # Leaflet Publications 9 + 10 + ## What is a Publication? 11 + 12 + In leaflet.pub, a publication is a collection of documents. While Noteleaf doesn't support management commands, documents you create are associated with your default publication. 13 + 14 + Future versions may support: 15 + 16 + - Switching between publications
+95
website/docs/leaflet/rich-text.md
··· 1 + --- 2 + title: Leaflet Rich Text and Blocks 3 + sidebar_label: Rich Text 4 + description: How markdown maps to leaflet blocks and formatting. 5 + sidebar_position: 5 6 + --- 7 + 8 + # Leaflet Rich Text and Blocks 9 + 10 + ## Document Structure 11 + 12 + Leaflet documents consist of blocksโ€”discrete content units: 13 + 14 + **Text Blocks**: Paragraphs of formatted text 15 + **Header Blocks**: Section titles (level 1-6) 16 + **Code Blocks**: Syntax-highlighted code with language annotation 17 + **Quote Blocks**: Blockquotes for citations 18 + **List Blocks**: Ordered or unordered lists 19 + **Rule Blocks**: Horizontal rules for visual separation 20 + 21 + ## Text Formatting 22 + 23 + Text within blocks can have inline formatting called facets: 24 + 25 + **Bold**: `**bold text**` โ†’ Bold facet 26 + **Italic**: `*italic text*` โ†’ Italic facet 27 + **Code**: `` `inline code` `` โ†’ Code facet 28 + **Links**: `[text](url)` โ†’ Link facet with URL 29 + **Strikethrough**: `~~struck~~` โ†’ Strikethrough facet 30 + 31 + Multiple formats can be combined: 32 + 33 + ```markdown 34 + **bold and *italic* text with [a link](https://example.com)** 35 + ``` 36 + 37 + ## Code Blocks 38 + 39 + Code blocks preserve language information for syntax highlighting: 40 + 41 + ````markdown 42 + ```python 43 + def hello(): 44 + print("Hello, leaflet!") 45 + ``` 46 + ```` 47 + 48 + Converts to a code block with language="python". 49 + 50 + Supported languages: Any language identifier is preserved, but rendering depends on leaflet.pub's syntax highlighter support. 51 + 52 + ## Blockquotes 53 + 54 + Markdown blockquotes become quote blocks: 55 + 56 + ```markdown 57 + > This is a quote from another source. 58 + > It can span multiple lines. 59 + ``` 60 + 61 + Nested blockquotes are flattened (leaflet doesn't support nesting). 62 + 63 + ## Lists 64 + 65 + Both ordered and unordered lists are supported: 66 + 67 + ```markdown 68 + - Unordered item 1 69 + - Unordered item 2 70 + - Nested item 71 + 72 + 1. Ordered item 1 73 + 2. Ordered item 2 74 + 1. Nested ordered item 75 + ``` 76 + 77 + Nesting is preserved up to leaflet's limits. 78 + 79 + ## Horizontal Rules 80 + 81 + Markdown horizontal rules become rule blocks: 82 + 83 + ```markdown 84 + --- 85 + ``` 86 + 87 + Use for section breaks. 88 + 89 + ## Images and Media 90 + 91 + **Current status**: Image support is not yet implemented in the Noteleaf-to-leaflet converter. 92 + 93 + **Future plans**: Images will be uploaded to blob storage and embedded in documents with image blocks. 94 + 95 + **Workaround**: For now, images in markdown are either skipped or converted to links.
+147
website/docs/leaflet/workflow.md
··· 1 + --- 2 + title: Publishing Workflow 3 + sidebar_label: Workflow 4 + description: Post, patch, drafts, pulling, and syncing documents. 5 + sidebar_position: 4 6 + --- 7 + 8 + # Publishing Workflow 9 + 10 + ## Converting Notes to Leaflet Documents 11 + 12 + Noteleaf converts markdown notes to leaflet's rich text block format: 13 + 14 + **Supported Markdown Features**: 15 + 16 + - Headers (`#`, `##`, `###`, etc.) 17 + - Paragraphs 18 + - Bold (`**bold**`) 19 + - Italic (`*italic*`) 20 + - Code (`inline code`) 21 + - Strikethrough (`~~text~~`) 22 + - Links (`[text](url)`) 23 + - Code blocks (` ```language ... ``` `) 24 + - Blockquotes (`> quote`) 25 + - Lists (ordered and unordered) 26 + - Horizontal rules (`---`) 27 + 28 + **Conversion Process**: 29 + 30 + 1. Parse markdown into AST (abstract syntax tree) 31 + 2. Convert AST nodes to leaflet block records 32 + 3. Process text formatting into facets 33 + 4. Validate document structure 34 + 5. Upload to leaflet.pub via AT Protocol 35 + 36 + ## Creating a New Document 37 + 38 + Publish a local note as a new leaflet document: 39 + 40 + ```sh 41 + noteleaf pub post 123 42 + ``` 43 + 44 + This: 45 + 46 + 1. Converts the note to leaflet format 47 + 2. Creates a new document on leaflet.pub 48 + 3. Links the note to the document (stores the rkey) 49 + 4. Marks the note as published 50 + 51 + **Create as draft**: 52 + 53 + ```sh 54 + noteleaf pub post 123 --draft 55 + ``` 56 + 57 + Drafts are saved to leaflet but not publicly visible until you publish them. 58 + 59 + **Preview before posting**: 60 + 61 + ```sh 62 + noteleaf pub post 123 --preview 63 + ``` 64 + 65 + Shows what the document will look like without actually posting. 66 + 67 + **Validate conversion**: 68 + 69 + ```sh 70 + noteleaf pub post 123 --validate 71 + ``` 72 + 73 + Checks if the markdown converts correctly to leaflet format without posting. 74 + 75 + **Save to file**: 76 + 77 + ```sh 78 + noteleaf pub post 123 --preview --output document.json 79 + noteleaf pub post 123 --preview --output document.txt --plaintext 80 + ``` 81 + 82 + ## Updating Published Documents 83 + 84 + Update an existing leaflet document from a local note: 85 + 86 + ```sh 87 + noteleaf pub patch 123 88 + ``` 89 + 90 + Requirements: 91 + 92 + - Note must have been previously posted or pulled from leaflet 93 + - Note must have a leaflet record key (rkey) in the database 94 + 95 + **Preserve draft/published status**: The `patch` command maintains the document's current status. If it's published, it stays published. If it's a draft, it stays a draft. 96 + 97 + **Preview changes**: 98 + 99 + ```sh 100 + noteleaf pub patch 123 --preview 101 + ``` 102 + 103 + **Validate before patching**: 104 + 105 + ```sh 106 + noteleaf pub patch 123 --validate 107 + ``` 108 + 109 + ## Managing Drafts 110 + 111 + **Create as draft**: 112 + 113 + ```sh 114 + noteleaf pub post 123 --draft 115 + ``` 116 + 117 + **Update draft**: 118 + 119 + ```sh 120 + noteleaf pub patch 123 121 + ``` 122 + 123 + **List drafts**: 124 + 125 + ```sh 126 + noteleaf pub list --draft 127 + ``` 128 + 129 + **Publish a draft**: Edit the draft on leaflet.pub or use the API to change status (command support coming in future versions). 130 + 131 + ## Pulling Documents from Leaflet 132 + 133 + Sync leaflet documents to local notes: 134 + 135 + ```sh 136 + noteleaf pub pull 137 + ``` 138 + 139 + This: 140 + 141 + 1. Authenticates with leaflet.pub 142 + 2. Fetches all documents in your repository 143 + 3. Creates new notes for documents not yet synced 144 + 4. Updates existing notes that have changed 145 + 146 + **Matching logic**: Notes are matched to leaflet documents by their record key (rkey) stored in the database. 147 + If a document doesn't have a corresponding note, a new one is created. If it does, the note is updated only if the content has changed (using CID for change detection).
-8
website/docs/manual/_category_.json
··· 1 - { 2 - "label": "CLI Reference", 3 - "position": 3, 4 - "link": { 5 - "type": "generated-index", 6 - "description": "Complete command-line reference for noteleaf" 7 - } 8 - }
-97
website/docs/manual/articles.md
··· 1 - --- 2 - id: articles 3 - title: Articles 4 - sidebar_position: 3 5 - description: Save and archive web articles 6 - --- 7 - 8 - ## article 9 - 10 - Save and archive web articles locally. 11 - 12 - Parse articles from supported websites, extract clean content, and save as 13 - both markdown and HTML. Maintains a searchable archive of articles with 14 - metadata including author, title, and publication date. 15 - 16 - ```bash 17 - noteleaf article 18 - ``` 19 - 20 - ### Subcommands 21 - 22 - #### add 23 - 24 - Parse and save article content from a supported website. 25 - 26 - The article will be parsed using domain-specific XPath rules and saved 27 - as both Markdown and HTML files. Article metadata is stored in the database. 28 - 29 - **Usage:** 30 - 31 - ```bash 32 - noteleaf article add <url> 33 - ``` 34 - 35 - #### list 36 - 37 - List saved articles with optional filtering. 38 - 39 - Use query to filter by title, or use flags for more specific filtering. 40 - 41 - **Usage:** 42 - 43 - ```bash 44 - noteleaf article list [query] [flags] 45 - ``` 46 - 47 - **Options:** 48 - 49 - ``` 50 - --author string Filter by author 51 - -l, --limit int Limit number of results (0 = no limit) 52 - ``` 53 - 54 - **Aliases:** ls 55 - 56 - #### view 57 - 58 - Display article metadata and summary. 59 - 60 - Shows article title, author, publication date, URL, and a brief content 61 - preview. Use 'read' command to view the full article content. 62 - 63 - **Usage:** 64 - 65 - ```bash 66 - noteleaf article view <id> 67 - ``` 68 - 69 - **Aliases:** show 70 - 71 - #### read 72 - 73 - Read the full markdown content of an article with beautiful formatting. 74 - 75 - This displays the complete article content using syntax highlighting and proper formatting. 76 - 77 - **Usage:** 78 - 79 - ```bash 80 - noteleaf article read <id> 81 - ``` 82 - 83 - #### remove 84 - 85 - Delete an article and its files permanently. 86 - 87 - Removes the article metadata from the database and deletes associated markdown 88 - and HTML files. This operation cannot be undone. 89 - 90 - **Usage:** 91 - 92 - ```bash 93 - noteleaf article remove <id> 94 - ``` 95 - 96 - **Aliases:** rm, delete 97 -
-115
website/docs/manual/books.md
··· 1 - --- 2 - id: books 3 - title: Books 4 - sidebar_position: 4 5 - description: Manage reading list and track progress 6 - --- 7 - 8 - ## book 9 - 10 - Track books and reading progress. 11 - 12 - Search Google Books API to add books to your reading list. Track which books 13 - you're reading, update progress percentages, and maintain a history of finished 14 - books. 15 - 16 - ```bash 17 - noteleaf media book 18 - ``` 19 - 20 - ### Subcommands 21 - 22 - #### add 23 - 24 - Search for books and add them to your reading list. 25 - 26 - By default, shows search results in a simple list format where you can select by number. 27 - Use the -i flag for an interactive interface with navigation keys. 28 - 29 - **Usage:** 30 - 31 - ```bash 32 - noteleaf media book add [search query...] [flags] 33 - ``` 34 - 35 - **Options:** 36 - 37 - ``` 38 - -i, --interactive Use interactive interface for book selection 39 - ``` 40 - 41 - #### list 42 - 43 - Display books in your reading list with progress indicators. 44 - 45 - Shows book titles, authors, and reading progress percentages. Filter by --all, 46 - --reading for books in progress, --finished for completed books, or --queued 47 - for books not yet started. Default shows queued books only. 48 - 49 - **Usage:** 50 - 51 - ```bash 52 - noteleaf media book list [--all|--reading|--finished|--queued] 53 - ``` 54 - 55 - #### reading 56 - 57 - Mark a book as currently reading. Use this when you start a book from your queue. 58 - 59 - **Usage:** 60 - 61 - ```bash 62 - noteleaf media book reading <id> 63 - ``` 64 - 65 - #### finished 66 - 67 - Mark a book as finished with current timestamp. Sets reading progress to 100%. 68 - 69 - **Usage:** 70 - 71 - ```bash 72 - noteleaf media book finished <id> 73 - ``` 74 - 75 - **Aliases:** read 76 - 77 - #### remove 78 - 79 - Remove a book from your reading list. Use this for books you no longer want to track. 80 - 81 - **Usage:** 82 - 83 - ```bash 84 - noteleaf media book remove <id> 85 - ``` 86 - 87 - **Aliases:** rm 88 - 89 - #### progress 90 - 91 - Set reading progress for a book. 92 - 93 - Specify a percentage value between 0 and 100 to indicate how far you've 94 - progressed through the book. Automatically updates status to 'reading' if not 95 - already set. 96 - 97 - **Usage:** 98 - 99 - ```bash 100 - noteleaf media book progress <id> <percentage> 101 - ``` 102 - 103 - #### update 104 - 105 - Change a book's status directly. 106 - 107 - Valid statuses are: queued (not started), reading (in progress), finished 108 - (completed), or removed (no longer tracking). 109 - 110 - **Usage:** 111 - 112 - ```bash 113 - noteleaf media book update <id> <status> 114 - ``` 115 -
-78
website/docs/manual/configuration.md
··· 1 - --- 2 - id: configuration 3 - title: Configuration 4 - sidebar_position: 7 5 - description: Manage application configuration 6 - --- 7 - 8 - ## config 9 - 10 - Manage noteleaf configuration 11 - 12 - ```bash 13 - noteleaf config 14 - ``` 15 - 16 - ### Subcommands 17 - 18 - #### get 19 - 20 - Display configuration values. 21 - 22 - If no key is provided, displays all configuration values. 23 - Otherwise, displays the value for the specified key. 24 - 25 - **Usage:** 26 - 27 - ```bash 28 - noteleaf config get [key] 29 - ``` 30 - 31 - #### set 32 - 33 - Update a configuration value. 34 - 35 - Available keys: 36 - database_path - Custom database file path 37 - data_dir - Custom data directory 38 - date_format - Date format string (default: 2006-01-02) 39 - color_scheme - Color scheme (default: default) 40 - default_view - Default view mode (default: list) 41 - default_priority - Default task priority 42 - editor - Preferred text editor 43 - articles_dir - Articles storage directory 44 - notes_dir - Notes storage directory 45 - auto_archive - Auto-archive completed items (true/false) 46 - sync_enabled - Enable synchronization (true/false) 47 - sync_endpoint - Synchronization endpoint URL 48 - sync_token - Synchronization token 49 - export_format - Default export format (default: json) 50 - movie_api_key - API key for movie database 51 - book_api_key - API key for book database 52 - 53 - **Usage:** 54 - 55 - ```bash 56 - noteleaf config set <key> <value> 57 - ``` 58 - 59 - #### path 60 - 61 - Display the path to the configuration file being used. 62 - 63 - **Usage:** 64 - 65 - ```bash 66 - noteleaf config path 67 - ``` 68 - 69 - #### reset 70 - 71 - Reset all configuration values to their defaults. 72 - 73 - **Usage:** 74 - 75 - ```bash 76 - noteleaf config reset 77 - ``` 78 -
-37
website/docs/manual/index.md
··· 1 - --- 2 - id: index 3 - title: CLI Reference 4 - sidebar_label: Overview 5 - sidebar_position: 0 6 - description: Complete command-line reference for noteleaf 7 - --- 8 - 9 - # noteleaf CLI Reference 10 - 11 - noteleaf - personal information manager for the command line 12 - 13 - A comprehensive CLI tool for managing tasks, notes, articles, and media queues. 14 - Inspired by TaskWarrior, noteleaf combines todo management with reading lists, 15 - watch queues, and a personal knowledge base. 16 - 17 - Core features include hierarchical tasks with dependencies, recurring tasks, 18 - time tracking, markdown notes with tags, article archiving, and media queue 19 - management for books, movies, and TV shows. 20 - 21 - ## Usage 22 - 23 - ```bash 24 - noteleaf 25 - ``` 26 - 27 - ## Command Groups 28 - 29 - - **[Task Management](tasks)** - Manage todos, projects, and time tracking 30 - - **[Notes](notes)** - Create and organize markdown notes 31 - - **[Articles](articles)** - Save and archive web articles 32 - - **[Books](books)** - Track reading list and progress 33 - - **[Movies](movies)** - Manage movie watch queue 34 - - **[TV Shows](tv-shows)** - Track TV show watching 35 - - **[Configuration](configuration)** - Manage settings 36 - - **[Management](management)** - Application management 37 -
-61
website/docs/manual/management.md
··· 1 - --- 2 - id: management 3 - title: Management 4 - sidebar_position: 8 5 - description: Application management commands 6 - --- 7 - 8 - ## status 9 - 10 - Display comprehensive application status information. 11 - 12 - Shows database location, configuration file path, data directories, and current 13 - settings. Use this command to verify your noteleaf installation and diagnose 14 - configuration issues. 15 - 16 - ```bash 17 - noteleaf status 18 - ``` 19 - 20 - ## setup 21 - 22 - Initialize noteleaf for first use. 23 - 24 - Creates the database, configuration file, and required data directories. Run 25 - this command after installing noteleaf or when setting up a new environment. 26 - Safe to run multiple times as it will skip existing resources. 27 - 28 - ```bash 29 - noteleaf setup 30 - ``` 31 - 32 - ### Subcommands 33 - 34 - #### seed 35 - 36 - Add sample tasks, books, and notes to the database for testing and demonstration purposes 37 - 38 - **Usage:** 39 - 40 - ```bash 41 - noteleaf setup seed [flags] 42 - ``` 43 - 44 - **Options:** 45 - 46 - ``` 47 - -f, --force Clear existing data and re-seed 48 - ``` 49 - 50 - ## reset 51 - 52 - Remove all application data and return to initial state. 53 - 54 - This command deletes the database, all media files, notes, and articles. The 55 - configuration file is preserved. Use with caution as this operation cannot be 56 - undone. You will be prompted for confirmation before deletion proceeds. 57 - 58 - ```bash 59 - noteleaf reset 60 - ``` 61 -
-77
website/docs/manual/movies.md
··· 1 - --- 2 - id: movies 3 - title: Movies 4 - sidebar_position: 5 5 - description: Track movies in watch queue 6 - --- 7 - 8 - ## movie 9 - 10 - Track movies you want to watch. 11 - 12 - Search TMDB for movies and add them to your queue. Mark movies as watched when 13 - completed. Maintains a history of your movie watching activity. 14 - 15 - ```bash 16 - noteleaf media movie 17 - ``` 18 - 19 - ### Subcommands 20 - 21 - #### add 22 - 23 - Search for movies and add them to your watch queue. 24 - 25 - By default, shows search results in a simple list format where you can select by number. 26 - Use the -i flag for an interactive interface with navigation keys. 27 - 28 - **Usage:** 29 - 30 - ```bash 31 - noteleaf media movie add [search query...] [flags] 32 - ``` 33 - 34 - **Options:** 35 - 36 - ``` 37 - -i, --interactive Use interactive interface for movie selection 38 - ``` 39 - 40 - #### list 41 - 42 - Display movies in your queue with optional status filters. 43 - 44 - Shows movie titles, release years, and current status. Filter by --all to show 45 - everything, --watched for completed movies, or --queued for unwatched items. 46 - Default shows queued movies only. 47 - 48 - **Usage:** 49 - 50 - ```bash 51 - noteleaf media movie list [--all|--watched|--queued] 52 - ``` 53 - 54 - #### watched 55 - 56 - Mark a movie as watched with current timestamp. Moves the movie from queued to watched status. 57 - 58 - **Usage:** 59 - 60 - ```bash 61 - noteleaf media movie watched [id] 62 - ``` 63 - 64 - **Aliases:** seen 65 - 66 - #### remove 67 - 68 - Remove a movie from your watch queue. Use this for movies you no longer want to track. 69 - 70 - **Usage:** 71 - 72 - ```bash 73 - noteleaf media movie remove [id] 74 - ``` 75 - 76 - **Aliases:** rm 77 -
-114
website/docs/manual/notes.md
··· 1 - --- 2 - id: notes 3 - title: Notes 4 - sidebar_position: 2 5 - description: Create and organize markdown notes 6 - --- 7 - 8 - ## note 9 - 10 - Create and organize markdown notes with tags. 11 - 12 - Write notes in markdown format, organize them with tags, browse them in an 13 - interactive TUI, and edit them in your preferred editor. Notes are stored as 14 - files on disk with metadata tracked in the database. 15 - 16 - ```bash 17 - noteleaf note 18 - ``` 19 - 20 - ### Subcommands 21 - 22 - #### create 23 - 24 - Create a new markdown note. 25 - 26 - Provide a title and optional content inline, or use --interactive to open an 27 - editor. Use --file to import content from an existing markdown file. Notes 28 - support tags for organization and full-text search. 29 - 30 - Examples: 31 - noteleaf note create "Meeting notes" "Discussed project timeline" 32 - noteleaf note create -i 33 - noteleaf note create --file ~/documents/draft.md 34 - 35 - **Usage:** 36 - 37 - ```bash 38 - noteleaf note create [title] [content...] [flags] 39 - ``` 40 - 41 - **Options:** 42 - 43 - ``` 44 - -e, --editor Prompt to open note in editor after creation 45 - -f, --file string Create note from markdown file 46 - -i, --interactive Open interactive editor 47 - ``` 48 - 49 - **Aliases:** new 50 - 51 - #### list 52 - 53 - Opens interactive TUI browser for navigating and viewing notes 54 - 55 - **Usage:** 56 - 57 - ```bash 58 - noteleaf note list [--archived] [--static] [--tags=tag1,tag2] [flags] 59 - ``` 60 - 61 - **Options:** 62 - 63 - ``` 64 - -a, --archived Show archived notes 65 - -s, --static Show static list instead of interactive TUI 66 - --tags string Filter by tags (comma-separated) 67 - ``` 68 - 69 - **Aliases:** ls 70 - 71 - #### read 72 - 73 - Display note content with formatted markdown rendering. 74 - 75 - Shows the note with syntax highlighting, proper formatting, and metadata. 76 - Useful for quick viewing without opening an editor. 77 - 78 - **Usage:** 79 - 80 - ```bash 81 - noteleaf note read [note-id] 82 - ``` 83 - 84 - **Aliases:** view 85 - 86 - #### edit 87 - 88 - Open note in your configured text editor. 89 - 90 - Uses the editor specified in your noteleaf configuration or the EDITOR 91 - environment variable. Changes are automatically saved when you close the 92 - editor. 93 - 94 - **Usage:** 95 - 96 - ```bash 97 - noteleaf note edit [note-id] 98 - ``` 99 - 100 - #### remove 101 - 102 - Delete a note permanently. 103 - 104 - Removes both the markdown file and database metadata. This operation cannot be 105 - undone. You will be prompted for confirmation before deletion. 106 - 107 - **Usage:** 108 - 109 - ```bash 110 - noteleaf note remove [note-id] 111 - ``` 112 - 113 - **Aliases:** rm, delete, del 114 -
-861
website/docs/manual/tasks.md
··· 1 - --- 2 - id: task-management 3 - title: Task Management 4 - sidebar_position: 1 5 - description: Manage tasks with TaskWarrior-inspired features 6 - --- 7 - 8 - ## todo 9 - 10 - Manage tasks with TaskWarrior-inspired features. 11 - 12 - Track todos with priorities, projects, contexts, and tags. Supports hierarchical 13 - tasks with parent/child relationships, task dependencies, recurring tasks, and 14 - time tracking. Tasks can be filtered by status, priority, project, or context. 15 - 16 - ```bash 17 - noteleaf todo 18 - ``` 19 - 20 - ### Subcommands 21 - 22 - #### add 23 - 24 - Create a new task with description and optional attributes. 25 - 26 - Tasks can be created with priority levels (low, medium, high, urgent), assigned 27 - to projects and contexts, tagged for organization, and configured with due dates 28 - and recurrence rules. Dependencies can be established to ensure tasks are 29 - completed in order. 30 - 31 - Examples: 32 - noteleaf todo add "Write documentation" --priority high --project docs 33 - noteleaf todo add "Weekly review" --recur "FREQ=WEEKLY" --due 2024-01-15 34 - 35 - **Usage:** 36 - 37 - ```bash 38 - noteleaf todo add [description] [flags] 39 - ``` 40 - 41 - **Options:** 42 - 43 - ``` 44 - -c, --context string Set task context 45 - --depends-on string Set task dependencies (comma-separated UUIDs) 46 - -d, --due string Set due date (YYYY-MM-DD) 47 - --parent string Set parent task UUID 48 - -p, --priority string Set task priority 49 - --project string Set task project 50 - --recur string Set recurrence rule (e.g., FREQ=DAILY) 51 - -t, --tags strings Add tags to task 52 - --until string Set recurrence end date (YYYY-MM-DD) 53 - ``` 54 - 55 - **Aliases:** create, new 56 - 57 - #### list 58 - 59 - List tasks with optional filtering and display modes. 60 - 61 - By default, shows tasks in an interactive TaskWarrior-like interface. 62 - Use --static to show a simple text list instead. 63 - Use --all to show all tasks, otherwise only pending tasks are shown. 64 - 65 - **Usage:** 66 - 67 - ```bash 68 - noteleaf todo list [flags] 69 - ``` 70 - 71 - **Options:** 72 - 73 - ``` 74 - -a, --all Show all tasks (default: pending only) 75 - --context string Filter by context 76 - -i, --interactive Force interactive mode (default) 77 - --priority string Filter by priority 78 - --project string Filter by project 79 - --static Use static text output instead of interactive 80 - --status string Filter by status 81 - ``` 82 - 83 - **Aliases:** ls 84 - 85 - #### view 86 - 87 - Display detailed information for a specific task. 88 - 89 - Shows all task attributes including description, status, priority, project, 90 - context, tags, due date, creation time, and modification history. Use --json 91 - for machine-readable output or --no-metadata to show only the description. 92 - 93 - **Usage:** 94 - 95 - ```bash 96 - noteleaf todo view [task-id] [flags] 97 - ``` 98 - 99 - **Options:** 100 - 101 - ``` 102 - --format string Output format (detailed, brief) (default "detailed") 103 - --json Output as JSON 104 - --no-metadata Hide creation/modification timestamps 105 - ``` 106 - 107 - #### update 108 - 109 - Modify attributes of an existing task. 110 - 111 - Update any task property including description, status, priority, project, 112 - context, due date, recurrence rule, or parent task. Add or remove tags and 113 - dependencies. Multiple attributes can be updated in a single command. 114 - 115 - Examples: 116 - noteleaf todo update 123 --priority urgent --due tomorrow 117 - noteleaf todo update 456 --add-tag urgent --project website 118 - 119 - **Usage:** 120 - 121 - ```bash 122 - noteleaf todo update [task-id] [flags] 123 - ``` 124 - 125 - **Options:** 126 - 127 - ``` 128 - --add-depends string Add task dependencies (comma-separated UUIDs) 129 - --add-tag strings Add tags to task 130 - -c, --context string Set task context 131 - --description string Update task description 132 - -d, --due string Set due date (YYYY-MM-DD) 133 - --parent string Set parent task UUID 134 - -p, --priority string Set task priority 135 - --project string Set task project 136 - --recur string Set recurrence rule (e.g., FREQ=DAILY) 137 - --remove-depends string Remove task dependencies (comma-separated UUIDs) 138 - --remove-tag strings Remove tags from task 139 - --status string Update task status 140 - -t, --tags strings Add tags to task 141 - --until string Set recurrence end date (YYYY-MM-DD) 142 - ``` 143 - 144 - #### edit 145 - 146 - Open interactive editor for task modification. 147 - 148 - Provides a user-friendly interface with status picker and priority toggle. 149 - Easier than using multiple command-line flags for complex updates. 150 - 151 - **Usage:** 152 - 153 - ```bash 154 - noteleaf todo edit [task-id] 155 - ``` 156 - 157 - **Aliases:** e 158 - 159 - #### delete 160 - 161 - Permanently remove a task from the database. 162 - 163 - This operation cannot be undone. Consider updating the task status to 164 - 'deleted' instead if you want to preserve the record for historical purposes. 165 - 166 - **Usage:** 167 - 168 - ```bash 169 - noteleaf todo delete [task-id] 170 - ``` 171 - 172 - #### projects 173 - 174 - Display all projects with task counts. 175 - 176 - Shows each project used in your tasks along with the number of tasks in each 177 - project. Use --todo-txt to format output with +project syntax for compatibility 178 - with todo.txt tools. 179 - 180 - **Usage:** 181 - 182 - ```bash 183 - noteleaf todo projects [flags] 184 - ``` 185 - 186 - **Options:** 187 - 188 - ``` 189 - --static Use static text output instead of interactive 190 - --todo-txt Format output with +project prefix for todo.txt compatibility 191 - ``` 192 - 193 - **Aliases:** proj 194 - 195 - #### tags 196 - 197 - Display all tags used across tasks. 198 - 199 - Shows each tag with the number of tasks using it. Tags provide flexible 200 - categorization orthogonal to projects and contexts. 201 - 202 - **Usage:** 203 - 204 - ```bash 205 - noteleaf todo tags [flags] 206 - ``` 207 - 208 - **Options:** 209 - 210 - ``` 211 - --static Use static text output instead of interactive 212 - ``` 213 - 214 - **Aliases:** t 215 - 216 - #### contexts 217 - 218 - Display all contexts with task counts. 219 - 220 - Contexts represent locations or environments where tasks can be completed (e.g., 221 - @home, @office, @errands). Use --todo-txt to format output with @context syntax 222 - for compatibility with todo.txt tools. 223 - 224 - **Usage:** 225 - 226 - ```bash 227 - noteleaf todo contexts [flags] 228 - ``` 229 - 230 - **Options:** 231 - 232 - ``` 233 - --static Use static text output instead of interactive 234 - --todo-txt Format output with @context prefix for todo.txt compatibility 235 - ``` 236 - 237 - **Aliases:** con, loc, ctx, locations 238 - 239 - #### done 240 - 241 - Mark a task as completed with current timestamp. 242 - 243 - Sets the task status to 'completed' and records the completion time. For 244 - recurring tasks, generates the next instance based on the recurrence rule. 245 - 246 - **Usage:** 247 - 248 - ```bash 249 - noteleaf todo done [task-id] 250 - ``` 251 - 252 - **Aliases:** complete 253 - 254 - #### start 255 - 256 - Begin tracking time spent on a task. 257 - 258 - Records the start time for a work session. Only one task can be actively 259 - tracked at a time. Use --note to add a description of what you're working on. 260 - 261 - **Usage:** 262 - 263 - ```bash 264 - noteleaf todo start [task-id] [flags] 265 - ``` 266 - 267 - **Options:** 268 - 269 - ``` 270 - -n, --note string Add a note to the time entry 271 - ``` 272 - 273 - #### stop 274 - 275 - End time tracking for the active task. 276 - 277 - Records the end time and calculates duration for the current work session. 278 - Duration is added to the task's total time tracked. 279 - 280 - **Usage:** 281 - 282 - ```bash 283 - noteleaf todo stop [task-id] 284 - ``` 285 - 286 - #### timesheet 287 - 288 - Show time tracking summary for tasks. 289 - 290 - By default shows time entries for the last 7 days. 291 - Use --task to show timesheet for a specific task. 292 - Use --days to change the date range. 293 - 294 - **Usage:** 295 - 296 - ```bash 297 - noteleaf todo timesheet [flags] 298 - ``` 299 - 300 - **Options:** 301 - 302 - ``` 303 - -d, --days int Number of days to show in timesheet (default 7) 304 - -t, --task string Show timesheet for specific task ID 305 - ``` 306 - 307 - #### recur 308 - 309 - Configure recurring task patterns. 310 - 311 - Create tasks that repeat on a schedule using iCalendar recurrence rules (RRULE). 312 - Supports daily, weekly, monthly, and yearly patterns with optional end dates. 313 - 314 - **Usage:** 315 - 316 - ```bash 317 - noteleaf todo recur 318 - ``` 319 - 320 - **Aliases:** repeat 321 - 322 - ##### set 323 - 324 - Apply a recurrence rule to create repeating task instances. 325 - 326 - Uses iCalendar RRULE syntax (e.g., "FREQ=DAILY" for daily tasks, "FREQ=WEEKLY;BYDAY=MO,WE,FR" 327 - for specific weekdays). When a recurring task is completed, the next instance is 328 - automatically generated. 329 - 330 - Examples: 331 - noteleaf todo recur set 123 --rule "FREQ=DAILY" 332 - noteleaf todo recur set 456 --rule "FREQ=WEEKLY;BYDAY=MO" --until 2024-12-31 333 - 334 - **Usage:** 335 - 336 - ```bash 337 - noteleaf todo recur set [task-id] [flags] 338 - ``` 339 - 340 - **Options:** 341 - 342 - ``` 343 - --rule string Recurrence rule (e.g., FREQ=DAILY) 344 - --until string Recurrence end date (YYYY-MM-DD) 345 - ``` 346 - 347 - ##### clear 348 - 349 - Remove recurrence from a task. 350 - 351 - Converts a recurring task to a one-time task. Existing future instances are not 352 - affected. 353 - 354 - **Usage:** 355 - 356 - ```bash 357 - noteleaf todo recur clear [task-id] 358 - ``` 359 - 360 - ##### show 361 - 362 - Display recurrence rule and schedule information. 363 - 364 - Shows the RRULE pattern, next occurrence date, and recurrence end date if 365 - configured. 366 - 367 - **Usage:** 368 - 369 - ```bash 370 - noteleaf todo recur show [task-id] 371 - ``` 372 - 373 - #### depend 374 - 375 - Create and manage task dependencies. 376 - 377 - Establish relationships where one task must be completed before another can 378 - begin. Useful for multi-step workflows and project management. 379 - 380 - **Usage:** 381 - 382 - ```bash 383 - noteleaf todo depend 384 - ``` 385 - 386 - **Aliases:** dep, deps 387 - 388 - ##### add 389 - 390 - Make a task dependent on another task's completion. 391 - 392 - The first task cannot be started until the second task is completed. Use task 393 - UUIDs to specify dependencies. 394 - 395 - **Usage:** 396 - 397 - ```bash 398 - noteleaf todo depend add [task-id] [depends-on-uuid] 399 - ``` 400 - 401 - ##### remove 402 - 403 - Delete a dependency relationship between two tasks. 404 - 405 - **Usage:** 406 - 407 - ```bash 408 - noteleaf todo depend remove [task-id] [depends-on-uuid] 409 - ``` 410 - 411 - **Aliases:** rm 412 - 413 - ##### list 414 - 415 - Show all tasks that must be completed before this task can be started. 416 - 417 - **Usage:** 418 - 419 - ```bash 420 - noteleaf todo depend list [task-id] 421 - ``` 422 - 423 - **Aliases:** ls 424 - 425 - ##### blocked-by 426 - 427 - Display all tasks that depend on this task's completion. 428 - 429 - **Usage:** 430 - 431 - ```bash 432 - noteleaf todo depend blocked-by [task-id] 433 - ``` 434 - 435 - ## todo 436 - 437 - Manage tasks with TaskWarrior-inspired features. 438 - 439 - Track todos with priorities, projects, contexts, and tags. Supports hierarchical 440 - tasks with parent/child relationships, task dependencies, recurring tasks, and 441 - time tracking. Tasks can be filtered by status, priority, project, or context. 442 - 443 - ```bash 444 - noteleaf todo 445 - ``` 446 - 447 - ### Subcommands 448 - 449 - #### add 450 - 451 - Create a new task with description and optional attributes. 452 - 453 - Tasks can be created with priority levels (low, medium, high, urgent), assigned 454 - to projects and contexts, tagged for organization, and configured with due dates 455 - and recurrence rules. Dependencies can be established to ensure tasks are 456 - completed in order. 457 - 458 - Examples: 459 - noteleaf todo add "Write documentation" --priority high --project docs 460 - noteleaf todo add "Weekly review" --recur "FREQ=WEEKLY" --due 2024-01-15 461 - 462 - **Usage:** 463 - 464 - ```bash 465 - noteleaf todo add [description] [flags] 466 - ``` 467 - 468 - **Options:** 469 - 470 - ``` 471 - -c, --context string Set task context 472 - --depends-on string Set task dependencies (comma-separated UUIDs) 473 - -d, --due string Set due date (YYYY-MM-DD) 474 - --parent string Set parent task UUID 475 - -p, --priority string Set task priority 476 - --project string Set task project 477 - --recur string Set recurrence rule (e.g., FREQ=DAILY) 478 - -t, --tags strings Add tags to task 479 - --until string Set recurrence end date (YYYY-MM-DD) 480 - ``` 481 - 482 - **Aliases:** create, new 483 - 484 - #### list 485 - 486 - List tasks with optional filtering and display modes. 487 - 488 - By default, shows tasks in an interactive TaskWarrior-like interface. 489 - Use --static to show a simple text list instead. 490 - Use --all to show all tasks, otherwise only pending tasks are shown. 491 - 492 - **Usage:** 493 - 494 - ```bash 495 - noteleaf todo list [flags] 496 - ``` 497 - 498 - **Options:** 499 - 500 - ``` 501 - -a, --all Show all tasks (default: pending only) 502 - --context string Filter by context 503 - -i, --interactive Force interactive mode (default) 504 - --priority string Filter by priority 505 - --project string Filter by project 506 - --static Use static text output instead of interactive 507 - --status string Filter by status 508 - ``` 509 - 510 - **Aliases:** ls 511 - 512 - #### view 513 - 514 - Display detailed information for a specific task. 515 - 516 - Shows all task attributes including description, status, priority, project, 517 - context, tags, due date, creation time, and modification history. Use --json 518 - for machine-readable output or --no-metadata to show only the description. 519 - 520 - **Usage:** 521 - 522 - ```bash 523 - noteleaf todo view [task-id] [flags] 524 - ``` 525 - 526 - **Options:** 527 - 528 - ``` 529 - --format string Output format (detailed, brief) (default "detailed") 530 - --json Output as JSON 531 - --no-metadata Hide creation/modification timestamps 532 - ``` 533 - 534 - #### update 535 - 536 - Modify attributes of an existing task. 537 - 538 - Update any task property including description, status, priority, project, 539 - context, due date, recurrence rule, or parent task. Add or remove tags and 540 - dependencies. Multiple attributes can be updated in a single command. 541 - 542 - Examples: 543 - noteleaf todo update 123 --priority urgent --due tomorrow 544 - noteleaf todo update 456 --add-tag urgent --project website 545 - 546 - **Usage:** 547 - 548 - ```bash 549 - noteleaf todo update [task-id] [flags] 550 - ``` 551 - 552 - **Options:** 553 - 554 - ``` 555 - --add-depends string Add task dependencies (comma-separated UUIDs) 556 - --add-tag strings Add tags to task 557 - -c, --context string Set task context 558 - --description string Update task description 559 - -d, --due string Set due date (YYYY-MM-DD) 560 - --parent string Set parent task UUID 561 - -p, --priority string Set task priority 562 - --project string Set task project 563 - --recur string Set recurrence rule (e.g., FREQ=DAILY) 564 - --remove-depends string Remove task dependencies (comma-separated UUIDs) 565 - --remove-tag strings Remove tags from task 566 - --status string Update task status 567 - -t, --tags strings Add tags to task 568 - --until string Set recurrence end date (YYYY-MM-DD) 569 - ``` 570 - 571 - #### edit 572 - 573 - Open interactive editor for task modification. 574 - 575 - Provides a user-friendly interface with status picker and priority toggle. 576 - Easier than using multiple command-line flags for complex updates. 577 - 578 - **Usage:** 579 - 580 - ```bash 581 - noteleaf todo edit [task-id] 582 - ``` 583 - 584 - **Aliases:** e 585 - 586 - #### delete 587 - 588 - Permanently remove a task from the database. 589 - 590 - This operation cannot be undone. Consider updating the task status to 591 - 'deleted' instead if you want to preserve the record for historical purposes. 592 - 593 - **Usage:** 594 - 595 - ```bash 596 - noteleaf todo delete [task-id] 597 - ``` 598 - 599 - #### projects 600 - 601 - Display all projects with task counts. 602 - 603 - Shows each project used in your tasks along with the number of tasks in each 604 - project. Use --todo-txt to format output with +project syntax for compatibility 605 - with todo.txt tools. 606 - 607 - **Usage:** 608 - 609 - ```bash 610 - noteleaf todo projects [flags] 611 - ``` 612 - 613 - **Options:** 614 - 615 - ``` 616 - --static Use static text output instead of interactive 617 - --todo-txt Format output with +project prefix for todo.txt compatibility 618 - ``` 619 - 620 - **Aliases:** proj 621 - 622 - #### tags 623 - 624 - Display all tags used across tasks. 625 - 626 - Shows each tag with the number of tasks using it. Tags provide flexible 627 - categorization orthogonal to projects and contexts. 628 - 629 - **Usage:** 630 - 631 - ```bash 632 - noteleaf todo tags [flags] 633 - ``` 634 - 635 - **Options:** 636 - 637 - ``` 638 - --static Use static text output instead of interactive 639 - ``` 640 - 641 - **Aliases:** t 642 - 643 - #### contexts 644 - 645 - Display all contexts with task counts. 646 - 647 - Contexts represent locations or environments where tasks can be completed (e.g., 648 - @home, @office, @errands). Use --todo-txt to format output with @context syntax 649 - for compatibility with todo.txt tools. 650 - 651 - **Usage:** 652 - 653 - ```bash 654 - noteleaf todo contexts [flags] 655 - ``` 656 - 657 - **Options:** 658 - 659 - ``` 660 - --static Use static text output instead of interactive 661 - --todo-txt Format output with @context prefix for todo.txt compatibility 662 - ``` 663 - 664 - **Aliases:** con, loc, ctx, locations 665 - 666 - #### done 667 - 668 - Mark a task as completed with current timestamp. 669 - 670 - Sets the task status to 'completed' and records the completion time. For 671 - recurring tasks, generates the next instance based on the recurrence rule. 672 - 673 - **Usage:** 674 - 675 - ```bash 676 - noteleaf todo done [task-id] 677 - ``` 678 - 679 - **Aliases:** complete 680 - 681 - #### start 682 - 683 - Begin tracking time spent on a task. 684 - 685 - Records the start time for a work session. Only one task can be actively 686 - tracked at a time. Use --note to add a description of what you're working on. 687 - 688 - **Usage:** 689 - 690 - ```bash 691 - noteleaf todo start [task-id] [flags] 692 - ``` 693 - 694 - **Options:** 695 - 696 - ``` 697 - -n, --note string Add a note to the time entry 698 - ``` 699 - 700 - #### stop 701 - 702 - End time tracking for the active task. 703 - 704 - Records the end time and calculates duration for the current work session. 705 - Duration is added to the task's total time tracked. 706 - 707 - **Usage:** 708 - 709 - ```bash 710 - noteleaf todo stop [task-id] 711 - ``` 712 - 713 - #### timesheet 714 - 715 - Show time tracking summary for tasks. 716 - 717 - By default shows time entries for the last 7 days. 718 - Use --task to show timesheet for a specific task. 719 - Use --days to change the date range. 720 - 721 - **Usage:** 722 - 723 - ```bash 724 - noteleaf todo timesheet [flags] 725 - ``` 726 - 727 - **Options:** 728 - 729 - ``` 730 - -d, --days int Number of days to show in timesheet (default 7) 731 - -t, --task string Show timesheet for specific task ID 732 - ``` 733 - 734 - #### recur 735 - 736 - Configure recurring task patterns. 737 - 738 - Create tasks that repeat on a schedule using iCalendar recurrence rules (RRULE). 739 - Supports daily, weekly, monthly, and yearly patterns with optional end dates. 740 - 741 - **Usage:** 742 - 743 - ```bash 744 - noteleaf todo recur 745 - ``` 746 - 747 - **Aliases:** repeat 748 - 749 - ##### set 750 - 751 - Apply a recurrence rule to create repeating task instances. 752 - 753 - Uses iCalendar RRULE syntax (e.g., "FREQ=DAILY" for daily tasks, "FREQ=WEEKLY;BYDAY=MO,WE,FR" 754 - for specific weekdays). When a recurring task is completed, the next instance is 755 - automatically generated. 756 - 757 - Examples: 758 - noteleaf todo recur set 123 --rule "FREQ=DAILY" 759 - noteleaf todo recur set 456 --rule "FREQ=WEEKLY;BYDAY=MO" --until 2024-12-31 760 - 761 - **Usage:** 762 - 763 - ```bash 764 - noteleaf todo recur set [task-id] [flags] 765 - ``` 766 - 767 - **Options:** 768 - 769 - ``` 770 - --rule string Recurrence rule (e.g., FREQ=DAILY) 771 - --until string Recurrence end date (YYYY-MM-DD) 772 - ``` 773 - 774 - ##### clear 775 - 776 - Remove recurrence from a task. 777 - 778 - Converts a recurring task to a one-time task. Existing future instances are not 779 - affected. 780 - 781 - **Usage:** 782 - 783 - ```bash 784 - noteleaf todo recur clear [task-id] 785 - ``` 786 - 787 - ##### show 788 - 789 - Display recurrence rule and schedule information. 790 - 791 - Shows the RRULE pattern, next occurrence date, and recurrence end date if 792 - configured. 793 - 794 - **Usage:** 795 - 796 - ```bash 797 - noteleaf todo recur show [task-id] 798 - ``` 799 - 800 - #### depend 801 - 802 - Create and manage task dependencies. 803 - 804 - Establish relationships where one task must be completed before another can 805 - begin. Useful for multi-step workflows and project management. 806 - 807 - **Usage:** 808 - 809 - ```bash 810 - noteleaf todo depend 811 - ``` 812 - 813 - **Aliases:** dep, deps 814 - 815 - ##### add 816 - 817 - Make a task dependent on another task's completion. 818 - 819 - The first task cannot be started until the second task is completed. Use task 820 - UUIDs to specify dependencies. 821 - 822 - **Usage:** 823 - 824 - ```bash 825 - noteleaf todo depend add [task-id] [depends-on-uuid] 826 - ``` 827 - 828 - ##### remove 829 - 830 - Delete a dependency relationship between two tasks. 831 - 832 - **Usage:** 833 - 834 - ```bash 835 - noteleaf todo depend remove [task-id] [depends-on-uuid] 836 - ``` 837 - 838 - **Aliases:** rm 839 - 840 - ##### list 841 - 842 - Show all tasks that must be completed before this task can be started. 843 - 844 - **Usage:** 845 - 846 - ```bash 847 - noteleaf todo depend list [task-id] 848 - ``` 849 - 850 - **Aliases:** ls 851 - 852 - ##### blocked-by 853 - 854 - Display all tasks that depend on this task's completion. 855 - 856 - **Usage:** 857 - 858 - ```bash 859 - noteleaf todo depend blocked-by [task-id] 860 - ``` 861 -
-91
website/docs/manual/tv-shows.md
··· 1 - --- 2 - id: tv-shows 3 - title: TV Shows 4 - sidebar_position: 6 5 - description: Manage TV show watching 6 - --- 7 - 8 - ## tv 9 - 10 - Track TV shows and episodes. 11 - 12 - Search TMDB for TV shows and add them to your queue. Track which shows you're 13 - currently watching, mark episodes as watched, and maintain a complete history 14 - of your viewing activity. 15 - 16 - ```bash 17 - noteleaf media tv 18 - ``` 19 - 20 - ### Subcommands 21 - 22 - #### add 23 - 24 - Search for TV shows and add them to your watch queue. 25 - 26 - By default, shows search results in a simple list format where you can select by number. 27 - Use the -i flag for an interactive interface with navigation keys. 28 - 29 - **Usage:** 30 - 31 - ```bash 32 - noteleaf media tv add [search query...] [flags] 33 - ``` 34 - 35 - **Options:** 36 - 37 - ``` 38 - -i, --interactive Use interactive interface for TV show selection 39 - ``` 40 - 41 - #### list 42 - 43 - Display TV shows in your queue with optional status filters. 44 - 45 - Shows show titles, air dates, and current status. Filter by --all, --queued, 46 - --watching for shows in progress, or --watched for completed series. Default 47 - shows queued shows only. 48 - 49 - **Usage:** 50 - 51 - ```bash 52 - noteleaf media tv list [--all|--queued|--watching|--watched] 53 - ``` 54 - 55 - #### watching 56 - 57 - Mark a TV show as currently watching. Use this when you start watching a series. 58 - 59 - **Usage:** 60 - 61 - ```bash 62 - noteleaf media tv watching [id] 63 - ``` 64 - 65 - #### watched 66 - 67 - Mark TV show episodes or entire series as watched. 68 - 69 - Updates episode tracking and completion status. Can mark individual episodes 70 - or complete seasons/series depending on ID format. 71 - 72 - **Usage:** 73 - 74 - ```bash 75 - noteleaf media tv watched [id] 76 - ``` 77 - 78 - **Aliases:** seen 79 - 80 - #### remove 81 - 82 - Remove a TV show from your watch queue. Use this for shows you no longer want to track. 83 - 84 - **Usage:** 85 - 86 - ```bash 87 - noteleaf media tv remove [id] 88 - ``` 89 - 90 - **Aliases:** rm 91 -
+9
website/docs/media/_category_.json
··· 1 + { 2 + "label": "Media", 3 + "position": 5, 4 + "link": { 5 + "type": "generated-index", 6 + "title": "Media Tracking", 7 + "description": "Track books, movies, and TV shows without leaving the terminal." 8 + } 9 + }
+100
website/docs/media/books.md
··· 1 + --- 2 + title: Books 3 + sidebar_label: Books 4 + description: Build and maintain your reading list with Open Library metadata. 5 + sidebar_position: 2 6 + --- 7 + 8 + # Books 9 + 10 + The book workflow revolves around Open Library search results. Each command lives under `noteleaf media book`. 11 + 12 + ## Add Books 13 + 14 + Search Open Library and pick a result: 15 + 16 + ```sh 17 + noteleaf media book add "Project Hail Mary" 18 + ``` 19 + 20 + Flags: 21 + 22 + - `-i, --interactive`: open the TUI browser (currently shows your local listโ€”useful for triage). 23 + - Plain mode prints the top five matches inline and prompts for a numeric selection. 24 + 25 + Behind the scenes Noteleaf records the title, authors, edition details, and any subjects returned by the API. New entries start in the `queued` status. 26 + 27 + ## Manage the Reading List 28 + 29 + List and filter: 30 + 31 + ```sh 32 + # Everything 33 + noteleaf media book list --all 34 + 35 + # Only active reads 36 + noteleaf media book list --reading 37 + 38 + # Completed books 39 + noteleaf media book list --finished 40 + ``` 41 + 42 + Each line shows the ID, title, author, status, progress percentage, and any captured metadata (publishers, edition counts, etc.). 43 + 44 + Remove items you no longer care about: 45 + 46 + ```sh 47 + noteleaf media book remove 42 48 + ``` 49 + 50 + ## Track Progress 51 + 52 + You can explicitly set the status: 53 + 54 + ```sh 55 + noteleaf media book reading 7 56 + noteleaf media book finished 7 57 + noteleaf media book update 7 queued 58 + ``` 59 + 60 + But the fastest way is to update the percentage: 61 + 62 + ```sh 63 + noteleaf media book progress 7 45 # Moves status to reading and records start time 64 + noteleaf media book progress 7 100 # Marks finished and records completion time 65 + ``` 66 + 67 + Logic applied automatically: 68 + 69 + - `0%` โ†’ resets to `queued` and clears the โ€œstartedโ€ timestamp. 70 + - `1โ€‘99%` โ†’ flips to `reading` (start time captured). 71 + - `100%` โ†’ marks `finished`, sets end time, and locks progress at 100%. 72 + 73 + ## Reading Lists and Search 74 + 75 + Common workflows: 76 + 77 + - **Focus view**: `noteleaf media book list --reading | fzf` to pick the next session book. 78 + - **Backlog grooming**: `noteleaf media book list --queued` to prune items before they go stale. 79 + - **Author sprint**: pipe the list to `rg` to filter by author (`noteleaf media book list --all | rg "Le Guin"`). 80 + 81 + The TUI (`noteleaf media book add -i` or `noteleaf media book list` with the `--interactive` switch) supports `/` to search titles/authors/notes live and `v` for a detailed preview with timestamps. 82 + 83 + ## Metadata and Notes 84 + 85 + Each record stores: 86 + 87 + - Title & authors (comma separated when multiple). 88 + - Edition count, publishers, subject tags, or cover IDs exposed as inline notes. 89 + - Added/started/finished timestamps. 90 + - Optional page count (if Open Library exposes it). 91 + 92 + Use those IDs anywhere else (tasks or notes). Example note snippet: 93 + 94 + ```markdown 95 + ## Reading Log 96 + - 2024-02-01 โ†’ Started book #7 ("Project Hail Mary") 97 + - 2024-02-05 โ†’ Captured ideas in note #128 linked back to the book. 98 + ``` 99 + 100 + Because media lives in the same database as tasks and notes, full-text search will surface those references instantly.
+75
website/docs/media/movies.md
··· 1 + --- 2 + title: Movies 3 + sidebar_label: Movies 4 + description: Keep track of your movie queue with Rotten Tomatoes metadata. 5 + sidebar_position: 3 6 + --- 7 + 8 + # Movies 9 + 10 + Movie commands hang off `noteleaf media movie`. Results use Rotten Tomatoes search so you get consistent titles plus critic scores. 11 + 12 + ## Add Movies 13 + 14 + ```sh 15 + noteleaf media movie add "The Matrix" 16 + ``` 17 + 18 + What happens: 19 + 20 + 1. The CLI fetches the first five Rotten Tomatoes matches. 21 + 2. You select the right one by number. 22 + 3. The chosen movie is inserted into the local queue with status `queued`. 23 + 24 + The `-i/--interactive` flag is reserved for a future selector; currently the inline prompt is the quickest path. 25 + 26 + ## List and Filter 27 + 28 + ```sh 29 + # Default: queued items only 30 + noteleaf media movie list 31 + 32 + # Include everything 33 + noteleaf media movie list --all 34 + 35 + # Review history 36 + noteleaf media movie list --watched 37 + ``` 38 + 39 + Each entry shows: 40 + 41 + - `ID` and title. 42 + - Release year (if Rotten Tomatoes provided one). 43 + - Status (`queued` or `watched`). 44 + - Critic score snippet (stored inside the Notes column). 45 + - Watched timestamp for completed items. 46 + 47 + ## Mark Movies as Watched 48 + 49 + ```sh 50 + noteleaf media movie watched 12 51 + ``` 52 + 53 + The command sets the status to `watched` and records `watched_at` using the current timestamp. Removing an item uses the same ID: 54 + 55 + ```sh 56 + noteleaf media movie remove 12 57 + ``` 58 + 59 + Use removal for titles you abandoned or added by mistakeโ€”the CLI deletes the database entry so your queue stays focused. 60 + 61 + ## Metadata Cheat Sheet 62 + 63 + - **Notes field**: includes critic score, whether Rotten Tomatoes marked it โ€œCertified Fresh,โ€ and the canonical URL. 64 + - **Rating column**: reserved for future personal ratings; right now it mirrors the upstream critic context. 65 + - **Timestamps**: `added` when you saved it, `watched` when you complete it. 66 + 67 + To keep a running diary, drop the IDs into a note: 68 + 69 + ```markdown 70 + ### Queue Ideas 71 + - Movie #31 โ†’ Watch before sequel comes out 72 + - Movie #12 โ†’ Pair with article #5 for cyberpunk research 73 + ``` 74 + 75 + This keeps everything searchable without having to leave the terminal.
+74
website/docs/media/organization.md
··· 1 + --- 2 + title: Media Organization 3 + sidebar_label: Organization 4 + description: Keep queues manageable with filters, reviews, and note links. 5 + sidebar_position: 5 6 + --- 7 + 8 + # Media Organization 9 + 10 + Media entries share the same database as tasks and notes, so you can cross-reference everything. This page outlines the practical workflows for keeping large queues in check. 11 + 12 + ## Tags and Categories 13 + 14 + Dedicated media tags have not shipped yet. Until they do: 15 + 16 + - Use the free-form `Notes` column (populated automatically from Open Library or Rotten Tomatoes) to stash keywords such as โ€œHugo shortlistโ€ or โ€œDocumentaryโ€. 17 + - When you need stricter structure, create a note that tracks an ad-hoc category and reference media IDs inside it: 18 + 19 + ```markdown 20 + ## Cozy backlog 21 + - Book #11 โ€“ comfort reread 22 + - Movie #25 โ€“ rainy-day pick 23 + ``` 24 + 25 + Full-text search (`noteleaf note list` โ†’ `/` and search) will surface the note instantly, and the numeric IDs jump you right back into the media commands. 26 + 27 + ## Custom Lists 28 + 29 + You already get status-based filters out of the box: 30 + 31 + ```sh 32 + noteleaf media book list --reading 33 + noteleaf media movie list --watched 34 + noteleaf media tv list --all | rg "FX" # filter with ripgrep 35 + ``` 36 + 37 + For more bespoke dashboards: 38 + 39 + 1. Use `noteleaf status` to grab the SQLite path. 40 + 2. Query it with tools like `sqlite-utils` or `datasette` to build spreadsheets or dashboards. 41 + 3. Export subsets via `sqlite3 noteleaf.db "SELECT * FROM books WHERE status='reading'" > reading.csv`. 42 + 43 + That approach keeps the CLI fast while still letting you slice the data any way you need. 44 + 45 + ## Ratings and Reviews 46 + 47 + The database schema already includes a `rating` column for every media type. Rotten Tomatoes/Open Library populate it with critic hints for now; personal star ratings will become editable in a future release. 48 + 49 + Until then, keep reviews as regular notes: 50 + 51 + ```sh 52 + noteleaf note create "Thoughts on Book #7" 53 + ``` 54 + 55 + Inside the note, link back to the record (`Book #7`, `Movie #18`, etc.) so searches tie everything together. Because notes live on disk you can also version-control your reviews. 56 + 57 + ## Linking Media to Notes 58 + 59 + There is no special โ€œlinkโ€ command yet, but the following pattern works well: 60 + 61 + 1. Create a dedicated note per book/movie/show (or per collection). 62 + 2. Add a heading with the media ID and paste the generated markdown path from `noteleaf article view` or the queue list. 63 + 3. Optionally embed checklists or quotes gathered while reading/watching. 64 + 65 + Example snippet: 66 + 67 + ```markdown 68 + ### Book #7 โ€” Project Hail Mary 69 + - Status: reading (45%) 70 + - Tasks: todo #128 covers the experiment described in chapter 12 71 + - Next action: finish Part II before Friday 72 + ``` 73 + 74 + Because tasks, notes, and media share the same SQLite file, future automation can join across them without migrations. When official linking lands it will reuse these IDs, so the prep work you do now keeps paying off.
+53
website/docs/media/overview.md
··· 1 + --- 2 + title: Media Overview 3 + sidebar_label: Overview 4 + description: Manage reading lists and watch queues from the CLI. 5 + sidebar_position: 1 6 + --- 7 + 8 + # Media Tracking Overview 9 + 10 + Noteleaf keeps book, movie, and TV data next to your tasks and notes so you do not need a separate โ€œwatch listโ€ app. 11 + All media commands hang off a single entry point: 12 + 13 + ```sh 14 + noteleaf media <book|movie|tv> <subcommand> 15 + ``` 16 + 17 + - **Books** pull metadata from the Open Library API. 18 + - **Movies/TV** scrape Rotten Tomatoes search results to capture critic scores and canonical titles. 19 + - Everything is stored in the local SQLite database located in your data directory (`~/.local/share/noteleaf` on Linux, `~/Library/Application Support/noteleaf` on macOS, `%LOCALAPPDATA%\noteleaf` on Windows). 20 + 21 + ## Lifecycle Statuses 22 + 23 + | Type | Statuses | Notes | 24 + | ------ | ------------------------------------------ | ------------------------------------------------------------------------------------------------- | 25 + | Books | `queued`, `reading`, `finished`, `removed` | Progress updates automatically bump status (0% โ†’ `queued`, 1-99% โ†’ `reading`, 100% โ†’ `finished`). | 26 + | Movies | `queued`, `watched`, `removed` | Marking as watched stores the completion timestamp. | 27 + | TV | `queued`, `watching`, `watched`, `removed` | Watching/watched commands also record the last watched time. | 28 + 29 + Statuses control list filtering and show up beside each item in the TUI. 30 + 31 + ## Metadata That Gets Saved 32 + 33 + - **Books**: title, authors, Open Library notes (editions, publishers, subjects), started/finished timestamps, progress percentage. 34 + - **Movies**: release year when available, Rotten Tomatoes critic score details inside the notes field, watched timestamp. 35 + - **TV**: show title plus critic score details, optional season/episode numbers, last watched timestamp. 36 + 37 + You can safely edit the generated markdown/notes in your favorite editorโ€”the records keep pointing to the updated files. 38 + 39 + ## Interactive vs Static Workflows 40 + 41 + All `list` commands default to a simple textual table. For books you can pass `-i/--interactive` to open the Bubble Tea list browser (TV and movie interactive selectors are planned). Inside the list view: 42 + 43 + - `j/k` or arrow keys move between entries. 44 + - `/` starts search across titles, authors, and metadata. 45 + - `v` opens a focused preview. 46 + - `?` shows all shortcuts. 47 + 48 + If you prefer scripts, combine the static lists with tools like `rg` or `jq`. 49 + 50 + ## Storage Layout 51 + 52 + Media records live in the SQLite database (`noteleaf.db`). Binary assets are not downloaded; the metadata stores canonical URLs so you can jump back to the source at any time. 53 + Use `noteleaf status` to see the exact paths for your database, data directory, and configuration file.
+64
website/docs/media/tv.md
··· 1 + --- 2 + title: TV Shows 3 + sidebar_label: TV Shows 4 + description: Track long-form series with simple queue management. 5 + sidebar_position: 4 6 + --- 7 + 8 + # TV Shows 9 + 10 + TV commands live under `noteleaf media tv`. Like movies, they use Rotten Tomatoes search so you can trust the spelling and canonical links. 11 + 12 + ## Add Shows 13 + 14 + ```sh 15 + noteleaf media tv add "Breaking Bad" 16 + ``` 17 + 18 + - Inline mode shows up to five matches and asks you to choose. 19 + - `-i/--interactive` is wired up for the future list selector. 20 + 21 + Every new show starts as `queued`. 22 + 23 + ## List the Queue 24 + 25 + ```sh 26 + noteleaf media tv list # queued shows 27 + noteleaf media tv list --watching # in-progress series 28 + noteleaf media tv list --watched # finished shows 29 + noteleaf media tv list --all # everything 30 + ``` 31 + 32 + Output includes the ID, title, optional season/episode numbers (once those fields are set), status, critic-score snippet, and timestamps. 33 + 34 + ## Update Status 35 + 36 + Use semantic verbs instead of editing the status manually: 37 + 38 + ```sh 39 + noteleaf media tv watching 8 # Moved to โ€œcurrently watchingโ€ 40 + noteleaf media tv watched 8 # Mark completed 41 + noteleaf media tv remove 8 # Drop from the queue entirely 42 + ``` 43 + 44 + Each transition records `last_watched` so you know when you left off. Future releases will expose explicit season/episode commands; until then store quick reminders in a linked note: 45 + 46 + ```markdown 47 + ### TV checklist 48 + - TV #8 โ€” resume Season 3 Episode 5 49 + - TV #15 โ€” waiting for new season announcement 50 + ``` 51 + 52 + ## Organization Tips 53 + 54 + - Use `noteleaf media tv list --watching | fzf` to pick tonightโ€™s episode. 55 + - Pipe `--all` into `rg "HBO"` to filter on the metadata snippet that contains the network/URL. 56 + - Include `TV #ID` references in your weekly review note so you can jump back with a single ID lookup. 57 + 58 + ## What Gets Stored 59 + 60 + - Rotten Tomatoes critic info plus canonical URL (inside the Notes column). 61 + - Optional season/episode integers for future episode tracking (already part of the schema). 62 + - Added timestamps and โ€œlast watchedโ€ timestamps. 63 + 64 + Because shows can last months, keeping the queue short (just what you plan to watch soon) makes the `list` output far easier to scan.
+9
website/docs/notes/_category_.json
··· 1 + { 2 + "label": "Notes", 3 + "position": 4, 4 + "link": { 5 + "type": "generated-index", 6 + "title": "Notes", 7 + "description": "Everything about Noteleaf's markdown knowledge base." 8 + } 9 + }
+61
website/docs/notes/advanced.md
··· 1 + --- 2 + title: Advanced Note Features 3 + sidebar_label: Advanced 4 + description: Search, exports, backlinks, and automation tips. 5 + sidebar_position: 5 6 + --- 7 + 8 + # Advanced Note Features 9 + 10 + ## Full-Text Search 11 + 12 + While not exposed as a dedicated command, you can search note content using the database: 13 + 14 + **Search with grep** (searches file content): 15 + 16 + ```sh 17 + grep -r "search term" ~/.local/share/noteleaf/notes/ 18 + ``` 19 + 20 + **Search titles and metadata**: 21 + 22 + ```sh 23 + noteleaf note list --static | grep "keyword" 24 + ``` 25 + 26 + Future versions may include built-in full-text search with relevance ranking. 27 + 28 + ## Note Exports 29 + 30 + Export notes to different formats using standard markdown tools: 31 + 32 + **Convert to HTML with pandoc**: 33 + 34 + ```sh 35 + noteleaf note view 1 --format=raw | pandoc -o output.html 36 + ``` 37 + 38 + **Convert to PDF**: 39 + 40 + ```sh 41 + noteleaf note view 1 --format=raw | pandoc -o output.pdf 42 + ``` 43 + 44 + **Batch export all notes**: 45 + 46 + ```sh 47 + for note in ~/.local/share/noteleaf/notes/*.md; do 48 + pandoc "$note" -o "${note%.md}.html" 49 + done 50 + ``` 51 + 52 + ## Backlinks and References 53 + 54 + Manually create backlinks between notes using markdown links: 55 + 56 + ```markdown 57 + See also: [[Research on Authentication]] for background 58 + Related: [[API Design Principles]] 59 + ``` 60 + 61 + While Noteleaf doesn't automatically parse or display backlinks yet, this syntax prepares notes for future backlink support and works with tools like Obsidian if you point it at the notes directory.
+57
website/docs/notes/basics.md
··· 1 + --- 2 + title: Note Basics 3 + sidebar_label: Basics 4 + description: Creating notes, metadata, and storage model. 5 + sidebar_position: 2 6 + --- 7 + 8 + # Note Basics 9 + 10 + ## Creation 11 + 12 + **Quick note from command line**: 13 + 14 + ```sh 15 + noteleaf note create "Meeting Notes" "Discussed Q4 roadmap and hiring plans" 16 + ``` 17 + 18 + **Interactive creation** (opens editor): 19 + 20 + ```sh 21 + noteleaf note create --interactive 22 + ``` 23 + 24 + **From existing file**: 25 + 26 + ```sh 27 + noteleaf note create --file ~/Documents/draft.md 28 + ``` 29 + 30 + **Create and immediately edit**: 31 + 32 + ```sh 33 + noteleaf note create "Research Notes" --editor 34 + ``` 35 + 36 + ## Structure 37 + 38 + Notes consist of: 39 + 40 + **Title**: Short descriptor shown in lists and searches. Can be updated later. 41 + 42 + **Content**: Full markdown text. Supports all standard markdown features including code blocks, lists, tables, and links. 43 + 44 + **Tags**: Categorization labels for organizing and filtering notes. Multiple tags per note. 45 + 46 + **Dates**: Creation and modification timestamps tracked automatically. 47 + 48 + **File Path**: Location of the markdown file on disk, managed by Noteleaf. 49 + 50 + ## Storage 51 + 52 + **File Location**: Notes are stored as individual `.md` files in your notes directory (typically `~/.local/share/noteleaf/notes` or `~/Library/Application Support/noteleaf/notes`). 53 + 54 + **Naming**: Files are named with a UUID to ensure uniqueness. The title is stored in the database, not the filename. 55 + 56 + **Portability**: Since notes are plain markdown, you can read them with any text editor or markdown viewer. 57 + The database provides additional functionality like tagging and search, but the files remain standalone.
+28
website/docs/notes/best-practices.md
··· 1 + --- 2 + title: Note Tips and Best Practices 3 + sidebar_label: Best Practices 4 + description: Guidelines for keeping notes useful over time. 5 + sidebar_position: 8 6 + --- 7 + 8 + # Note Tips and Best Practices 9 + 10 + **Write in plain language**: Notes are for your future self. Avoid jargon you might forget. 11 + 12 + **Tag consistently**: Establish a tagging taxonomy early and stick to it. Review tags periodically with `noteleaf note tags`. 13 + 14 + **Link liberally**: Reference related notes, tasks, and articles. Future features will leverage these connections. 15 + 16 + **Short, focused notes**: Better to have many small notes than few giant ones. Easier to link and reuse. 17 + 18 + **Regular review**: Schedule time to review notes, add tags, create links, and archive outdated content. 19 + 20 + **Edit immediately**: If you notice incomplete or unclear notes, edit them now. Stale notes lose value. 21 + 22 + **Use your editor**: Configure your favorite editor with markdown plugins for better syntax highlighting and live preview. 23 + 24 + **Backup regularly**: While notes are files, backup both the notes directory and the database to preserve metadata. 25 + 26 + **Experiment with formats**: Try different note structures (journal, zettelkasten, topic-based) to find what works for you. 27 + 28 + For CLI command reference, run `noteleaf note --help` or open the contextual help inside the TUI.
+103
website/docs/notes/markdown.md
··· 1 + --- 2 + title: Markdown Support 3 + sidebar_label: Markdown 4 + description: Reference for GitHub-Flavored Markdown features. 5 + sidebar_position: 6 6 + --- 7 + 8 + # Markdown Support 9 + 10 + Noteleaf notes support full GitHub-Flavored Markdown: 11 + 12 + ## Headers 13 + 14 + ```markdown 15 + # Level 1 16 + ## Level 2 17 + ### Level 3 18 + ``` 19 + 20 + ## Text Formatting 21 + 22 + ```markdown 23 + **bold** 24 + *italic* 25 + ***bold and italic*** 26 + ~~strikethrough~~ 27 + `inline code` 28 + ``` 29 + 30 + ## Lists 31 + 32 + ```markdown 33 + - Unordered item 34 + - Another item 35 + - Nested item 36 + 37 + 1. Ordered item 38 + 2. Second item 39 + 1. Nested ordered 40 + ``` 41 + 42 + ## Task Lists 43 + 44 + ```markdown 45 + - [x] Completed task 46 + - [ ] Pending task 47 + - [ ] Another pending 48 + ``` 49 + 50 + ## Links 51 + 52 + ```markdown 53 + [Link text](https://example.com) 54 + [Reference link][ref] 55 + 56 + [ref]: https://example.com 57 + ``` 58 + 59 + ## Images 60 + 61 + ```markdown 62 + ![Alt text](path/to/image.png) 63 + ![Remote image](https://example.com/image.png) 64 + ``` 65 + 66 + ## Code Blocks 67 + 68 + ````markdown 69 + ```python 70 + def hello(): 71 + print("Hello, world!") 72 + ``` 73 + 74 + ```javascript 75 + const greet = () => console.log("Hello!"); 76 + ``` 77 + ```` 78 + 79 + ## Tables 80 + 81 + ```markdown 82 + | Header 1 | Header 2 | 83 + |----------|----------| 84 + | Cell 1 | Cell 2 | 85 + | Cell 3 | Cell 4 | 86 + ``` 87 + 88 + ## Blockquotes 89 + 90 + ```markdown 91 + > This is a quote 92 + > spanning multiple lines 93 + > 94 + > With multiple paragraphs 95 + ``` 96 + 97 + ## Horizontal Rules 98 + 99 + ```markdown 100 + --- 101 + *** 102 + ___ 103 + ```
+73
website/docs/notes/operations.md
··· 1 + --- 2 + title: Note Operations 3 + sidebar_label: Operations 4 + description: List, read, edit, and delete notes from the CLI. 5 + sidebar_position: 3 6 + --- 7 + 8 + # Note Operations 9 + 10 + ### Listing Notes 11 + 12 + **Interactive TUI** (default): 13 + ```sh 14 + noteleaf note list 15 + ``` 16 + 17 + Navigate with arrow keys, press Enter to read, `e` to edit, `q` to quit. 18 + 19 + **Static list**: 20 + ```sh 21 + noteleaf note list --static 22 + ``` 23 + 24 + **Filter by tags**: 25 + ```sh 26 + noteleaf note list --tags research,technical 27 + ``` 28 + 29 + **Show archived notes**: 30 + ```sh 31 + noteleaf note list --archived 32 + ``` 33 + 34 + ### Reading Notes 35 + 36 + View note content with formatted rendering: 37 + 38 + ```sh 39 + noteleaf note read 1 40 + ``` 41 + 42 + Aliases: `noteleaf note view 1` 43 + 44 + The viewer renders markdown with syntax highlighting for code blocks, proper formatting for headers and lists, and displays metadata (title, tags, dates). 45 + 46 + ### Editing Notes 47 + 48 + Open note in your configured editor: 49 + 50 + ```sh 51 + noteleaf note edit 1 52 + ``` 53 + 54 + Noteleaf uses the editor specified in your configuration or the `$EDITOR` environment variable. Common choices: `vim`, `nvim`, `nano`, `code`, `emacs`. 55 + 56 + **Configure editor**: 57 + ```sh 58 + noteleaf config set editor nvim 59 + ``` 60 + 61 + Changes are saved automatically when you close the editor. The modification timestamp updates to track when notes were last changed. 62 + 63 + ### Deleting Notes 64 + 65 + Remove a note permanently: 66 + 67 + ```sh 68 + noteleaf note remove 1 69 + ``` 70 + 71 + Aliases: `rm`, `delete`, `del` 72 + 73 + This deletes both the markdown file and database metadata. You'll be prompted for confirmation. This operation cannot be undone, so consider archiving instead if you might need the note later.
+116
website/docs/notes/organization.md
··· 1 + --- 2 + title: Note Organization 3 + sidebar_label: Organization 4 + description: Tagging, linking, and template workflows for notes. 5 + sidebar_position: 4 6 + --- 7 + 8 + # Note Organization 9 + 10 + ## Tagging 11 + 12 + Tags provide flexible categorization without hierarchical constraints. 13 + 14 + **Add tags during creation**: 15 + 16 + ```sh 17 + noteleaf note create "API Design" --tags architecture,reference 18 + ``` 19 + 20 + **Add tags to existing note**: 21 + 22 + ```sh 23 + noteleaf note update 1 --add-tag reference 24 + ``` 25 + 26 + **Remove tags**: 27 + 28 + ```sh 29 + noteleaf note update 1 --remove-tag draft 30 + ``` 31 + 32 + **List all tags**: 33 + 34 + ```sh 35 + noteleaf note tags 36 + ``` 37 + 38 + Shows each tag with the count of notes using it. 39 + 40 + **Tag naming conventions**: Use lowercase, hyphens for compound tags. Examples: `research`, `meeting-notes`, `how-to`, `reference`, `technical`, `personal`. 41 + 42 + ## Linking 43 + 44 + While not a first-class feature in the current UI, notes can reference tasks by ID or description: 45 + 46 + ```markdown 47 + # Implementation Plan 48 + 49 + Related task: #42 (Deploy authentication service) 50 + 51 + ## Next Steps 52 + - Complete testing (task #43) 53 + - Write documentation (task #44) 54 + ``` 55 + 56 + Future versions may support automatic linking between notes and tasks in the database. 57 + 58 + ## Templates 59 + 60 + Create reusable note structures using shell functions or scripts: 61 + 62 + **In ~/.bashrc or ~/.zshrc**: 63 + 64 + ```sh 65 + meeting_note() { 66 + local title="Meeting: $1" 67 + local date=$(date +%Y-%m-%d) 68 + local content="# $title 69 + 70 + **Date**: $date 71 + 72 + ## Attendees 73 + - 74 + 75 + ## Agenda 76 + - 77 + 78 + ## Discussion 79 + - 80 + 81 + ## Action Items 82 + - [ ] 83 + 84 + ## Next Meeting 85 + - " 86 + 87 + echo "$content" | noteleaf note create "$title" --tags meeting --editor 88 + } 89 + 90 + daily_note() { 91 + local date=$(date +%Y-%m-%d) 92 + local title="Daily: $date" 93 + local content="# $title 94 + 95 + ## Completed Today 96 + - 97 + 98 + ## In Progress 99 + - 100 + 101 + ## Tomorrow's Focus 102 + - 103 + 104 + ## Notes 105 + - " 106 + 107 + echo "$content" | noteleaf note create "$title" --tags daily --editor 108 + } 109 + ``` 110 + 111 + Usage: 112 + 113 + ```sh 114 + meeting_note "Q4 Planning" 115 + daily_note 116 + ```
+11
website/docs/notes/overview.md
··· 1 + --- 2 + title: Notes Overview 3 + sidebar_label: Overview 4 + description: How Noteleaf manages markdown-based notes. 5 + sidebar_position: 1 6 + --- 7 + 8 + # Notes Overview 9 + 10 + Noteleaf provides a markdown-based note-taking system integrated with your tasks, articles, and media tracking. 11 + Notes are stored as individual markdown files with metadata tracked in the database, giving you both structure and portability.
+85
website/docs/notes/workflows.md
··· 1 + --- 2 + title: Note-Taking Workflows 3 + sidebar_label: Workflows 4 + description: Zettelkasten, meeting notes, daily notes, and more. 5 + sidebar_position: 7 6 + --- 7 + 8 + # Note-Taking Workflows 9 + 10 + ## Zettelkasten 11 + 12 + Zettelkasten emphasizes atomic notes with heavy linking: 13 + 14 + 1. **Create atomic notes**: Each note covers one concept 15 + 2. **Add descriptive tags**: Use tags for categorization 16 + 3. **Link related notes**: Reference other notes by title 17 + 4. **Develop ideas over time**: Expand notes with new insights 18 + 19 + Example: 20 + 21 + ```sh 22 + noteleaf note create "Dependency Injection" --tags architecture,patterns 23 + noteleaf note create "Inversion of Control" --tags architecture,patterns 24 + # In each note, reference the other 25 + ``` 26 + 27 + ### Research 28 + 29 + For academic or technical research: 30 + 31 + 1. **Source note per paper/article**: Create note for each source 32 + 2. **Extract key points**: Summarize in your own words 33 + 3. **Tag by topic**: Use consistent tags across research area 34 + 4. **Link to related work**: Reference other sources 35 + 36 + Example: 37 + 38 + ```sh 39 + noteleaf note create "Paper: Microservices Patterns" \ 40 + --tags research,architecture,microservices 41 + ``` 42 + 43 + ### Meeting 44 + 45 + Capture discussions and action items: 46 + 47 + 1. **Template-based**: Use meeting_note function from earlier 48 + 2. **Consistent structure**: Attendees, agenda, discussion, actions 49 + 3. **Action items**: Extract as tasks for follow-up 50 + 4. **Link to projects**: Tag with project name 51 + 52 + Example: 53 + 54 + ```sh 55 + meeting_note "Sprint Planning" 56 + # Then extract action items as tasks 57 + noteleaf task add "Implement auth endpoint" --project web-service 58 + ``` 59 + 60 + ### Daily 61 + 62 + Journal-style daily entries: 63 + 64 + 1. **Daily template**: Use daily_note function 65 + 2. **Reflect on work**: What was accomplished, what's next 66 + 3. **Capture ideas**: Random thoughts for later processing 67 + 4. **Review weekly**: Scan week's notes for patterns 68 + 69 + Example: 70 + 71 + ```sh 72 + daily_note 73 + # Creates note tagged with 'daily' and today's date 74 + ``` 75 + 76 + ### Personal Knowledge Base 77 + 78 + Build a reference library: 79 + 80 + 1. **How-to guides**: Document procedures and commands 81 + 2. **Troubleshooting notes**: Solutions to problems encountered 82 + 3. **Concept explanations**: Notes on topics you're learning 83 + 4. **Snippets**: Code examples and configurations 84 + 85 + Use tags like: `how-to`, `troubleshooting`, `reference`, `snippet`
+9
website/docs/tasks/_category_.json
··· 1 + { 2 + "label": "Tasks", 3 + "position": 3, 4 + "link": { 5 + "type": "generated-index", 6 + "title": "Task Management", 7 + "description": "Deep dives into scheduling, tracking, and organizing work." 8 + } 9 + }
+106
website/docs/tasks/advanced.md
··· 1 + --- 2 + title: Advanced Task Features 3 + sidebar_label: Advanced 4 + description: Recurring tasks, dependencies, hierarchies, and custom fields. 5 + sidebar_position: 6 6 + --- 7 + 8 + # Advanced Task Features 9 + 10 + ## Recurrence 11 + 12 + Create tasks that repeat on a schedule using iCalendar recurrence rules. 13 + 14 + **Daily task**: 15 + 16 + ```sh 17 + noteleaf task add "Daily standup" --recur "FREQ=DAILY" 18 + ``` 19 + 20 + **Weekly task on specific days**: 21 + 22 + ```sh 23 + noteleaf task add "Team meeting" --recur "FREQ=WEEKLY;BYDAY=MO,WE" 24 + ``` 25 + 26 + **Monthly task**: 27 + 28 + ```sh 29 + noteleaf task add "Invoice review" --recur "FREQ=MONTHLY;BYMONTHDAY=1" 30 + ``` 31 + 32 + **With end date**: 33 + 34 + ```sh 35 + noteleaf task add "Q1 review" \ 36 + --recur "FREQ=WEEKLY" \ 37 + --until 2025-03-31 38 + ``` 39 + 40 + **Manage recurrence**: 41 + 42 + Set recurrence on existing task: 43 + 44 + ```sh 45 + noteleaf task recur set 1 --rule "FREQ=DAILY" 46 + ``` 47 + 48 + View recurrence info: 49 + 50 + ```sh 51 + noteleaf task recur show 1 52 + ``` 53 + 54 + Remove recurrence: 55 + 56 + ```sh 57 + noteleaf task recur clear 1 58 + ``` 59 + 60 + When you complete a recurring task, Noteleaf automatically generates the next instance based on the recurrence rule. 61 + 62 + ## Dependencies 63 + 64 + Create relationships where tasks must be completed in order. 65 + 66 + **Add dependency** (task 1 depends on task 2): 67 + 68 + ```sh 69 + noteleaf task depend add 1 <uuid-of-task-2> 70 + ``` 71 + 72 + **List dependencies** (what must be done first): 73 + 74 + ```sh 75 + noteleaf task depend list 1 76 + ``` 77 + 78 + **List blocked tasks** (what's waiting on this task): 79 + 80 + ```sh 81 + noteleaf task depend blocked-by 1 82 + ``` 83 + 84 + **Remove dependency**: 85 + 86 + ```sh 87 + noteleaf task depend remove 1 <uuid-of-task-2> 88 + ``` 89 + 90 + Dependencies use task UUIDs (shown in `task view`) rather than IDs for stability across database changes. 91 + 92 + ## Hierarchical Tasks 93 + 94 + Create parent-child relationships for breaking down large tasks. 95 + 96 + **Create child task**: 97 + 98 + ```sh 99 + noteleaf task add "Write API documentation" --parent <parent-uuid> 100 + ``` 101 + 102 + Parent tasks can have multiple children, creating a tree structure for complex projects. 103 + 104 + ## Custom Attributes 105 + 106 + While not exposed through specific flags, the database schema supports extending tasks with custom attributes for advanced use cases or scripting.
+85
website/docs/tasks/basics.md
··· 1 + --- 2 + title: Task Basics 3 + sidebar_label: Basics 4 + description: Create tasks and understand their core attributes. 5 + sidebar_position: 2 6 + --- 7 + 8 + # Task Basics 9 + 10 + ## Creation 11 + 12 + Create a simple task: 13 + 14 + ```sh 15 + noteleaf task add "Write documentation" 16 + ``` 17 + 18 + Create a task with attributes: 19 + 20 + ```sh 21 + noteleaf task add "Review pull requests" \ 22 + --priority high \ 23 + --project work \ 24 + --tags urgent,code-review \ 25 + --due 2025-01-15 26 + ``` 27 + 28 + ## Properties 29 + 30 + **Description**: What needs to be done. Can be updated later with `task update`. 31 + 32 + **Status**: Task lifecycle state: 33 + 34 + - `pending`: Not yet started (default for new tasks) 35 + - `active`: Currently being worked on 36 + - `completed`: Finished successfully 37 + - `deleted`: Removed but preserved for history 38 + - `waiting`: Blocked or postponed 39 + 40 + **Priority**: Importance level affects sorting and display: 41 + 42 + - `low`: Nice to have, defer if busy 43 + - `medium`: Standard priority (default) 44 + - `high`: Important, should be done soon 45 + - `urgent`: Critical, top of the list 46 + 47 + **Project**: Group related tasks together. Examples: `work`, `home`, `side-project`. Projects create organizational boundaries and enable filtering. 48 + 49 + **Context**: Location or mode where task can be done. Examples: `@home`, `@office`, `@phone`, `@computer`. Contexts help filter tasks based on current situation. 50 + 51 + **Tags**: Flexible categorization orthogonal to projects. Examples: `urgent`, `quick-win`, `research`, `bug`. Multiple tags per task. 52 + 53 + **Due Date**: When the task should be completed. Format: `YYYY-MM-DD` or relative (`tomorrow`, `next week`). 54 + 55 + ### Lifecycle 56 + 57 + Tasks move through statuses as work progresses: 58 + 59 + ``` 60 + pending -> active -> completed 61 + | 62 + v 63 + waiting 64 + | 65 + v 66 + deleted 67 + ``` 68 + 69 + **Mark task as active**: 70 + 71 + ```sh 72 + noteleaf task update 1 --status active 73 + ``` 74 + 75 + **Complete a task**: 76 + 77 + ```sh 78 + noteleaf task done 1 79 + ``` 80 + 81 + **Delete a task**: 82 + 83 + ```sh 84 + noteleaf task delete 1 85 + ```
+26
website/docs/tasks/batch-operations.md
··· 1 + --- 2 + title: Batch Operations 3 + sidebar_label: Batch Ops 4 + description: Use shell scripting patterns for mass task edits. 5 + sidebar_position: 8 6 + --- 7 + 8 + # Batch Operations 9 + 10 + While Noteleaf doesn't have built-in bulk update commands, you can use shell scripting for batch operations: 11 + 12 + **Complete all tasks in a project**: 13 + 14 + ```sh 15 + noteleaf task list --project old-project --static | \ 16 + awk '{print $1}' | \ 17 + xargs -I {} noteleaf task done {} 18 + ``` 19 + 20 + **Add tag to multiple tasks**: 21 + 22 + ```sh 23 + for id in 1 2 3 4 5; do 24 + noteleaf task update $id --add-tag urgent 25 + done 26 + ```
+26
website/docs/tasks/best-practices.md
··· 1 + --- 2 + title: Task Tips and Best Practices 3 + sidebar_label: Best Practices 4 + description: Practical guidance for staying productive with tasks. 5 + sidebar_position: 10 6 + --- 7 + 8 + # Task Tips and Best Practices 9 + 10 + **Start with simple workflows**: Don't over-organize initially. Use basic priorities and projects before adding contexts, tags, and dependencies. 11 + 12 + **Review regularly**: Use `task list` daily to check pending work. Weekly reviews help catch stale tasks. 13 + 14 + **Use contexts for GTD**: If following Getting Things Done, contexts help filter tasks by what you can do right now. 15 + 16 + **Project-based work**: For complex initiatives, use projects to group tasks and dependencies to order work. 17 + 18 + **Time tracking for accountability**: Even rough time tracking reveals where hours go and helps with estimates. 19 + 20 + **Recurrence for habits**: Use recurring tasks for daily/weekly habits, but keep the list short to avoid clutter. 21 + 22 + **Tags for cross-cutting concerns**: Use tags for themes that span projects: `urgent`, `blocked`, `waiting-on-feedback`, `quick-win`. 23 + 24 + **JSON output for scripts**: Use `--json` flag with scripting to build custom reports and integrations. 25 + 26 + For CLI command reference, run `noteleaf task --help` or explore the inline help on each subcommand.
+114
website/docs/tasks/operations.md
··· 1 + --- 2 + title: Task Operations 3 + sidebar_label: Operations 4 + description: List, view, and update tasks from the CLI and TUI. 5 + sidebar_position: 3 6 + --- 7 + 8 + # Task Operations 9 + 10 + ## Listing and Filtering 11 + 12 + **Interactive list** (default): 13 + 14 + ```sh 15 + noteleaf task list 16 + ``` 17 + 18 + Navigate with arrow keys, press Enter to view details, `q` to quit. 19 + 20 + **Static list** (for scripting): 21 + 22 + ```sh 23 + noteleaf task list --static 24 + ``` 25 + 26 + **Filter by status**: 27 + 28 + ```sh 29 + noteleaf task list --status pending 30 + noteleaf task list --status completed 31 + ``` 32 + 33 + **Filter by project**: 34 + 35 + ```sh 36 + noteleaf task list --project work 37 + ``` 38 + 39 + **Filter by priority**: 40 + 41 + ```sh 42 + noteleaf task list --priority high 43 + ``` 44 + 45 + **Filter by context**: 46 + 47 + ```sh 48 + noteleaf task list --context @office 49 + ``` 50 + 51 + **Show all tasks** (including completed): 52 + 53 + ```sh 54 + noteleaf task list --all 55 + ``` 56 + 57 + ## Viewing Task Details 58 + 59 + View complete task information: 60 + 61 + ```sh 62 + noteleaf task view 1 63 + ``` 64 + 65 + JSON output for scripts: 66 + 67 + ```sh 68 + noteleaf task view 1 --json 69 + ``` 70 + 71 + Brief format without metadata: 72 + 73 + ```sh 74 + noteleaf task view 1 --format brief 75 + ``` 76 + 77 + ## Updating Tasks 78 + 79 + Update single attribute: 80 + 81 + ```sh 82 + noteleaf task update 1 --priority urgent 83 + ``` 84 + 85 + Update multiple attributes: 86 + 87 + ```sh 88 + noteleaf task update 1 \ 89 + --priority urgent \ 90 + --due tomorrow \ 91 + --add-tag critical 92 + ``` 93 + 94 + Change description: 95 + 96 + ```sh 97 + noteleaf task update 1 --description "New task description" 98 + ``` 99 + 100 + Add and remove tags: 101 + 102 + ```sh 103 + noteleaf task update 1 --add-tag urgent --remove-tag later 104 + ``` 105 + 106 + ## Interactive Editing 107 + 108 + Open interactive editor for complex changes: 109 + 110 + ```sh 111 + noteleaf task edit 1 112 + ``` 113 + 114 + This provides a TUI with visual pickers for status and priority, making updates faster than command flags.
+64
website/docs/tasks/organization.md
··· 1 + --- 2 + title: Task Organization 3 + sidebar_label: Organization 4 + description: Use projects, contexts, and tags to structure work. 5 + sidebar_position: 5 6 + --- 7 + 8 + # Task Organization 9 + 10 + ## Projects 11 + 12 + Projects group related tasks. Useful for separating work contexts or major initiatives. 13 + 14 + **List all projects**: 15 + 16 + ```sh 17 + noteleaf task projects 18 + ``` 19 + 20 + Shows each project with task count. 21 + 22 + **Filter tasks by project**: 23 + 24 + ```sh 25 + noteleaf task list --project work 26 + ``` 27 + 28 + **Project naming**: Use lowercase, hyphens for spaces. Examples: `work`, `side-project`, `home-improvement`. 29 + 30 + ## Contexts 31 + 32 + Contexts represent where or how a task can be done. Helps with GTD-style workflow. 33 + 34 + **List all contexts**: 35 + 36 + ```sh 37 + noteleaf task contexts 38 + ``` 39 + 40 + **Filter by context**: 41 + 42 + ```sh 43 + noteleaf task list --context @home 44 + ``` 45 + 46 + **Context naming**: Prefix with `@` following GTD convention. Examples: `@home`, `@office`, `@phone`, `@errands`. 47 + 48 + ## Tags 49 + 50 + Tags provide flexible categorization. Unlike projects and contexts, tasks can have multiple tags. 51 + 52 + **List all tags**: 53 + 54 + ```sh 55 + noteleaf task tags 56 + ``` 57 + 58 + **Filter by tags** (tasks must have all specified tags): 59 + 60 + ```sh 61 + noteleaf task list --tags urgent,bug 62 + ``` 63 + 64 + **Tag naming**: Use lowercase, hyphens for compound tags. Examples: `urgent`, `quick-win`, `code-review`, `waiting-on-feedback`.
+11
website/docs/tasks/overview.md
··· 1 + --- 2 + title: Task Management Overview 3 + sidebar_label: Overview 4 + description: High-level summary of Noteleaf's task workflow. 5 + sidebar_position: 1 6 + --- 7 + 8 + # Task Management Overview 9 + 10 + Noteleaf provides TaskWarrior-inspired task management with priorities, projects, contexts, tags, dependencies, and time tracking. 11 + Whether you're managing personal todos or complex projects, Noteleaf helps you organize work and track progress.
+33
website/docs/tasks/queries.md
··· 1 + --- 2 + title: Task Queries and Filtering 3 + sidebar_label: Queries 4 + description: Compose filters for precise task lists and reports. 5 + sidebar_position: 7 6 + --- 7 + 8 + # Task Queries and Filtering 9 + 10 + Combine filters for precise task lists: 11 + 12 + **High priority work tasks due this week**: 13 + 14 + ```sh 15 + noteleaf task list \ 16 + --project work \ 17 + --priority high \ 18 + --status pending 19 + ``` 20 + 21 + **All completed tasks from specific project**: 22 + 23 + ```sh 24 + noteleaf task list \ 25 + --project side-project \ 26 + --status completed 27 + ``` 28 + 29 + **Quick wins** (tasks tagged as quick): 30 + 31 + ```sh 32 + noteleaf task list --tags quick-win 33 + ```
+34
website/docs/tasks/templates.md
··· 1 + --- 2 + title: Task Templates 3 + sidebar_label: Templates 4 + description: Shell helpers for creating consistent task structures. 5 + sidebar_position: 9 6 + --- 7 + 8 + # Task Templates 9 + 10 + While templates aren't built-in, you can create shell functions for common task patterns: 11 + 12 + ```sh 13 + # In your ~/.bashrc or ~/.zshrc 14 + bug() { 15 + noteleaf task add "$1" \ 16 + --project $(git rev-parse --show-toplevel | xargs basename) \ 17 + --tags bug \ 18 + --priority high 19 + } 20 + 21 + meeting() { 22 + noteleaf task add "$1" \ 23 + --project work \ 24 + --context @office \ 25 + --recur "FREQ=WEEKLY;BYDAY=$2" 26 + } 27 + ``` 28 + 29 + Usage: 30 + 31 + ```sh 32 + bug "Fix login redirect" 33 + meeting "Sprint planning" "MO" 34 + ```
+60
website/docs/tasks/time-tracking.md
··· 1 + --- 2 + title: Time Tracking 3 + sidebar_label: Time Tracking 4 + description: Track work, review sessions, and generate timesheets. 5 + sidebar_position: 4 6 + --- 7 + 8 + # Time Tracking 9 + 10 + Track hours spent on tasks for billing, reporting, or personal analytics. 11 + 12 + ## Starting and Stopping 13 + 14 + **Start tracking**: 15 + 16 + ```sh 17 + noteleaf task start 1 18 + ``` 19 + 20 + With a note about what you're doing: 21 + 22 + ```sh 23 + noteleaf task start 1 --note "Implementing authentication" 24 + ``` 25 + 26 + **Stop tracking**: 27 + 28 + ```sh 29 + noteleaf task stop 1 30 + ``` 31 + 32 + Only one task can be actively tracked at a time. 33 + 34 + ## Viewing Timesheets 35 + 36 + **Last 7 days** (default): 37 + 38 + ```sh 39 + noteleaf task timesheet 40 + ``` 41 + 42 + **Specific time range**: 43 + 44 + ```sh 45 + noteleaf task timesheet --days 30 46 + ``` 47 + 48 + **For specific task**: 49 + 50 + ```sh 51 + noteleaf task timesheet --task 1 52 + ``` 53 + 54 + Timesheet shows: 55 + 56 + - Date and time range for each session 57 + - Duration 58 + - Notes attached to the session 59 + - Total time per task 60 + - Total time across all tasks
+44 -6
website/docusaurus.config.ts
··· 1 1 import { themes as prismThemes } from "prism-react-renderer"; 2 2 import type { Config } from "@docusaurus/types"; 3 3 import type * as Preset from "@docusaurus/preset-classic"; 4 + import type { SidebarsConfig } from "@docusaurus/plugin-content-docs"; 4 5 5 6 const ghURL = "https://github.com/stormlightlabs/noteleaf"; 6 7 // This runs in Node.js - Don't use client-side code here (browser APIs, JSX...) 8 + const pragmaticSidebar: SidebarsConfig[string] = [ 9 + { type: "doc", id: "quickstart" }, 10 + { 11 + type: "category", 12 + label: "Concepts", 13 + items: [{ type: "autogenerated", dirName: "concepts" }], 14 + }, 15 + { 16 + type: "category", 17 + label: "Tasks", 18 + items: [{ type: "autogenerated", dirName: "tasks" }], 19 + }, 20 + { 21 + type: "category", 22 + label: "Notes", 23 + items: [{ type: "autogenerated", dirName: "notes" }], 24 + }, 25 + { 26 + type: "category", 27 + label: "Media", 28 + items: [{ type: "autogenerated", dirName: "media" }], 29 + }, 30 + { 31 + type: "category", 32 + label: "Articles", 33 + items: [{ type: "autogenerated", dirName: "articles" }], 34 + }, 35 + { 36 + type: "category", 37 + label: "Leaflet Publishing", 38 + items: [{ type: "autogenerated", dirName: "leaflet" }], 39 + }, 40 + { type: "doc", id: "configuration" }, 41 + ]; 42 + 7 43 const config: Config = { 8 - title: "My Site", 9 - tagline: "Dinosaurs are cool", 44 + title: "Noteleaf", 45 + tagline: 46 + "Terminal-based personal information manager for tasks, notes, and media", 10 47 favicon: "img/favicon.ico", 11 48 // Improve compatibility with the upcoming Docusaurus v4 12 49 future: { v4: true }, ··· 16 53 projectName: "noteleaf", 17 54 onBrokenLinks: "throw", 18 55 i18n: { defaultLocale: "en", locales: ["en"] }, 56 + customFields: { pragmaticSidebar }, 19 57 presets: [ 20 58 [ 21 59 "classic", ··· 30 68 image: "img/social-card.png", 31 69 colorMode: { respectPrefersColorScheme: true }, 32 70 navbar: { 33 - title: "My Site", 34 - logo: { alt: "My Site Logo", src: "img/logo.svg" }, 71 + title: "Noteleaf", 72 + logo: { alt: "Noteleaf Logo", src: "img/logo.svg" }, 35 73 items: [ 36 74 { 37 75 type: "docSidebar", ··· 49 87 title: "Docs", 50 88 items: [ 51 89 { 52 - label: "Tutorial", 53 - to: "/docs/intro", 90 + label: "Quickstart", 91 + to: "/docs/quickstart", 54 92 }, 55 93 ], 56 94 },
+49 -50
website/package.json
··· 1 1 { 2 - "name": "noteleaf-website", 3 - "version": "0.0.0", 4 - "private": true, 5 - "scripts": { 6 - "docusaurus": "docusaurus", 7 - "start": "docusaurus start", 8 - "build": "docusaurus build", 9 - "swizzle": "docusaurus swizzle", 10 - "deploy": "docusaurus deploy", 11 - "clear": "docusaurus clear", 12 - "serve": "docusaurus serve", 13 - "write-translations": "docusaurus write-translations", 14 - "write-heading-ids": "docusaurus write-heading-ids", 15 - "typecheck": "tsc", 16 - "generate-social-card": "node generate-social-card.mjs" 17 - }, 18 - "dependencies": { 19 - "@docusaurus/core": "3.9.1", 20 - "@docusaurus/preset-classic": "3.9.1", 21 - "@fontsource/lato": "^5.1.0", 22 - "@mdx-js/react": "^3.0.0", 23 - "clsx": "^2.0.0", 24 - "prism-react-renderer": "^2.3.0", 25 - "react": "^19.0.0", 26 - "react-dom": "^19.0.0", 27 - "satori": "^0.14.1", 28 - "satori-html": "^0.3.2", 29 - "sharp": "^0.33.5" 30 - }, 31 - "devDependencies": { 32 - "@docusaurus/module-type-aliases": "3.9.1", 33 - "@docusaurus/tsconfig": "3.9.1", 34 - "@docusaurus/types": "3.9.1", 35 - "typescript": "~5.6.2" 36 - }, 37 - "browserslist": { 38 - "production": [ 39 - ">0.5%", 40 - "not dead", 41 - "not op_mini all" 42 - ], 43 - "development": [ 44 - "last 3 chrome version", 45 - "last 3 firefox version", 46 - "last 5 safari version" 47 - ] 48 - }, 49 - "engines": { 50 - "node": ">=20.0" 51 - } 2 + "name": "noteleaf-website", 3 + "version": "0.0.0", 4 + "private": true, 5 + "scripts": { 6 + "docusaurus": "docusaurus", 7 + "start": "docusaurus start", 8 + "build": "docusaurus build", 9 + "swizzle": "docusaurus swizzle", 10 + "deploy": "docusaurus deploy", 11 + "clear": "docusaurus clear", 12 + "serve": "docusaurus serve", 13 + "write-translations": "docusaurus write-translations", 14 + "write-heading-ids": "docusaurus write-heading-ids", 15 + "typecheck": "tsc", 16 + "generate-social-card": "node generate-social-card.mjs" 17 + }, 18 + "dependencies": { 19 + "@docusaurus/core": "3.9.1", 20 + "@docusaurus/preset-classic": "3.9.1", 21 + "@mdx-js/react": "^3.0.0", 22 + "clsx": "^2.0.0", 23 + "prism-react-renderer": "^2.3.0", 24 + "react": "^19.0.0", 25 + "react-dom": "^19.0.0", 26 + "satori": "^0.14.1", 27 + "satori-html": "^0.3.2", 28 + "sharp": "^0.33.5" 29 + }, 30 + "devDependencies": { 31 + "@docusaurus/module-type-aliases": "3.9.1", 32 + "@docusaurus/tsconfig": "3.9.1", 33 + "@docusaurus/types": "3.9.1", 34 + "typescript": "~5.6.2" 35 + }, 36 + "browserslist": { 37 + "production": [ 38 + ">0.5%", 39 + "not dead", 40 + "not op_mini all" 41 + ], 42 + "development": [ 43 + "last 3 chrome version", 44 + "last 3 firefox version", 45 + "last 5 safari version" 46 + ] 47 + }, 48 + "engines": { 49 + "node": ">=20.0" 50 + } 52 51 }
+3 -1
website/sidebars.ts
··· 1 1 import type { SidebarsConfig } from "@docusaurus/plugin-content-docs"; 2 + import config from "./docusaurus.config"; 2 3 3 4 // This runs in Node.js - Don't use client-side code here (browser APIs, JSX...) 4 5 const sidebars: SidebarsConfig = { 5 - manualSidebar: [{ type: "autogenerated", dirName: "." }], 6 + manualSidebar: 7 + (config.customFields?.pragmaticSidebar as SidebarsConfig[string]) ?? [], 6 8 }; 7 9 8 10 export default sidebars;
-12
website/src/css/custom.css
··· 1 - /** 2 - * Noteleaf Documentation Site Styles 3 - * Using color palette from internal/ui/palette.go 4 - * Font: Lato 5 - */ 6 1 7 - @import '@fontsource/lato/300.css'; 8 - @import '@fontsource/lato/400.css'; 9 - @import '@fontsource/lato/700.css'; 10 - @import '@fontsource/lato/900.css'; 11 2 12 3 :root { 13 4 /* Noteleaf Color Palette - Light Mode */ ··· 35 26 /* Code blocks */ 36 27 --ifm-code-background: #F1EFEF; /* Salt */ 37 28 --ifm-code-font-size: 95%; 38 - 39 - /* Font family */ 40 - --ifm-font-family-base: 'Lato', sans-serif; 41 29 42 30 --docusaurus-highlighted-code-line-bg: rgba(0, 164, 255, 0.1); 43 31 }
+39 -37
website/src/pages/index.tsx
··· 1 - import type {ReactNode} from 'react'; 2 - import clsx from 'clsx'; 3 - import Link from '@docusaurus/Link'; 4 - import useDocusaurusContext from '@docusaurus/useDocusaurusContext'; 5 - import Layout from '@theme/Layout'; 6 - import HomepageFeatures from '@site/src/components/HomepageFeatures'; 7 - import Heading from '@theme/Heading'; 1 + import type { ReactNode } from "react"; 2 + import clsx from "clsx"; 3 + import Link from "@docusaurus/Link"; 4 + import useDocusaurusContext from "@docusaurus/useDocusaurusContext"; 5 + import Layout from "@theme/Layout"; 6 + import HomepageFeatures from "@site/src/components/HomepageFeatures"; 7 + import Heading from "@theme/Heading"; 8 8 9 - import styles from './index.module.css'; 9 + import styles from "./index.module.css"; 10 10 11 11 function HomepageHeader() { 12 - const {siteConfig} = useDocusaurusContext(); 13 - return ( 14 - <header className={clsx('hero hero--primary', styles.heroBanner)}> 15 - <div className="container"> 16 - <Heading as="h1" className="hero__title"> 17 - {siteConfig.title} 18 - </Heading> 19 - <p className="hero__subtitle">{siteConfig.tagline}</p> 20 - <div className={styles.buttons}> 21 - <Link 22 - className="button button--secondary button--lg" 23 - to="/docs/intro"> 24 - Docusaurus Tutorial - 5min โฑ๏ธ 25 - </Link> 26 - </div> 27 - </div> 28 - </header> 29 - ); 12 + const { siteConfig } = useDocusaurusContext(); 13 + return ( 14 + <header className={clsx("hero hero--primary", styles.heroBanner)}> 15 + <div className="container"> 16 + <Heading as="h1" className="hero__title"> 17 + {siteConfig.title} 18 + </Heading> 19 + <p className="hero__subtitle">{siteConfig.tagline}</p> 20 + <div className={styles.buttons}> 21 + <Link 22 + className="button button--secondary button--lg" 23 + to="/docs/quickstart" 24 + > 25 + Get Started 26 + </Link> 27 + </div> 28 + </div> 29 + </header> 30 + ); 30 31 } 31 32 32 33 export default function Home(): ReactNode { 33 - const {siteConfig} = useDocusaurusContext(); 34 - return ( 35 - <Layout 36 - title={`Hello from ${siteConfig.title}`} 37 - description="Description will go into a meta tag in <head />"> 38 - <HomepageHeader /> 39 - <main> 40 - <HomepageFeatures /> 41 - </main> 42 - </Layout> 43 - ); 34 + const { siteConfig } = useDocusaurusContext(); 35 + return ( 36 + <Layout 37 + title="Terminal-based Personal Information Manager" 38 + description="Manage tasks, notes, articles, and media from your terminal with Noteleaf" 39 + > 40 + <HomepageHeader /> 41 + <main> 42 + <HomepageFeatures /> 43 + </main> 44 + </Layout> 45 + ); 44 46 }
-7
website/src/pages/markdown-page.md
··· 1 - --- 2 - title: Markdown page example 3 - --- 4 - 5 - # Markdown page example 6 - 7 - You don't need React to write simple standalone pages.