This directory contains example plugins that demonstrate how to extend Worklog with custom commands.
A comprehensive example showing database access, JSON output mode support, initialization checking, error handling, and statistics calculation.
Features:
- Shows total work items
- Breaks down items by status and priority
- Counts items with parents, tags, and comments
- Supports both human-readable and JSON output
Installation:
cp examples/stats-plugin.mjs .worklog/plugins/
worklog statsNote: running wl init will automatically install examples/stats-plugin.mjs into your project's .worklog/plugins/ directory if it is not already present.
Demonstrates bulk operations - adding tags to multiple work items filtered by status.
Installation:
cp examples/bulk-tag-plugin.mjs .worklog/plugins/
worklog bulk-tag -t feature -s openExports work items to CSV format with proper escaping and file system operations.
Installation:
cp examples/export-csv-plugin.mjs .worklog/plugins/
worklog export-csv -f output.csv-
Copy an example plugin:
cp examples/stats-plugin.mjs .worklog/plugins/
-
Verify it appears:
worklog --help # Should show your command worklog plugins # Lists discovered plugins
-
Test the command:
worklog stats worklog stats --json
For complete documentation on creating custom plugins, see the Plugin Development Guide, which includes:
- Plugin API reference with TypeScript signatures
- Development workflow (TypeScript → ESM compilation)
- Best practices and patterns
- Troubleshooting guide
- Security considerations