npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

todoflow-backend

v1.0.8

Published

TodoFlow - 支持Notion集成的命令行任务管理工具

Downloads

41

Readme

TodoFlow - 支持 Notion 集成的命令行任务管理工具

版本: v1.0.4 | 最后更新: 2025-08-30

TodoFlow 是一个现代化的任务管理解决方案,包含强大的 CLI 工具和完整的后端 API 服务。所有数据存储在 Notion 数据库中,支持多设备同步,提供无缝的任务管理体验。

📈 近期更新

v1.0.4 (2025-08-30)

  • ✅ 修复CLI命令执行后卡住的问题
  • ✅ 优化Notion API限制处理和同步机制
  • ✅ 支持 td c 命令批量完成任务
  • ✅ 配置自动发布流程
  • ✅ 简化GitHub Release notes避免YAML语法错误

🌟 项目特色

  • 🔗 Notion 集成: 数据存储在 Notion 数据库中,支持在线同步
  • 💻 CLI 工具: 强大的命令行界面,支持全局使用
  • 🔄 智能存储: 登录时使用 Notion,未登录时自动使用本地存储
  • 📊 同步队列: 智能后台同步,解决API限制问题
  • 🎯 高级筛选: 支持优先级、标签、状态等多维度筛选
  • ⚡ 性能监控: 实时显示API请求耗时和同步状态
  • � 一键安装: 支持多种安装方式,快速上手
  • 🔐 安全认证: JWT 认证,24小时有效期
  • 📱 跨平台: 支持 Windows、macOS、Linux

🚀 快速开始

一键安装(推荐)

在任何机器上运行一条命令即可完成安装:

curl -fsSL https://raw.githubusercontent.com/wenisy/todoflow-backend/main/install.sh | bash

本地安装(已克隆代码)

如果你已经克隆了代码:

cd todoflow-backend
./setup.sh          # 完整安装
./make-global.sh     # 只安装全局命令

卸载

./uninstall.sh       # 完全卸载

💻 CLI 使用

基本命令

# 查看帮助
todo help

# 登录
todo login <用户名> <密码>

# 添加任务
todo add "完成项目文档" --priority high --tags work,urgent

# 查看任务列表
todo list

# 完成任务
todo complete 1

# 编辑任务
todo edit 2 "更新项目文档" --priority medium

# 搜索任务
todo search "文档"

# 删除任务
todo remove 3

# 查看状态
todo status

# 登出
todo logout

高级功能

# 按优先级查看
todo list --priority high

# 查看所有任务(包括已完成)
todo list --all

# 查看已完成任务
todo list --completed

# 清除已完成任务
todo clear

🔧 架构说明

CLI 工具(命令行前端)

  • 智能存储切换: 根据登录状态自动选择 Notion 或本地存储
  • 全局命令: 支持在任何目录、任何 Node.js 版本下使用
  • 零配置: 无需设置环境变量,所有配置由服务器管理
  • 跨版本兼容: 智能包装器自动处理 Node.js 版本切换

后端 API(Vercel Serverless)

  • Notion 集成: 完整的 Notion 数据库操作
  • 用户认证: JWT 认证,24小时有效期
  • CORS 支持: 跨域资源共享配置
  • 环境变量管理: 服务器端统一配置

🛠️ 开发和部署

环境要求

  • Node.js: >= 14.0.0(推荐 v23.7.0)
  • npm: 最新版本
  • nvm: 可选,用于版本管理

环境变量配置

在 Vercel 或服务器上设置以下环境变量:

# Notion 配置
NOTION_SECRET=your_notion_api_key
CLI_DATABASE_ID=your_cli_database_id

# 认证配置
JWT_SECRET=your_jwt_secret_key
USERNAME=your_username
PASSWORD=your_password

本地开发

# 克隆项目
git clone https://github.com/wenisy/todoflow-backend.git
cd todoflow-backend

# 安装依赖
npm install

# 本地开发
npx vercel dev

部署

# 部署到 Vercel
npx vercel

# 或推送到 GitHub 自动部署
git push origin main

📚 API 文档

认证端点

  • POST /api/login: 用户登录,获取 JWT 令牌

CLI 任务管理

  • GET /api/notion/cli-tasks: 获取任务列表
  • POST /api/notion/cli-tasks: 创建新任务
  • PUT /api/notion/cli-tasks: 更新任务
  • DELETE /api/notion/cli-tasks: 删除任务

Notion 数据库管理

  • POST /api/notion/create-cli-db: 创建 CLI 专用数据库
  • POST /api/notion/create-db: 创建通用数据库
  • POST /api/notion/save: 保存数据到 Notion
  • POST /api/notion/load: 从 Notion 加载数据
  • POST /api/notion/delete: 删除 Notion 数据

文件处理

  • POST /api/upload: 文件上传

🔒 安全特性

  • JWT 认证: 所有 API 端点都需要有效的 JWT 令牌
  • 环境变量: 敏感信息存储在服务器环境变量中
  • CORS 配置: 跨域请求安全控制
  • Token 过期: 24小时自动过期,可手动登出

🌐 部署信息

  • 后端地址: https://visual-todoflow-backend.vercel.app
  • 部署平台: Vercel Serverless Functions
  • 数据存储: Notion 数据库
  • CDN: Vercel Edge Network

📖 详细文档

🛠️ 故障排除

常见问题

  1. 命令找不到

    # 卸载后重新安装
    ./uninstall.sh
    ./setup.sh
  2. 登录失败

    # 检查网络连接和凭据
    todo status
  3. Node.js 版本问题

    # 使用 nvm 切换版本
    nvm install v23.7.0
    nvm use v23.7.0
  4. 权限问题

    # 使用 sudo 安装
    sudo npm install -g . --force

🤝 贡献

欢迎提交 Issue 和 Pull Request!

📄 许可证

ISC License