A simple command-line todo manager built with Node.js, Commander, and Chalk. Stores todos in a JSON file and supports managing tasks via a command-line interface for individual folders.
- Create, edit, and delete todos directly from the terminal
- View todos with clear completion indicators (
[✔]/[ ]) - Mark tasks as completed or toggle their status
- Search todos by keyword
- View completion statistics (completed vs pending)
- Clear all todos with a single command
- Persistent local storage using
todos.json
Before installing, ensure you have the following:
- Node.js:
v20.0.0or higher (Required for Commander.js 14)
node --version- npm: Node Package Manager (comes with Node.js)
npm --versionIf not installed, install it from here
git clone https://github.com/Balaji-R-05/todo-cli.git
cd todo-cliRun the script for your Operating System to install dependencies and link the command globally:
- Windows: Double-click
setup.bator run:setup.bat
If
npm linkfails, re-runsetup.batas Administrator.
- Linux / macOS: Run:
chmod +x setup.sh && ./setup.sh
Once installed, you can run the todo command from any directory in your terminal. Note that todos are stored locally in a todos.json file in whichever folder you run the command.
| Command | Shorthand | Description |
|---|---|---|
todo init |
- | Initialize todo-cli (optional) |
todo add "task" |
a |
Add a new task |
todo show |
ls |
List all tasks |
todo toggle <num> |
t |
Toggle completion of task |
todo complete <num> |
c |
Mark task as completed |
todo edit <num> "text" |
e |
Update task text |
todo delete <num> |
d |
Remove task |
todo stats |
st |
See completion stats |
todo search "key" |
se |
Find tasks by keyword |
todo clear |
cls |
Delete ALL tasks |
todo init
todo add | a "Master Node.js"
todo show | ls
todo toggle | t 1
todo complete | c 1
todo edit | e 1 "Master Node.js"
todo delete | d 1
todo stats | st
todo search | se "node"
todo clear | clsTo fully remove the global todo command and clean up:
- Open your terminal inside the
todo-clifolder. - Run the script for your OS:
- Windows:
uninstall.bat - Linux / macOS:
./uninstall.sh
- Windows:
- Close the terminal.
- Delete the
todo-clifolder from your computer.