| name | j-cli |
| description | j-cli (work-copilot) command-line tool for daily workflow automation. TRIGGER when user wants to: (1) manage daily/weekly reports (日报/周报/report), (2) manage todo items (待办/todo), (3) open apps or URLs via aliases, (4) register/manage app aliases (别名), (5) create or run preset scripts (脚本/concat), (6) install or check j-cli availability. DO NOT TRIGGER for general shell commands unrelated to j-cli. |
j-cli (work-copilot)
A CLI tool for workflow automation: aliases, reports, todos, scripts.
Prerequisites
Before using any j-cli command, verify it is installed:
bash <skill-path>/scripts/ensure_j.sh
If the script is unavailable, check manually:
command -v j && j version
curl -fsSL https://raw.githubusercontent.com/LingoJack/jcli/main/install.sh | sh
Core Workflows
1. Daily/Weekly Report (日报/周报)
Report and weekly report are the same concept — j uses a single week_report.md file.
j report "完成了XX功能开发"
j check
j check 20
j search all <keyword>
j search all <keyword> -f
j reportctl open
j reportctl new
j reportctl push "update report"
j reportctl pull
j reportctl set-url <repo_url>
IMPORTANT: Always use j report to write entries. NEVER directly edit ~/.jdata/report/week_report.md. Use j reportctl push to push, NOT raw git commands.
2. Todo Management (待办)
j todo add "买牛奶"
j todo list
j todo list --undone
j todo list --done
j todo
j td
The TUI interface supports keyboard navigation, toggling completion, editing, deleting, reordering, and optional write-to-report on completion.
3. Alias Management (open apps/URLs)
Register aliases for apps, URLs, or files, then open them with one command:
j set chrome "/Applications/Google Chrome.app"
j set github https://github.com
j note chrome browser
j chrome
j chrome github
j chrome "rust lang"
j vscode ./src
j ls
j ls all
j rm <alias>
j rename <alias> <new>
j mf <alias> <new_path>
4. Script Preset (脚本预制)
Create reusable scripts stored at ~/.jdata/scripts/, registered as aliases for quick execution:
j concat deploy "#!/bin/bash\necho deploying..."
j concat deploy
j deploy
j deploy -w
Scripts automatically get all registered aliases as environment variables (J_<ALIAS_UPPER>):
#!/bin/bash
open -a "$J_CHROME" https://example.com
5. Other Useful Commands
j version
j update
j help
j
j time countdown 5m
Reference Files
Key Reminders
- Use
j report for writing entries, not file editing
- Use
j reportctl push for pushing reports, not git commands
- Use
j todo add for adding todos programmatically
- Use
j concat for creating scripts, not manually writing to ~/.jdata/scripts/
- Paths with spaces must be quoted:
j set app "/Applications/My App.app"