Skip to content

A CLI app for managing to-do lists, built with Node.js and TypeScript

Notifications You must be signed in to change notification settings

hyundonmoon/todo-cli

Repository files navigation

To-Do List CLI

A command-line tool to manage your to-do list. This tool allows you to add, list, toggle, and remove todos from your to-do list directly from the terminal.

Features

  • Add new todos
  • List all todos
  • Toggle the status of todos (mark as done/undone)
  • Remove todos

Installation

  1. Clone the repository:

    git clone https://github.com/hyundonmoon/todo-cli.git
    cd todo-cli
  2. Install dependencies:

    npm install
  3. Build app:

    npm run build
  4. Link the package locally:

    npm run todo-link

    This script will:

    • Unlink the package if it was linked before.
    • Set the dist/index.js file as executable.
    • Link the package again.

Usage

Once the package is linked, you can use the todo command from anywhere in your terminal.

Add a New Todo

To add a new todo, use the add command followed by its description:

todo add "Learn Node.js"

List All Todos

To list all todos, use the list or ls command:

todo list
todo ls

Toggle Todo Status

To toggle the status of one or more todos (mark as done/undone), use the toggle command:

todo toggle

You will be prompted to select todos to toggle their status.

Remove Todos

To remove one or more todos, use the remove or rm command:

todo remove
todo rm

You will be prompted to select todos to remove.

Examples

Adding Todos

$ todo add "Write README"
Added new todo: Write README

Listing Todos

$ todo list
1. [ ] Write README
2. [ ] Learn Node.js

Toggling Todo Statuses

$ todo toggle
? Which todo item status would you like to toggle?
 ◯ [ ] Write README
 ◯ [ ] Learn Node.js
Toggled the statuses of the following items:

Removing Todos

$ todo remove
? Which todo item would you like to delete?
 ◯ [ ] Write README
 ◯ [ ] Learn Node.js

Mark Todos As Done

$ todo mark-done
? Which todo item would you like to mark as done?
 ◯ [ ] Write README
 ◯ [ ] Learn Node.js
 Marked the following items as done:

Remove Finished Todos

$ todo remove-done
Removed all todo items marked as done.

About

A CLI app for managing to-do lists, built with Node.js and TypeScript

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published