ts-task-manager-cli
v1.0.1
Published
A CLI task manager built with TypeScript
Downloads
139
Maintainers
Readme
Task Manager CLI
A command-line interface (CLI) application for managing tasks, built with TypeScript.
Features
- Add new tasks with title, description, priority, and status
- Complete tasks
- Update task status
- View all tasks
- View tasks by priority
- Delete all tasks
- Delete task by ID
- Delete tasks by filter
Folder Structure
task-manager-cli/
├── dist/
│ ├── cli.js
│ ├── TaskManager.js
│ └── types.js
├── src/
│ ├── cli.ts
│ ├── TaskManager.ts
│ └── types.ts
├── .gitignore
├── .npmignore
├── package.json
├── README.md
└── tsconfig.json
Installation
You can install the Task Manager CLI globally using npm:
npm install -g task-manager-cli
Usage
After installation, you can run the Task Manager CLI by typing task-manager
in your terminal:
task-manager
Commands
The CLI will present you with the following options:
Add a new task: Prompts you to enter task details (title, description, priority, status).
Example:
? Enter task title: Complete project report ? Enter task description: Finish the quarterly project report ? Select task priority: High ? Select task status: Todo Task added successfully!
Complete a task: Shows a list of tasks and allows you to mark one as completed.
Example:
? Select a task to complete: Complete project report Task status changed from Todo to Completed
Update task status: Allows you to change the status of a task.
Example:
? Select a task to update: Review code changes ? Select new status: InProgress Task status changed from Todo to InProgress
View all tasks: Displays a table with all tasks.
Example:
┌─────────┬──────────────────────┬────────────────────────────────┬──────────┬────────────┐ │ (index) │ title │ description │ priority │ status │ ├─────────┼──────────────────────┼────────────────────────────────┼──────────┼────────────┤ │ 1 │ Complete project ... │ Finish the quarterly proje ... │ 'High' │ 'Completed'│ │ 2 │ Review code changes │ Review pull request #42 │ 'Medium' │ 'InProgr..'│ └─────────┴──────────────────────┴────────────────────────────────┴──────────┴────────────┘
View tasks by priority: Allows you to filter tasks by priority (Low, Medium, High).
Example:
? Select priority: High ┌─────────┬──────────────────────┬────────────────────────────────┬──────────┬────────────┐ │ (index) │ title │ description │ priority │ status │ ├─────────┼──────────────────────┼────────────────────────────────┼──────────┼────────────┤ │ 1 │ Complete project ... │ Finish the quarterly proje ... │ 'High' │ 'Completed'│ └─────────┴──────────────────────┴────────────────────────────────┴──────────┴────────────┘
Delete all tasks: Deletes all tasks in the system.
Delete task by ID: Allows you to delete a specific task by its ID. Example:
? Complete project
Delete tasks by filter: Allows you to delete tasks based on specific criteria (ID, title, description, priority, or status).
Example:
? id title description priority status
Exit: Closes the application.
Development
To set up the project for development:
Clone the repository:
git clone https://github.com/Slygriyrsk/ts-task-manager-cli.git cd ts-task-manager-cli
Install dependencies:
npm install
Build the project:
npm run build
- Run the CLI in development mode:
npm start
Contributing
Contributions are welcome! Please feel free to submit a Pull Request.