New:Introducing Socket Scanning for VS Code Marketplace Extensions.Learn more →
Get Started

@walknpm/todo-cli

Package Overview
Dependencies
Maintainers
1
Versions
4
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install
Malware was recently detected in this package.

Affected versions:

2.0.1

@walknpm/todo-cli

A zero-dependency Node.js CLI todo list manager with CRUD, due dates, search, stats, export, and auto-update.

npmnpm
Version
1.1.0
Version published
Weekly downloads
424
14033.33%
Maintainers
1
Weekly downloads
 
Created
Source

todo-cli

English | 简体中文

A zero-dependency Node.js CLI todo list manager. Full CRUD, completion toggle, categories/tags, priority sorting, due dates with overdue highlighting, search, statistics, and export (JSON / CSV / Markdown). Data persists to ~/.todo-cli/todos.json.

Requirements

  • Node.js >= 18

Quick install

git clone https://gitcode.com/hw_aishell_projects/todo_cli.git
cd todo_cli
npm install -g .
todo --version   # → todo v1.0.0

Commands

CommandDescription
add <title>Add a new todo
listList todos (default command)
done <id>Mark a todo as done (done --all = complete all)
toggle <id>Toggle done / pending
edit <id>Edit a todo
delete <id>Delete a todo
search <keyword>Search title / tags / category / note
statsShow summary statistics
export [json|csv|md]Export all todos to stdout
archiveRemove all completed todos
updateUpdate todo-cli to latest (--check = check only)
clearRemove ALL todos
helpShow help

-h / --help can be appended to any command (or used alone) to show help. -v / --version prints the version.

Flags

FlagApplies toDescription
-p, --priority <v>add, edithigh | medium | low (default: medium)
-t, --tags <v>add, editComma-separated tags
-c, --category <v>add, editCategory name
-d, --due <v>add, editDue date YYYY-MM-DD
--note <v>add, editLonger note / description
--title <v>editNew title
--status <v>listall | done | pending
--tag <v>listFilter by tag
--sort <v>listpriority | created | due | id
--alldoneComplete all pending
--checkupdateCheck for update without installing
--format <v>exportjson | csv | md (default: json)

Examples

# Add with due date, priority, tags, category, and note
todo add "Submit tax return" -p high -d 2025-01-31 -c finance -t urgent,monthly --note "Include receipts"

# List & filter
todo list
todo list --status pending --sort due
todo list --category work --priority high

# Search
todo search tax

# Bulk complete & archive
todo done --all
todo archive

# Statistics
todo stats

# Auto-update
todo update --check   # check for updates
todo update           # install latest version

# Export
todo export csv > todos.csv
todo export md

Project structure

todo_cli/
├── bin/
│   └── todo.js        # executable entry point (shebang)
├── src/
│   ├── store.js       # JSON file persistence layer
│   ├── todo.js        # domain logic (CRUD, search, stats, export, ...)
│   └── cli.js         # command parsing, ANSI colours, table output
├── package.json
├── README.md          # English documentation
└── README.zh-CN.md    # Chinese documentation

🤖 AI 自动部署提示词

以下提示词可直接粘贴给 AI 助手(如 Claude、ChatGPT、DeepSeek 等),AI 会自动完成部署。 复制对应场景的代码块即可。

场景一:从零安装并验证

请帮我安装部署 todo-cli 命令行待办工具,步骤如下:

1. 克隆仓库:git clone https://gitcode.com/hw_aishell_projects/todo_cli.git
2. 进入目录:cd todo_cli
3. 全局安装:npm install -g .
4. 验证安装:运行 todo --version,确认输出 "todo v1.0.0"
5. 功能验证:依次执行以下命令并确认每步输出正常:
   - todo add "部署测试任务" -p high -t test -c verify
   - todo list
   - todo done 1
   - todo stats
   - todo clear
6. 如果任何步骤报错,请展示完整错误信息并尝试修复。

完成后告诉我安装路径和 todo --version 的输出。

场景二:安装 + 导入已有数据

请帮我部署 todo-cli 并导入已有待办数据:

1. 克隆并安装:
   git clone https://gitcode.com/hw_aishell_projects/todo_cli.git
   cd todo_cli && npm install -g .

2. 确认 todo --version 正常输出。

3. 以下是我的待办事项,请逐条用 todo add 命令创建(根据内容自动判断优先级、分类和标签):
   - [在此粘贴你的待办列表,每行一条]

4. 创建完成后运行 todo list 和 todo stats,把结果展示给我确认。

场景三:卸载

请帮我卸载 todo-cli 工具:

1. 运行 npm uninstall -g todo-cli
2. 删除数据文件:rm -rf ~/.todo-cli
3. 运行 todo --version 确认已无法找到该命令
4. 告诉我卸载是否成功。

场景四:更新到最新版本

请帮我更新 todo-cli 到最新版本:

1. 运行 todo update --check 检查是否有新版本
2. 如果有更新,运行 todo update 自动安装最新版
3. 运行 todo --version 确认版本号已更新
4. 运行 todo list 确认已有数据未丢失
5. 告诉我更新结果。

场景五:完整部署(含数据备份与恢复)

请帮我完成 todo-cli 的完整部署流程:

【安装】
1. git clone https://gitcode.com/hw_aishell_projects/todo_cli.git
2. cd todo_cli && npm install -g .
3. 确认 todo --version 输出版本号

【备份】(如果 ~/.todo-cli/todos.json 已存在)
4. 如果存在 ~/.todo-cli/todos.json,先备份到 ~/todo-backup-$(date +%Y%m%d).json
5. 确认备份文件内容有效

【验证】
6. 执行 todo add "验证任务" -p medium 并确认输出
7. 执行 todo list 确认表格正常显示
8. 执行 todo delete 1 清理验证数据

【恢复】(如果有备份)
9. 如果之前做了备份,将备份文件复制回 ~/.todo-cli/todos.json
10. 执行 todo list 确认数据已恢复

最后汇总报告:安装状态、版本号、备份/恢复状态。

License

MIT

Keywords

todo

FAQs

Package last updated on 29 Aug 2026

Related posts