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

build: setup ldflags & switch to Taskfile from justfile

+2840 -137
+9 -51
README.md
··· 6 6 [![Go Version](https://img.shields.io/github/go-mod/go-version/stormlightlabs/noteleaf)](go.mod) 7 7 8 8 Noteleaf is a unified personal productivity CLI that combines task management, note-taking, and media tracking in one place. 9 - It provides TaskWarrior-inspired task management with additional support for notes, articles, books, movies, and TV shows - all built with Golang & Charm.sh libs. Inspired by TaskWarrior & todo.txt CLI applications. 9 + It provides TaskWarrior-inspired task management with additional support for notes, articles, books, movies, and TV shows, all built with Golang & Charm.sh libs. 10 + Inspired by TaskWarrior & todo.txt CLI applications. 10 11 11 12 ## Why? 12 13 13 - - **Fragmented productivity tools**: Instead of juggling multiple apps for tasks, notes, reading lists, and media queues, Noteleaf provides a single CLI interface 14 - - **Terminal-native workflow**: For developers and power users who prefer staying in the terminal, Noteleaf offers rich TUIs without leaving your command line 15 - - **Lightweight and fast**: No desktop apps or web interfaces - just a fast, focused CLI tool 14 + - **Fragmented Ecosystem**: Instead of juggling multiple apps for tasks, notes, reading lists, and media queues, Noteleaf provides a single CLI interface 15 + - **Terminal-native**: For developers and power users who prefer staying in the terminal, Noteleaf offers rich TUIs without leaving your command line 16 + - **Lightweight**: No desktop apps or web interfaces, just a fast, focused CLI tool 16 17 - **Unified data model**: Tasks, notes, and media items can reference each other, creating a connected knowledge and productivity system 17 18 18 - ## Getting started 19 - 20 - ### Prerequisites 21 - 22 - Go v1.24+ 19 + ## Getting Started 23 20 24 - ### Installation 21 + ### Quick Install 25 22 26 23 ```sh 27 24 git clone https://github.com/stormlightlabs/noteleaf ··· 30 27 go install 31 28 ``` 32 29 33 - ### Basic usage 34 - 35 - ```sh 36 - # Initialize the application 37 - noteleaf setup 38 - 39 - # Add sample data for exploration 40 - noteleaf setup seed 41 - 42 - # Create your first task 43 - noteleaf task add "Learn Noteleaf CLI" 44 - 45 - # View tasks 46 - noteleaf task list 47 - 48 - # Create a note 49 - noteleaf note add "My first note" 50 - 51 - # Add a book to your reading list 52 - noteleaf media book add "The Name of the Wind" 53 - 54 - # Generate docs 55 - noteleaf docgen --format docusaurus --out ./website/docs/manual 56 - ``` 57 - 58 - ## Status 59 - 60 - **Status**: Work in Progress (MVP completed) 61 - 62 - ### Completed 30 + ### First Steps 63 31 64 - - Task management with projects and tags 65 - - Note-taking system 66 - - Article parsing from URLs 67 - - Media tracking (books, movies, TV shows) 68 - 69 - ### Planned 70 - 71 - - Time tracking integration 72 - - Advanced search and filtering 73 - - Export/import functionality 74 - - Plugin system 32 + For a comprehensive walkthrough including task management, time tracking, notes, and media tracking, see the [Quickstart Guide](website/docs/Quickstart.md).
+191
Taskfile.yml
··· 1 + version: '3' 2 + 3 + vars: 4 + BINARY_NAME: noteleaf 5 + BUILD_DIR: ./tmp 6 + CMD_DIR: ./cmd 7 + COVERAGE_FILE: coverage.out 8 + COVERAGE_HTML: coverage.html 9 + VERSION_PKG: github.com/stormlightlabs/noteleaf/internal/version 10 + 11 + # Git version detection 12 + GIT_COMMIT: 13 + sh: git rev-parse --short HEAD 2>/dev/null || echo "none" 14 + GIT_TAG: 15 + sh: git describe --tags --exact-match 2>/dev/null || echo "" 16 + GIT_DESCRIBE: 17 + sh: git describe --tags --always --dirty 2>/dev/null || echo "dev" 18 + BUILD_DATE: 19 + sh: date -u +"%Y-%m-%dT%H:%M:%SZ" 20 + 21 + tasks: 22 + default: 23 + desc: Show available tasks 24 + silent: true 25 + cmds: 26 + - task --list 27 + 28 + test: 29 + desc: Run all tests 30 + cmds: 31 + - go test ./... 32 + 33 + coverage: 34 + desc: Generate HTML coverage report 35 + cmds: 36 + - go test -coverprofile={{.COVERAGE_FILE}} ./... 37 + - go tool cover -html={{.COVERAGE_FILE}} -o {{.COVERAGE_HTML}} 38 + - echo "Coverage report generated at {{.COVERAGE_HTML}}" 39 + 40 + cov: 41 + desc: Show coverage in terminal 42 + cmds: 43 + - go test -coverprofile={{.COVERAGE_FILE}} ./... 44 + - go tool cover -func={{.COVERAGE_FILE}} 45 + 46 + build: 47 + desc: Build binary (simple build without version injection) 48 + cmds: 49 + - mkdir -p {{.BUILD_DIR}} 50 + - go build -o {{.BUILD_DIR}}/{{.BINARY_NAME}} {{.CMD_DIR}} 51 + - echo "Built {{.BUILD_DIR}}/{{.BINARY_NAME}}" 52 + 53 + build:dev: 54 + desc: Build binary with dev version (includes git commit hash) 55 + vars: 56 + VERSION: "{{.GIT_DESCRIBE}}" 57 + LDFLAGS: "-X {{.VERSION_PKG}}.Version={{.VERSION}} -X {{.VERSION_PKG}}.Commit={{.GIT_COMMIT}} -X {{.VERSION_PKG}}.BuildDate={{.BUILD_DATE}}" 58 + cmds: 59 + - mkdir -p {{.BUILD_DIR}} 60 + - go build -ldflags "{{.LDFLAGS}}" -o {{.BUILD_DIR}}/{{.BINARY_NAME}} {{.CMD_DIR}} 61 + - 'echo "Built {{.BUILD_DIR}}/{{.BINARY_NAME}} (version: {{.VERSION}})"' 62 + 63 + build:rc: 64 + desc: Build release candidate binary (requires git tag with -rc suffix) 65 + vars: 66 + VERSION: "{{.GIT_TAG}}" 67 + LDFLAGS: "-X {{.VERSION_PKG}}.Version={{.VERSION}} -X {{.VERSION_PKG}}.Commit={{.GIT_COMMIT}} -X {{.VERSION_PKG}}.BuildDate={{.BUILD_DATE}}" 68 + preconditions: 69 + - sh: '[ -n "{{.GIT_TAG}}" ]' 70 + msg: "No git tag found. Create a tag with 'git tag v1.0.0-rc1' first." 71 + - sh: 'echo "{{.GIT_TAG}}" | grep -q "\-rc"' 72 + msg: "Git tag must contain '-rc' for release candidate builds (e.g., v1.0.0-rc1)" 73 + cmds: 74 + - mkdir -p {{.BUILD_DIR}} 75 + - go build -ldflags "{{.LDFLAGS}}" -o {{.BUILD_DIR}}/{{.BINARY_NAME}} {{.CMD_DIR}} 76 + - 'echo "Built {{.BUILD_DIR}}/{{.BINARY_NAME}} (version: {{.VERSION}})"' 77 + 78 + build:prod: 79 + desc: Build production binary (requires clean semver git tag) 80 + vars: 81 + VERSION: "{{.GIT_TAG}}" 82 + LDFLAGS: "-X {{.VERSION_PKG}}.Version={{.VERSION}} -X {{.VERSION_PKG}}.Commit={{.GIT_COMMIT}} -X {{.VERSION_PKG}}.BuildDate={{.BUILD_DATE}}" 83 + preconditions: 84 + - sh: '[ -n "{{.GIT_TAG}}" ]' 85 + msg: "No git tag found. Create a tag with 'git tag v1.0.0' first." 86 + - sh: 'echo "{{.GIT_TAG}}" | grep -qE "^v?[0-9]+\.[0-9]+\.[0-9]+$"' 87 + msg: "Git tag must be a clean semver version (e.g., v1.0.0 or 1.0.0) without prerelease suffix" 88 + - sh: '[ -z "$(git status --porcelain)" ]' 89 + msg: "Working directory must be clean (no uncommitted changes) for production builds" 90 + cmds: 91 + - mkdir -p {{.BUILD_DIR}} 92 + - go build -ldflags "{{.LDFLAGS}}" -o {{.BUILD_DIR}}/{{.BINARY_NAME}} {{.CMD_DIR}} 93 + - 'echo "Built {{.BUILD_DIR}}/{{.BINARY_NAME}} (version: {{.VERSION}})"' 94 + 95 + clean: 96 + desc: Remove build artifacts and coverage files 97 + cmds: 98 + - rm -f {{.COVERAGE_FILE}} {{.COVERAGE_HTML}} 99 + - rm -rf {{.BUILD_DIR}} 100 + - echo "Cleaned build artifacts" 101 + 102 + lint: 103 + desc: Run linters (go vet and go fmt) 104 + cmds: 105 + - go vet ./... 106 + - go fmt ./... 107 + 108 + check: 109 + desc: Run linters and coverage tests 110 + cmds: 111 + - task: lint 112 + - task: cov 113 + 114 + deps: 115 + desc: Download and tidy dependencies 116 + cmds: 117 + - go mod download 118 + - go mod tidy 119 + 120 + run: 121 + desc: Build and run the application 122 + deps: [build] 123 + cmds: 124 + - '{{.BUILD_DIR}}/{{.BINARY_NAME}}' 125 + 126 + status: 127 + desc: Show Go version, module info, and dependencies 128 + silent: true 129 + cmds: 130 + - echo "=== Go Version ===" 131 + - go version 132 + - echo "" 133 + - echo "=== Module Info ===" 134 + - go list -m 135 + - echo "" 136 + - echo "=== Dependencies ===" 137 + - go list -m all 138 + 139 + dev: 140 + desc: Full development workflow (clean, lint, test, build) 141 + cmds: 142 + - task: clean 143 + - task: lint 144 + - task: test 145 + - task: build 146 + 147 + docs:generate: 148 + desc: Generate documentation in all formats 149 + cmds: 150 + - go run tools/docgen.go -output website/docs/manual -format docusaurus 151 + - go run tools/docgen.go -output docs/manual -format man 152 + - echo "Documentation generated" 153 + 154 + docs:man: 155 + desc: Generate man pages 156 + cmds: 157 + - mkdir -p docs/manual 158 + - go run tools/docgen.go -output docs/manual -format man 159 + - echo "Man pages generated in docs/manual" 160 + 161 + docs:serve: 162 + desc: Start docusaurus development server 163 + dir: website 164 + cmds: 165 + - npm run start 166 + 167 + version:show: 168 + desc: Display current version information 169 + silent: true 170 + cmds: 171 + - echo "Version info:" 172 + - 'echo " Git tag: {{.GIT_TAG}}"' 173 + - 'echo " Git commit: {{.GIT_COMMIT}}"' 174 + - 'echo " Git describe: {{.GIT_DESCRIBE}}"' 175 + - 'echo " Build date: {{.BUILD_DATE}}"' 176 + 177 + version:validate: 178 + desc: Validate git tag format for releases 179 + cmds: 180 + - | 181 + if [ -z "{{.GIT_TAG}}" ]; then 182 + echo "No git tag found" 183 + exit 1 184 + fi 185 + if echo "{{.GIT_TAG}}" | grep -qE "^v?[0-9]+\.[0-9]+\.[0-9]+(-rc[0-9]+)?$"; then 186 + echo "Valid version tag: {{.GIT_TAG}}" 187 + else 188 + echo "Invalid version tag: {{.GIT_TAG}}" 189 + echo "Expected format: v1.0.0 or v1.0.0-rc1" 190 + exit 1 191 + fi
+2 -1
cmd/main.go
··· 13 13 "github.com/stormlightlabs/noteleaf/internal/store" 14 14 "github.com/stormlightlabs/noteleaf/internal/ui" 15 15 "github.com/stormlightlabs/noteleaf/internal/utils" 16 + "github.com/stormlightlabs/noteleaf/internal/version" 16 17 "github.com/stormlightlabs/noteleaf/tools" 17 18 ) 18 19 ··· 253 254 root.AddCommand(tools.NewDocGenCommand(root)) 254 255 255 256 opts := []fang.Option{ 256 - fang.WithVersion("0.1.0"), 257 + fang.WithVersion(version.String()), 257 258 fang.WithoutCompletions(), 258 259 fang.WithColorSchemeFunc(ui.NoteleafColorScheme), 259 260 }
+23 -11
docs/dev/ARCHITECTURE.md website/docs/development/ARCHITECTURE.md
··· 24 24 25 25 ### Business Logic 26 26 27 - **Handlers** - Business logic resides in `internal/handlers/` with one handler per domain (TaskHandler, NoteHandler, ArticleHandler, etc.). Handlers receive repository dependencies through constructor injection. 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. 28 29 29 30 **Services** - Domain-specific operations in `internal/services/` handle complex business workflows and external integrations. 30 31 ··· 34 35 35 36 ### Content Management 36 37 37 - **Articles** - Web scraping using `gocolly/colly` with domain-specific extraction rules stored in `internal/articles/rules/`. Articles are parsed to markdown and stored with dual file references (markdown + HTML). 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). 38 40 39 41 **Tasks** - Todo/task management inspired by TaskWarrior with filtering, status tracking, and interactive TUI views. 40 42 ··· 64 66 65 67 ### Technology Choices 66 68 67 - **Go over Rust** - Go was selected for its simplicity, excellent CLI ecosystem (Cobra, Charm libraries), and faster development velocity. 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. 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. 68 71 69 - **SQLite over PostgreSQL** - SQLite provides zero-configuration deployment and sufficient performance for single-user CLI applications. The embedded database eliminates setup complexity while supporting full SQL features needed for filtering and querying. PostgreSQL would add deployment overhead without meaningful benefits for this use case. 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. 70 75 71 - **Repository Pattern over Active Record** - Repository interfaces enable clean separation between business logic and data access, facilitating testing through dependency injection. This pattern scales better than Active Record for complex domain logic while maintaining clear boundaries between layers. 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. 72 78 73 79 ### Architectural Tradeoffs 74 80 75 - **CommandGroup Interface** - Centralizes command registration while enabling modular command organization. The pattern requires additional abstraction but provides consistent dependency injection and testing capabilities across all command groups. 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. 76 83 77 - **Handler-based Business Logic** - Business logic in handlers rather than rich domain models keeps the codebase simple and avoids over-engineering. While this approach may not scale to complex business rules, it provides clear separation of concerns for the current feature set. 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. 78 86 79 - **Dual Storage for Articles** - Articles store both markdown and HTML versions to balance processing speed with format flexibility. This doubles storage requirements but eliminates runtime conversion overhead and preserves original formatting. 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. 80 89 81 90 ### Component Interactions 82 91 83 - **Handler โ†’ Repository โ†’ Database** - Request flow follows a linear path from CLI commands through business logic to data persistence. This pattern ensures consistent validation and error handling while maintaining clear separation of concerns. 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. 84 94 85 - **TUI State Management** - Bubbletea's unidirectional data flow provides predictable state updates for interactive components. The model-view-update pattern ensures consistent UI behavior across different terminal environments. 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. 86 97 87 - **Configuration and Migration** - Application startup validates configuration and runs database migrations before initializing handlers. This fail-fast approach prevents runtime errors and ensures consistent database schema across deployments. 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.
+51 -22
docs/dev/TESTING.md website/docs/development/TESTING.md
··· 4 4 5 5 ## Overview 6 6 7 - The codebase follows Go's standard testing practices with specialized testing utilities for complex scenarios. Tests use the standard library along with carefully selected dependencies like faker for data generation and BubbleTea for TUI testing. This approach keeps dependencies minimal while providing robust testing infrastructure for interactive components and complex integrations. 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. 8 10 9 11 ### Organization 10 12 11 - 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. The codebase includes four main test utility files that provide specialized testing infrastructure: 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: 12 15 13 16 - `internal/services/test_utilities.go` - HTTP mocking and media service testing 14 17 - `internal/repo/test_utilities.go` - Database testing and data generation ··· 19 22 20 23 ### Handler Creation 21 24 22 - Tests create real handler instances using temporary databases to ensure test isolation. Factory functions handle both database setup and handler initialization, returning both the handler and a cleanup function. 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. 23 27 24 28 ### Database Isolation 25 29 26 - Tests use temporary directories and environment variable manipulation to create isolated database instances. Each test gets its own temporary SQLite database that is automatically cleaned up after the test completes. 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. 27 32 28 - The `setupCommandTest` function creates a temporary directory, sets `XDG_CONFIG_HOME` to point to it, and initializes the database schema. This ensures tests don't interfere with each other or with development data. 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. 29 35 30 36 ### Resource Management 31 37 32 - Tests properly manage resources using cleanup functions returned by factory methods. The cleanup function handles both handler closure and temporary directory removal. This pattern ensures complete resource cleanup even if tests fail. 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. 33 41 34 42 ### Error Handling 35 43 36 - Tests use `t.Fatal` for setup errors that prevent test execution and `t.Error` for test assertion failures. Fatal errors stop test execution while errors allow tests to continue checking other conditions. 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. 37 46 38 47 ### Context Cancellation 39 48 40 - Error case testing frequently uses context cancellation to simulate database and network failures. The pattern creates a context, immediately cancels it, then calls the function under test to verify error handling. This provides a reliable way to test error paths without requiring complex mock setups or external failure injection. 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. 41 52 42 53 ### Command Structure 43 54 44 - Command group tests verify cobra command structure including use strings, aliases, short descriptions, and subcommand presence. Tests check that commands are properly configured without executing their logic. 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. 45 57 46 58 ### Interface Compliance 47 59 48 - Tests verify interface compliance using compile-time checks with blank identifier assignments. This ensures structs implement expected interfaces without runtime overhead. 60 + Tests verify interface compliance using compile-time checks with blank identifier assignments. 61 + This ensures structs implement expected interfaces without runtime overhead. 49 62 50 63 ## Test Infrastructure 51 64 52 65 ### Test Utility Frameworks 53 66 54 - The codebase provides comprehensive testing utilities organized by layer and functionality. Each test utility file contains specialized helpers, mocks, and test infrastructure for its respective domain. 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. 55 69 56 70 #### Database Testing Utilities 57 71 ··· 105 119 106 120 #### TUI Testing with BubbleTea Framework 107 121 108 - The TUI testing framework addresses the fundamental challenge of testing interactive terminal applications in a deterministic, concurrent environment. BubbleTea's message-passing architecture creates unique testing requirements that standard Go testing patterns cannot adequately address. 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. 109 124 110 - The framework implements a controlled execution environment that replaces BubbleTea's typical program loop with a deterministic testing harness. Rather than running an actual terminal program, the "testing suite" directly manages model state transitions by simulating the Update/View cycle. This approach eliminates the non-deterministic behavior inherent in real terminal interactions while preserving the exact message flow patterns that production code experiences. 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. 111 128 112 - State verification relies on function composition patterns where test conditions are expressed as closures that capture specific model states. The `WaitFor` mechanism uses polling with configurable timeouts, addressing the async nature of BubbleTea model updates without creating race conditions. This pattern bridges imperative test assertions with BubbleTea's declarative update model. 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. 113 132 This is inspired by front-end/TS/JS testing patterns. 114 133 115 134 The framework's I/O abstraction layer replaces terminal input/output with controlled buffers that implement standard Go interfaces. 116 - This design maintains interface compatibility while providing complete control over timing and content. The controlled I/O system captures all output for later verification and injects precise input sequences, enabling complex interaction testing without external dependencies. 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. 117 137 118 138 Concurrency management uses channels and context propagation to coordinate between the testing framework and the model under test. 119 - The suite manages goroutine lifecycle and ensures proper cleanup, preventing test interference and resource leaks. This architecture supports testing of models that perform background operations or handle async events. 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. 120 141 121 142 #### HTTP Service Mocking 122 143 ··· 134 155 135 156 ### Single Root Test 136 157 137 - The preferred test organization pattern uses a single root test function with nested subtests using `t.Run`. This provides clear hierarchical organization and allows running specific test sections while maintaining shared setup and context. 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. 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. 138 161 139 162 ### Integration vs Unit Testing 140 163 141 - The codebase emphasizes integration testing over heavy mocking by using real handlers and services to verify actual behavior rather than mocked interactions. The goal is to catch integration issues while maintaining test reliability. 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. 142 166 143 167 ### Static Output 144 168 ··· 146 170 147 171 ### Standard Output Redirection 148 172 149 - For testing functions that write to stdout, tests use a pipe redirection pattern with goroutines to capture output. The pattern saves the original stdout, redirects to a pipe, captures output in a separate goroutine, and restores stdout after the test. This ensures clean output capture without interfering with the testing framework. 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. 150 176 151 177 ## Utilities 152 178 ··· 189 215 190 216 ## Testing CLI Commands 191 217 192 - Command group tests focus on structure verification rather than execution testing. Tests check command configuration, subcommand presence, and interface compliance. This approach ensures command trees are properly constructed without requiring complex execution mocking. 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. 193 220 194 221 ### CommandGroup Interface Testing 195 222 196 - The CommandGroup interface enables testable CLI architecture. Tests verify that command groups implement the interface correctly and return properly configured cobra commands. This pattern separates command structure from command execution. 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. 197 225 198 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. 199 227 200 228 ## Performance Considerations 201 229 202 - Tests avoid expensive operations in setup functions. Handler creation uses real instances but tests focus on structure verification rather than full execution paths. This keeps test suites fast while maintaining coverage of critical functionality. 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. 203 232 204 233 The single root test pattern allows for efficient resource management where setup costs can be amortized across multiple related test cases. 205 234
+2 -2
go.mod
··· 4 4 5 5 require ( 6 6 github.com/BurntSushi/toml v1.5.0 7 - github.com/charmbracelet/fang v0.4.2 7 + github.com/charmbracelet/fang v0.4.3 8 8 github.com/mattn/go-sqlite3 v1.14.32 9 9 github.com/spf13/cobra v1.9.1 10 10 ) ··· 19 19 github.com/bluesky-social/indigo v0.0.0-20251031012455-0b4bd2478a61 20 20 github.com/gomarkdown/markdown v0.0.0-20250810172220-2e2c11897d1a 21 21 github.com/ipfs/go-cid v0.4.1 22 - github.com/jaswdr/faker/v2 v2.8.0 22 + github.com/jaswdr/faker/v2 v2.8.1 23 23 ) 24 24 25 25 require (
+4 -4
go.sum
··· 43 43 github.com/charmbracelet/bubbletea v1.3.4/go.mod h1:dtcUCyCGEX3g9tosuYiut3MXgY/Jsv9nKVdibKKRRXo= 44 44 github.com/charmbracelet/colorprofile v0.3.2 h1:9J27WdztfJQVAQKX2WOlSSRB+5gaKqqITmrvb1uTIiI= 45 45 github.com/charmbracelet/colorprofile v0.3.2/go.mod h1:mTD5XzNeWHj8oqHb+S1bssQb7vIHbepiebQ2kPKVKbI= 46 - github.com/charmbracelet/fang v0.4.2 h1:nWr7Tb82/TTNNGMGG35aTZ1X68loAOQmpb0qxkKXjas= 47 - github.com/charmbracelet/fang v0.4.2/go.mod h1:wHJKQYO5ReYsxx+yZl+skDtrlKO/4LLEQ6EXsdHhRhg= 46 + github.com/charmbracelet/fang v0.4.3 h1:qXeMxnL4H6mSKBUhDefHu8NfikFbP/MBNTfqTrXvzmY= 47 + github.com/charmbracelet/fang v0.4.3/go.mod h1:wHJKQYO5ReYsxx+yZl+skDtrlKO/4LLEQ6EXsdHhRhg= 48 48 github.com/charmbracelet/glamour v0.10.0 h1:MtZvfwsYCx8jEPFJm3rIBFIMZUfUJ765oX8V6kXldcY= 49 49 github.com/charmbracelet/glamour v0.10.0/go.mod h1:f+uf+I/ChNmqo087elLnVdCiVgjSKWuXa/l6NU2ndYk= 50 50 github.com/charmbracelet/lipgloss v1.1.1-0.20250404203927-76690c660834 h1:ZR7e0ro+SZZiIZD7msJyA+NjkCNNavuiPBLgerbOziE= ··· 197 197 github.com/ipld/go-ipld-prime v0.21.0/go.mod h1:3RLqy//ERg/y5oShXXdx5YIp50cFGOanyMctpPjsvxQ= 198 198 github.com/jackpal/go-nat-pmp v1.0.2 h1:KzKSgb7qkJvOUTqYl9/Hg/me3pWgBmERKrTGD7BdWus= 199 199 github.com/jackpal/go-nat-pmp v1.0.2/go.mod h1:QPH045xvCAeXUZOxsnwmrtiCoxIr9eob+4orBN1SBKc= 200 - github.com/jaswdr/faker/v2 v2.8.0 h1:3AxdXW9U7dJmWckh/P0YgRbNlCcVsTyrUNUnLVP9b3Q= 201 - github.com/jaswdr/faker/v2 v2.8.0/go.mod h1:jZq+qzNQr8/P+5fHd9t3txe2GNPnthrTfohtnJ7B+68= 200 + github.com/jaswdr/faker/v2 v2.8.1 h1:2AcPgHDBXYQregFUH9LgVZKfFupc4SIquYhp29sf5wQ= 201 + github.com/jaswdr/faker/v2 v2.8.1/go.mod h1:jZq+qzNQr8/P+5fHd9t3txe2GNPnthrTfohtnJ7B+68= 202 202 github.com/jbenet/go-cienv v0.1.0/go.mod h1:TqNnHUmJgXau0nCzC7kXWeotg3J9W34CUv5Djy1+FlA= 203 203 github.com/jbenet/goprocess v0.1.4 h1:DRGOFReOMqqDNXwW70QkacFW0YN9QnwLV0Vqk+3oU0o= 204 204 github.com/jbenet/goprocess v0.1.4/go.mod h1:5yspPrukOVuOLORacaBi858NqyClJPQxYZlqdZVfqY4=
+41 -39
internal/docs/ROADMAP.md
··· 10 10 11 11 ### CORE 12 12 13 - - [ ] Ensure **all documented subcommands** exist and work: 13 + - [x] Ensure **all documented subcommands** exist and work: 14 14 - Tasks: add, list, view, update, edit, delete, projects, tags, contexts, done, start, stop, timesheet 15 15 - Notes: create, list, read, edit, remove 16 16 - Books: add, list, reading, finished, remove, progress, update 17 17 - Movies: add, list, watched, remove 18 18 - TV: add, list, watching, watched, remove 19 19 - Articles: add, list, view, read, remove 20 - - [ ] Confirm all **aliases** work (`todo`, `ls`, `rm`, etc.). 21 - - [ ] Verify **flags** and argument parsing match man page (priority, project, context, due, tags, etc.). 22 - - [ ] Implement or finish stubs (e.g. `config management` noted in code). 20 + - [x] Confirm all **aliases** work (`todo`, `ls`, `rm`, etc.). 21 + - [x] Verify **flags** and argument parsing match man page (priority, project, context, due, tags, etc.). 22 + - [x] Implement or finish stubs (e.g. `config management` noted in code). 23 23 24 24 ### Task Management Domain 25 25 26 - - [ ] Verify tasks can be created with all attributes (priority, project, context, due date, tags). 27 - - [ ] Confirm task listing supports interactive and static modes. 28 - - [ ] Implement status filtering (`pending`, `completed`, etc.). 29 - - [ ] Validate time tracking (start/stop) writes entries and timesheet summarizes correctly. 30 - - [ ] Ensure update supports add/remove tags and all fields. 31 - - [ ] Test interactive editor (`task edit`). 26 + - [x] Verify tasks can be created with all attributes (priority, project, context, due date, tags). 27 + - [x] Confirm task listing supports interactive and static modes. 28 + - [x] Implement status filtering (`pending`, `completed`, etc.). 29 + - [x] Validate time tracking (start/stop) writes entries and timesheet summarizes correctly. 30 + - [x] Ensure update supports add/remove tags and all fields. 31 + - [x] Test interactive editor (`task edit`). 32 32 33 33 ### Notes Domain 34 34 35 - - [ ] Implement note creation from: 35 + - [x] Implement note creation from: 36 36 - Inline text 37 37 - File (`--file`) 38 38 - Interactive input (`--interactive`) 39 - - [ ] Verify note list interactive TUI works, static list fallback works. 40 - - [ ] Confirm filtering by tags and `--archived`. 41 - - [ ] Ensure notes can be opened, edited in `$EDITOR`, and deleted. 39 + - [x] Verify note list interactive TUI works, static list fallback works. 40 + - [x] Confirm filtering by tags and `--archived`. 41 + - [x] Ensure notes can be opened, edited in `$EDITOR`, and deleted. 42 42 43 43 ### Media Domains 44 44 45 45 #### Books 46 46 47 - - [ ] Implement search + add (possibly external API). 48 - - [ ] Verify list supports statuses (`queued`, `reading`, `finished`). 49 - - [ ] Progress updates (`book progress`) work with percentages. 50 - - [ ] Status update (`book update`) accepts valid values. 47 + - [x] Implement search + add (possibly external API). 48 + - [x] Verify list supports statuses (`queued`, `reading`, `finished`). 49 + - [x] Progress updates (`book progress`) work with percentages. 50 + - [x] Status update (`book update`) accepts valid values. 51 51 52 52 #### Movies 53 53 54 - - [ ] Implement search + add. 55 - - [ ] Verify `list` with status filtering (`all`, `queued`, `watched`). 56 - - [ ] Confirm `watched`/`remove` commands update correctly. 54 + - [x] Implement search + add. 55 + - [x] Verify `list` with status filtering (`all`, `queued`, `watched`). 56 + - [x] Confirm `watched`/`remove` commands update correctly. 57 57 58 58 #### TV 59 59 60 - - [ ] Implement search + add. 61 - - [ ] Verify `list` with multiple statuses (`queued`, `watching`, `watched`). 62 - - [ ] Ensure `watching`, `watched`, `remove` commands behave correctly. 60 + - [x] Implement search + add. 61 + - [x] Verify `list` with multiple statuses (`queued`, `watching`, `watched`). 62 + - [x] Ensure `watching`, `watched`, `remove` commands behave correctly. 63 63 64 64 #### Articles 65 65 66 - - [ ] Implement article parser (XPath/domain-specific rules). 67 - - [ ] Save articles in Markdown + HTML. 68 - - [ ] Verify metadata is stored in DB. 69 - - [ ] Confirm list supports query, author filter, limit. 70 - - [ ] Test article view/read/remove. 66 + - [x] Implement article parser (XPath/domain-specific rules). 67 + - [x] Save articles in Markdown + HTML. 68 + - [x] Verify metadata is stored in DB. 69 + - [x] Confirm list supports query, author filter, limit. 70 + - [x] Test article view/read/remove. 71 71 72 72 ### Configuration & Data 73 73 74 - - [ ] Implement **config management** 75 - - [ ] Define config file format (TOML, YAML, JSON). 76 - - [ ] Set default config/data paths: 74 + - [x] Implement **config management** 75 + - [x] Define config file format (TOML, YAML, JSON). 76 + - [x] Set default config/data paths: 77 77 - Linux: `~/.config/noteleaf`, `~/.local/share/noteleaf` 78 78 - macOS: `~/Library/Application Support/noteleaf` 79 79 - Windows: `%APPDATA%\noteleaf` 80 - - [ ] Implement overrides with environment variables (`NOTELEAF_CONFIG`, `NOTELEAF_DATA_DIR`). 81 - - [ ] Ensure consistent DB schema migrations and versioning. 80 + - [x] Implement overrides with environment variables (`NOTELEAF_CONFIG`, `NOTELEAF_DATA_DIR`). 81 + - [x] Ensure consistent DB schema migrations and versioning. 82 82 83 83 ### Documentation 84 84 85 - - [ ] Finalize **man page** (plaintext + roff). 86 - - [ ] Write quickstart guide in `README.md`. 87 - - [ ] Add examples for each command. 88 - - [ ] Document config file with defaults and examples. 89 - - [ ] Provide developer docs for contributing. 85 + - [x] Finalize **man page** - use `tools/docgen.go` as a dev only command for `website/docs/manual` 86 + - [x] Strictly follow <https://diataxis.fr/> 87 + - [x] Write quickstart guide in `README.md` & add `website/docs/Quickstart.md` 88 + - [x] Add examples for each command (`website/docs/examples`) 89 + - [x] Document config file with defaults and examples in `website/docs/Configuration.md` 90 + - [x] Provide developer docs for contributing in `docs/dev` 91 + - [x] Move to `website/docs/development` 90 92 91 93 ### QA 92 94
+5 -3
internal/services/services.go
··· 16 16 "time" 17 17 18 18 "github.com/stormlightlabs/noteleaf/internal/models" 19 + "github.com/stormlightlabs/noteleaf/internal/version" 19 20 "golang.org/x/time/rate" 20 21 ) 21 22 ··· 27 28 // Rate limiting: 180 requests per minute = 3 requests per second 28 29 requestsPerSecond int = 3 29 30 burstLimit int = 5 31 + ) 30 32 31 - // User agent 32 - // TODO: See https://www.digitalocean.com/community/tutorials/using-ldflags-to-set-version-information-for-go-applications 33 - userAgent string = "Noteleaf/1.0.0 (info@stormlightlabs.org)" 33 + var ( 34 + // User agent for HTTP requests - uses version information set at build time 35 + userAgent = version.UserAgent("Noteleaf", "info@stormlightlabs.org") 34 36 ) 35 37 36 38 // APIService defines the contract for API interactions
+5 -4
internal/services/services_test.go
··· 467 467 }) 468 468 }) 469 469 470 - t.Run("UserAgent header", func(t *testing.T) { 471 - expectedFormat := "Noteleaf/1.0.0 (info@stormlightlabs.org)" 472 - if userAgent != expectedFormat { 473 - t.Errorf("User agent should follow the required format. Expected %s, got %s", expectedFormat, userAgent) 470 + t.Run("UserAgent header format", func(t *testing.T) { 471 + expectedPrefix := "Noteleaf/" 472 + expectedSuffix := " (info@stormlightlabs.org)" 473 + if !strings.HasPrefix(userAgent, expectedPrefix) || !strings.HasSuffix(userAgent, expectedSuffix) { 474 + t.Errorf("User agent should follow format 'Noteleaf/<version> (info@stormlightlabs.org)', got %s", userAgent) 474 475 } 475 476 }) 476 477
+25
internal/version/version.go
··· 1 + package version 2 + 3 + import "fmt" 4 + 5 + var ( 6 + // Version is the semantic version (e.g., "1.0.0", "1.0.0-rc1") 7 + Version string = "dev" 8 + // Commit is the git commit hash 9 + Commit string = "none" 10 + // BuildDate is the build timestamp 11 + BuildDate string = "unknown" 12 + ) 13 + 14 + // String returns a formatted version string 15 + func String() string { 16 + if Version == "dev" && Commit != "none" { 17 + return fmt.Sprintf("%s+%s", Version, Commit) 18 + } 19 + return Version 20 + } 21 + 22 + // UserAgent returns a formatted user agent string for HTTP requests 23 + func UserAgent(appName, contactEmail string) string { 24 + return fmt.Sprintf("%s/%s (%s)", appName, Version, contactEmail) 25 + }
+1
website/.markdownlint.json
··· 1 1 { 2 2 "MD040": false, 3 3 "MD013": false, 4 + "MD024": false, 4 5 "MD025": false 5 6 }
+404
website/docs/Configuration.md
··· 1 + # Configuration 2 + 3 + Noteleaf stores its configuration in a TOML file. The configuration file location depends on your operating system and can be overridden with environment variables. 4 + 5 + ## Configuration File Location 6 + 7 + ### Default Paths 8 + 9 + **Linux:** 10 + 11 + ```sh 12 + ~/.config/noteleaf/.noteleaf.conf.toml 13 + ``` 14 + 15 + **macOS:** 16 + 17 + ```sh 18 + ~/Library/Application Support/noteleaf/.noteleaf.conf.toml 19 + ``` 20 + 21 + **Windows:** 22 + 23 + ```sh 24 + %APPDATA%\noteleaf\.noteleaf.conf.toml 25 + ``` 26 + 27 + ### Environment Variable Override 28 + 29 + Set `NOTELEAF_CONFIG` to use a custom configuration file location: 30 + 31 + ```sh 32 + export NOTELEAF_CONFIG=/path/to/custom/config.toml 33 + ``` 34 + 35 + ## Configuration Options 36 + 37 + ### General Settings 38 + 39 + #### date_format 40 + 41 + Format for displaying dates throughout the application. 42 + 43 + **Type:** String 44 + **Default:** `"2006-01-02"` (ISO 8601) 45 + **Example:** 46 + 47 + ```toml 48 + date_format = "2006-01-02" 49 + ``` 50 + 51 + Common formats: 52 + 53 + - `"2006-01-02"` - ISO format: 2024-03-15 54 + - `"01/02/2006"` - US format: 03/15/2024 55 + - `"02-Jan-2006"` - Short month: 15-Mar-2024 56 + 57 + #### color_scheme 58 + 59 + Color scheme for terminal output. 60 + 61 + **Type:** String 62 + **Default:** `"default"` 63 + **Example:** 64 + 65 + ```toml 66 + color_scheme = "default" 67 + ``` 68 + 69 + #### default_view 70 + 71 + Default view mode for interactive lists. 72 + 73 + **Type:** String 74 + **Default:** `"list"` 75 + **Example:** 76 + 77 + ```toml 78 + default_view = "list" 79 + ``` 80 + 81 + #### default_priority 82 + 83 + Default priority for new tasks when not specified. 84 + 85 + **Type:** String 86 + **Default:** None 87 + **Options:** `"low"`, `"medium"`, `"high"`, `"urgent"` 88 + **Example:** 89 + 90 + ```toml 91 + default_priority = "medium" 92 + ``` 93 + 94 + #### editor 95 + 96 + Text editor for editing notes and tasks. Falls back to `$EDITOR` environment variable if not set. 97 + 98 + **Type:** String 99 + **Default:** None (uses `$EDITOR`) 100 + **Example:** 101 + 102 + ```toml 103 + editor = "vim" 104 + ``` 105 + 106 + ### Data Storage 107 + 108 + #### database_path 109 + 110 + Custom path to SQLite database file. Leave empty to use default location. 111 + 112 + **Type:** String 113 + **Default:** Platform-specific data directory 114 + **Example:** 115 + 116 + ```toml 117 + database_path = "/custom/path/noteleaf.db" 118 + ``` 119 + 120 + #### data_dir 121 + 122 + Directory for storing application data (articles, notes, attachments). 123 + 124 + **Type:** String 125 + **Default:** Platform-specific data directory 126 + **Example:** 127 + 128 + ```toml 129 + data_dir = "/custom/data/directory" 130 + ``` 131 + 132 + You can also use the `NOTELEAF_DATA_DIR` environment variable: 133 + 134 + ```sh 135 + export NOTELEAF_DATA_DIR=/custom/data/directory 136 + ``` 137 + 138 + #### articles_dir 139 + 140 + Directory for storing saved articles. 141 + 142 + **Type:** String 143 + **Default:** `<data_dir>/articles` 144 + **Example:** 145 + 146 + ```toml 147 + articles_dir = "/path/to/articles" 148 + ``` 149 + 150 + #### notes_dir 151 + 152 + Directory for storing notes. 153 + 154 + **Type:** String 155 + **Default:** `<data_dir>/notes` 156 + **Example:** 157 + 158 + ```toml 159 + notes_dir = "/path/to/notes" 160 + ``` 161 + 162 + ### Archive and Export 163 + 164 + #### auto_archive 165 + 166 + Automatically archive completed tasks after a specified period. 167 + 168 + **Type:** Boolean 169 + **Default:** `false` 170 + **Example:** 171 + 172 + ```toml 173 + auto_archive = true 174 + ``` 175 + 176 + #### export_format 177 + 178 + Default format for exporting data. 179 + 180 + **Type:** String 181 + **Default:** `"json"` 182 + **Options:** `"json"`, `"csv"`, `"markdown"` 183 + **Example:** 184 + 185 + ```toml 186 + export_format = "json" 187 + ``` 188 + 189 + ### Synchronization 190 + 191 + Synchronization features are planned for future releases. 192 + 193 + #### sync_enabled 194 + 195 + Enable synchronization with remote server. 196 + 197 + **Type:** Boolean 198 + **Default:** `false` 199 + **Example:** 200 + 201 + ```toml 202 + sync_enabled = false 203 + ``` 204 + 205 + #### sync_endpoint 206 + 207 + URL of the synchronization server. 208 + 209 + **Type:** String 210 + **Default:** None 211 + **Example:** 212 + 213 + ```toml 214 + sync_endpoint = "https://sync.example.com/api" 215 + ``` 216 + 217 + #### sync_token 218 + 219 + Authentication token for synchronization. 220 + 221 + **Type:** String 222 + **Default:** None 223 + **Example:** 224 + 225 + ```toml 226 + sync_token = "your-secret-token" 227 + ``` 228 + 229 + ### API Keys 230 + 231 + #### movie_api_key 232 + 233 + API key for movie database services (future feature). 234 + 235 + **Type:** String 236 + **Default:** None 237 + **Example:** 238 + 239 + ```toml 240 + movie_api_key = "your-api-key" 241 + ``` 242 + 243 + #### book_api_key 244 + 245 + API key for book database services. Currently uses Open Library which doesn't require an API key. 246 + 247 + **Type:** String 248 + **Default:** None 249 + **Example:** 250 + 251 + ```toml 252 + book_api_key = "your-api-key" 253 + ``` 254 + 255 + ### AT Protocol / Bluesky Integration 256 + 257 + Configuration for publishing content to Bluesky/AT Protocol. 258 + 259 + #### atproto_did 260 + 261 + Your Decentralized Identifier (DID) on the AT Protocol network. 262 + 263 + **Type:** String 264 + **Default:** None 265 + **Example:** 266 + 267 + ```toml 268 + atproto_did = "did:plc:abcd1234efgh5678" 269 + ``` 270 + 271 + #### atproto_handle 272 + 273 + Your Bluesky/AT Protocol handle. 274 + 275 + **Type:** String 276 + **Default:** None 277 + **Example:** 278 + 279 + ```toml 280 + atproto_handle = "username.bsky.social" 281 + ``` 282 + 283 + #### atproto_pds_url 284 + 285 + Personal Data Server URL. 286 + 287 + **Type:** String 288 + **Default:** None 289 + **Example:** 290 + 291 + ```toml 292 + atproto_pds_url = "https://bsky.social" 293 + ``` 294 + 295 + #### atproto_access_jwt 296 + 297 + Access token for authentication (managed automatically). 298 + 299 + **Type:** String 300 + **Default:** None 301 + **Example:** 302 + 303 + ```toml 304 + atproto_access_jwt = "eyJhbGc..." 305 + ``` 306 + 307 + #### atproto_refresh_jwt 308 + 309 + Refresh token for authentication (managed automatically). 310 + 311 + **Type:** String 312 + **Default:** None 313 + 314 + #### atproto_expires_at 315 + 316 + Token expiration timestamp (managed automatically). 317 + 318 + **Type:** String (ISO8601) 319 + **Default:** None 320 + 321 + ## Managing Configuration 322 + 323 + ### View Current Configuration 324 + 325 + ```sh 326 + noteleaf config show 327 + ``` 328 + 329 + ### Set Configuration Value 330 + 331 + ```sh 332 + noteleaf config set <key> <value> 333 + ``` 334 + 335 + Examples: 336 + 337 + ```sh 338 + noteleaf config set editor "nvim" 339 + noteleaf config set default_priority "high" 340 + noteleaf config set date_format "01/02/2006" 341 + ``` 342 + 343 + ### Get Configuration Value 344 + 345 + ```sh 346 + noteleaf config get <key> 347 + ``` 348 + 349 + Example: 350 + 351 + ```sh 352 + noteleaf config get editor 353 + ``` 354 + 355 + ## Example Configuration 356 + 357 + Complete example configuration with common settings: 358 + 359 + ```toml 360 + # General settings 361 + date_format = "2006-01-02" 362 + color_scheme = "default" 363 + default_view = "list" 364 + default_priority = "medium" 365 + editor = "vim" 366 + 367 + # Data storage 368 + # database_path = "" # Use default location 369 + # data_dir = "" # Use default location 370 + 371 + # Archive and export 372 + auto_archive = false 373 + export_format = "json" 374 + 375 + # Synchronization (future feature) 376 + sync_enabled = false 377 + # sync_endpoint = "" 378 + # sync_token = "" 379 + 380 + # API keys (optional) 381 + # movie_api_key = "" 382 + # book_api_key = "" 383 + 384 + # AT Protocol / Bluesky (optional) 385 + # atproto_did = "" 386 + # atproto_handle = "" 387 + # atproto_pds_url = "https://bsky.social" 388 + ``` 389 + 390 + ## Environment Variables 391 + 392 + Noteleaf respects the following environment variables: 393 + 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) 397 + 398 + Example: 399 + 400 + ```sh 401 + export NOTELEAF_CONFIG=~/.config/noteleaf/config.toml 402 + export NOTELEAF_DATA_DIR=~/Documents/noteleaf-data 403 + export EDITOR=nvim 404 + ```
+276
website/docs/Quickstart.md
··· 1 + # Quickstart Guide 2 + 3 + This guide will walk you through installing Noteleaf and getting productive with tasks, notes, and media tracking in under 15 minutes. 4 + 5 + ## Installation 6 + 7 + ### Requirements 8 + 9 + - Go 1.24 or higher 10 + - Git (for cloning the repository) 11 + 12 + ### Build and Install 13 + 14 + Clone the repository and build the binary: 15 + 16 + ```sh 17 + git clone https://github.com/stormlightlabs/noteleaf 18 + cd noteleaf 19 + go build -o ./tmp/noteleaf ./cmd 20 + ``` 21 + 22 + Optionally, install to your GOPATH: 23 + 24 + ```sh 25 + go install 26 + ``` 27 + 28 + ## Initialize Noteleaf 29 + 30 + Set up the database and configuration: 31 + 32 + ```sh 33 + noteleaf setup 34 + ``` 35 + 36 + This creates: 37 + 38 + - Database at `~/.local/share/noteleaf/noteleaf.db` (Linux) or `~/Library/Application Support/noteleaf/noteleaf.db` (macOS) 39 + - Configuration file at `~/.config/noteleaf/config.toml` (Linux) or `~/Library/Application Support/noteleaf/config.toml` (macOS) 40 + 41 + ### Optional: Add Sample Data 42 + 43 + Explore with pre-populated examples: 44 + 45 + ```sh 46 + noteleaf setup seed 47 + ``` 48 + 49 + ## Task Management 50 + 51 + ### Create Your First Task 52 + 53 + ```sh 54 + noteleaf task add "Write project proposal" 55 + ``` 56 + 57 + ### Add a Task with Priority and Project 58 + 59 + ```sh 60 + noteleaf task add "Review pull requests" --priority high --project work 61 + ``` 62 + 63 + ### List Tasks 64 + 65 + Interactive mode with arrow key navigation: 66 + 67 + ```sh 68 + noteleaf task list 69 + ``` 70 + 71 + Static output for scripting: 72 + 73 + ```sh 74 + noteleaf task list --static 75 + ``` 76 + 77 + ### Mark a Task as Done 78 + 79 + ```sh 80 + noteleaf task done 1 81 + ``` 82 + 83 + ### Track Time 84 + 85 + Start tracking: 86 + 87 + ```sh 88 + noteleaf task start 1 89 + ``` 90 + 91 + Stop tracking: 92 + 93 + ```sh 94 + noteleaf task stop 1 95 + ``` 96 + 97 + View timesheet: 98 + 99 + ```sh 100 + noteleaf task timesheet 101 + ``` 102 + 103 + ## Note Taking 104 + 105 + ### Create a Note 106 + 107 + Quick note from command line: 108 + 109 + ```sh 110 + noteleaf note create "Meeting Notes" "Discussed Q4 roadmap and priorities" 111 + ``` 112 + 113 + Create with your editor: 114 + 115 + ```sh 116 + noteleaf note create --interactive 117 + ``` 118 + 119 + Create from a file: 120 + 121 + ```sh 122 + noteleaf note create --file notes.md 123 + ``` 124 + 125 + ### List and Read Notes 126 + 127 + List all notes (interactive): 128 + 129 + ```sh 130 + noteleaf note list 131 + ``` 132 + 133 + Read a specific note: 134 + 135 + ```sh 136 + noteleaf note read 1 137 + ``` 138 + 139 + ### Edit a Note 140 + 141 + Opens in your `$EDITOR`: 142 + 143 + ```sh 144 + noteleaf note edit 1 145 + ``` 146 + 147 + ## Media Tracking 148 + 149 + ### Books 150 + 151 + Search and add from Open Library: 152 + 153 + ```sh 154 + noteleaf media book add "Project Hail Mary" 155 + ``` 156 + 157 + List your reading queue: 158 + 159 + ```sh 160 + noteleaf media book list 161 + ``` 162 + 163 + Update reading progress: 164 + 165 + ```sh 166 + noteleaf media book progress 1 45 167 + ``` 168 + 169 + Mark as finished: 170 + 171 + ```sh 172 + noteleaf media book finished 1 173 + ``` 174 + 175 + ### Movies 176 + 177 + Add a movie: 178 + 179 + ```sh 180 + noteleaf media movie add "The Matrix" 181 + ``` 182 + 183 + Mark as watched: 184 + 185 + ```sh 186 + noteleaf media movie watched 1 187 + ``` 188 + 189 + ### TV Shows 190 + 191 + Add a show: 192 + 193 + ```sh 194 + noteleaf media tv add "Breaking Bad" 195 + ``` 196 + 197 + Update status: 198 + 199 + ```sh 200 + noteleaf media tv watching 1 201 + ``` 202 + 203 + ## Articles 204 + 205 + ### Save an Article 206 + 207 + Parse and save from URL: 208 + 209 + ```sh 210 + noteleaf article add https://example.com/interesting-post 211 + ``` 212 + 213 + ### List Articles 214 + 215 + ```sh 216 + noteleaf article list 217 + ``` 218 + 219 + Filter by author: 220 + 221 + ```sh 222 + noteleaf article list --author "Jane Smith" 223 + ``` 224 + 225 + ### Read an Article 226 + 227 + View in terminal: 228 + 229 + ```sh 230 + noteleaf article view 1 231 + ``` 232 + 233 + ## Configuration 234 + 235 + ### View Current Configuration 236 + 237 + ```sh 238 + noteleaf config show 239 + ``` 240 + 241 + ### Set Configuration Values 242 + 243 + ```sh 244 + noteleaf config set editor vim 245 + noteleaf config set default_priority medium 246 + ``` 247 + 248 + ### Check Status 249 + 250 + View application status and paths: 251 + 252 + ```sh 253 + noteleaf status 254 + ``` 255 + 256 + ## Getting Help 257 + 258 + View help for any command: 259 + 260 + ```sh 261 + noteleaf --help 262 + noteleaf task --help 263 + noteleaf task add --help 264 + ``` 265 + 266 + ## Next Steps 267 + 268 + Now that you have the basics down: 269 + 270 + - Explore advanced task filtering and queries 271 + - Create custom projects and contexts for organizing tasks 272 + - Link notes to tasks and media items 273 + - Set up recurring tasks and dependencies 274 + - Configure the application to match your workflow 275 + 276 + For detailed documentation on each command, see the CLI reference in the manual section.
+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 + ```