A simple and powerful command-line task manager. Add, list, complete, edit, search, and track tasks right from your terminal — no account, no cloud, just a local JSON file in your home directory.
npm install -g command-line-tool-task-managerRequires Node.js >= 18
Once installed, the task command is available globally.
task add "Buy groceries"
task add "Submit report" --priority high
task list
task complete 1
task statsAdd a new task.
| Option | Alias | Description | Default |
|---|---|---|---|
--priority <level> |
-p |
high, medium, or low |
medium |
task add "Read documentation"
task add "Fix critical bug" -p high
task add "Clean up comments" -p lowList all tasks in a formatted table, sorted by status → priority → ID.
| Option | Alias | Description |
|---|---|---|
--filter <status> |
-f |
completed or pending |
--priority <level> |
-p |
high, medium, or low |
task list
task ls
task list --filter pending
task list --filter completed
task list --priority highMark a task as completed.
task complete 3
task done 3Edit a task's title or priority.
| Option | Alias | Description |
|---|---|---|
--title <title> |
-t |
New title |
--priority <level> |
-p |
New priority |
task edit 2 --title "Updated title"
task edit 2 --priority high
task edit 2 -t "New title" -p lowPermanently delete a task.
task delete 4
task rm 4Search tasks by keyword (case-insensitive). Matching text is highlighted.
task search bug
task search "meeting notes"Show completion statistics with a visual progress bar.
task stats Task Statistics
─────────────────────────────────
Total : 8
Completed : 5
Pending : 3
Progress : [██████████████████░░░░░░░░░░░░] 63%
Remove all completed tasks in one go.
task clearTasks are saved to ~/.task-manager/tasks.json. This file is created automatically on first use and persists across all directories and sessions.
To use a custom location (e.g. for per-project task lists):
TASK_MANAGER_DATA_DIR=/path/to/dir task listgit clone https://github.com/ankitw497/Command-Line-Task-Manager.git
cd Command-Line-Task-Manager
npm install
# Run the CLI locally
node src/index.js add "Test task"
# Or link it globally for development
npm link
task add "Test task"
# Run tests
npm testsrc/
index.js — CLI entry point (commands + argument parsing)
tasks.js — Business logic (add, complete, edit, delete, search …)
storage.js — JSON persistence (read/write ~/.task-manager/tasks.json)
display.js — Table rendering and output formatting
tests/
tasks.test.js — Unit tests for task operations (35 tests)
storage.test.js — Unit tests for storage layer
- Fork the repository
- Create a feature branch (
git checkout -b feat/my-feature) - Commit your changes
- Open a Pull Request
Please ensure all tests pass (npm test) before submitting.
MIT © Ankit Wahane