Project from roadmap backend projects
A simple command-line interface for tracking tasks. Add, update, delete, and manage tasks with different statuses directly from your terminal.
- ✅ Add new tasks
- 📝 Update task descriptions
- 🗑️ Delete tasks
- 🔄 Change task status (todo, in-progress, done)
- 📋 List tasks with filtering options
- 🔄 Reset all tasks
- Node.js (version 12 or higher)
- npm
-
Clone or download this repository
-
Navigate to the project directory:
cd task-tracker-cli -
Install dependencies:
npm install
-
Link the package globally to use the
trackercommand:npm link
If you don't want to install globally, you can run commands directly:
node index.js <command> [arguments]tracker add "Your task description"Example:
tracker add "Buy groceries"
tracker add "Complete project documentation"# List all tasks
tracker list
# List tasks by status
tracker list todo # Show pending tasks
tracker list in-progress # Show tasks in progress
tracker list done # Show completed taskstracker update <id> "New description"Example:
tracker update 1 "Buy groceries and cook dinner"# Mark task as in progress
tracker mark-in-progress <id>
# Mark task as completed
tracker mark-done <id>Example:
tracker mark-in-progress 1
tracker mark-done 2tracker delete <id>Example:
tracker delete 1# Show help
tracker help
# Reset all tasks (delete everything)
tracker resetEach task contains the following information:
- ID: Unique identifier (auto-generated)
- Description: Task description
- Status: Current status (
todo,in-progress, ordone) - Created At: Timestamp when task was created
- Updated At: Timestamp when task was last modified
Tasks are stored in a list.json file in the project directory. This file is automatically created and managed by the application.
Here's a complete workflow example:
# Add some tasks
tracker add "Learn Node.js"
tracker add "Build a CLI app"
tracker add "Write documentation"
# List all tasks
tracker list
# Start working on task 1
tracker mark-in-progress 1
# Complete task 1
tracker mark-done 1
# Update task description
tracker update 2 "Build an awesome CLI app"
# List only completed tasks
tracker list done
# List tasks in progress
tracker list in-progressIf you get a "command not found" error:
- Make sure you ran
npm linkin the project directory - Alternatively, use
node index.jsinstead oftracker
On Unix-like systems, you might need to make the file executable:
chmod +x index.jsIf you encounter JSON parsing errors, check that list.json exists and contains valid JSON. You can reset it by running:
tracker resettask-tracker-cli/
├── index.js # Main entry point
├── package.json # Project configuration
├── list.json # Task data storage
├── scripts/
│ ├── help.js # Help command functionality
│ └── crudList.js # Task CRUD operations
└── README.md # This file
Feel free to contribute to this project by:
- Reporting bugs
- Suggesting new features
- Submitting pull requests
This project is licensed under the ISC License.
Pedro Higuera