@hasna/todos 0.1.0 → 0.1.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/README.md +149 -0
  2. package/package.json +4 -2
package/README.md ADDED
@@ -0,0 +1,149 @@
1
+ # @hasna/todos
2
+
3
+ Universal task management for AI coding agents. CLI + MCP server + web dashboard + library, all sharing a single SQLite database.
4
+
5
+ ## Features
6
+
7
+ - **CLI** with interactive TUI (React/Ink) and JSON output
8
+ - **MCP server** for Claude, Codex, Gemini, and any MCP-compatible agent
9
+ - **Web dashboard** with React/shadcn UI, dark mode, and real-time task management
10
+ - **Library** for programmatic access from Node.js/Bun
11
+ - **SQLite** with WAL mode, optimistic locking, and automatic migrations
12
+ - Task dependencies with cycle detection
13
+ - Exclusive agent locking with auto-expiry
14
+ - Full-text search across tasks
15
+ - Project auto-detection from git repositories
16
+ - Subtask hierarchies with cascade deletion
17
+
18
+ ## Installation
19
+
20
+ ```bash
21
+ bun add -g @hasna/todos
22
+ ```
23
+
24
+ ## Quick Start
25
+
26
+ ```bash
27
+ # Create a task
28
+ todos add "Fix login bug" --priority high --tags bug,auth
29
+
30
+ # List tasks
31
+ todos list
32
+
33
+ # Start working on a task
34
+ todos start <id>
35
+
36
+ # Mark complete
37
+ todos done <id>
38
+
39
+ # Launch interactive TUI
40
+ todos
41
+
42
+ # Start web dashboard
43
+ todos serve
44
+
45
+ # Register MCP server with AI agents
46
+ todos mcp --register all
47
+ ```
48
+
49
+ ## Web Dashboard
50
+
51
+ Start the dashboard with:
52
+
53
+ ```bash
54
+ todos serve # http://localhost:19420
55
+ todos serve -p 3000 # Custom port
56
+ todos serve --no-open # Don't auto-open browser
57
+ ```
58
+
59
+ Features: stats overview, sortable/filterable task table, create/edit/delete tasks, task detail with comments, dark mode toggle.
60
+
61
+ ## MCP Server
62
+
63
+ Register with your AI coding agents:
64
+
65
+ ```bash
66
+ todos mcp --register claude # Claude Code
67
+ todos mcp --register codex # Codex CLI
68
+ todos mcp --register gemini # Gemini CLI
69
+ todos mcp --register all # All agents
70
+ ```
71
+
72
+ Or start manually via stdio:
73
+
74
+ ```bash
75
+ todos-mcp
76
+ ```
77
+
78
+ ## CLI Commands
79
+
80
+ | Command | Description |
81
+ |---------|-------------|
82
+ | `todos add <title>` | Create a task |
83
+ | `todos list` | List tasks (active by default) |
84
+ | `todos show <id>` | Show full task details |
85
+ | `todos update <id>` | Update task fields |
86
+ | `todos start <id>` | Claim and start a task |
87
+ | `todos done <id>` | Mark task completed |
88
+ | `todos delete <id>` | Delete a task |
89
+ | `todos plan <title>` | Create a plan with subtasks |
90
+ | `todos comment <id> <text>` | Add a comment |
91
+ | `todos search <query>` | Search tasks |
92
+ | `todos deps <id>` | Manage dependencies |
93
+ | `todos projects` | List/manage projects |
94
+ | `todos export` | Export tasks (JSON or Markdown) |
95
+ | `todos serve` | Start web dashboard |
96
+ | `todos mcp` | Start MCP server |
97
+
98
+ Use `--json` for JSON output on any command. Use `--agent <name>` to identify the calling agent.
99
+
100
+ ## Library Usage
101
+
102
+ ```typescript
103
+ import { createTask, listTasks, completeTask } from "@hasna/todos";
104
+
105
+ const task = createTask({ title: "My task", priority: "high" });
106
+ const tasks = listTasks({ status: "pending" });
107
+ completeTask(task.id);
108
+ ```
109
+
110
+ ## Database
111
+
112
+ SQLite database with automatic location detection:
113
+
114
+ 1. `TODOS_DB_PATH` environment variable (`:memory:` for testing)
115
+ 2. `.todos/todos.db` in current directory
116
+ 3. `~/.todos/todos.db` global fallback
117
+
118
+ ## Development
119
+
120
+ ```bash
121
+ git clone https://github.com/hasna/todos.git
122
+ cd todos
123
+ bun install
124
+ bun test # Run 112 tests
125
+ bun run typecheck # TypeScript checking
126
+ bun run dev:cli # Run CLI in dev mode
127
+ bun run build:dashboard # Build web dashboard
128
+ ```
129
+
130
+ ## Architecture
131
+
132
+ ```
133
+ src/
134
+ types/ TypeScript types, enums, custom errors
135
+ db/ SQLite data layer (tasks, projects, comments, sessions)
136
+ lib/ Business logic (search)
137
+ cli/ Commander.js CLI + React/Ink TUI
138
+ mcp/ MCP server (stdio transport)
139
+ server/ Bun.serve() HTTP server + REST API
140
+ index.ts Library re-exports
141
+
142
+ dashboard/ Vite + React 19 + Tailwind 4 + shadcn web UI
143
+ ```
144
+
145
+ All surfaces (CLI, MCP, dashboard, library) call directly into `src/db/` — no intermediate service layer.
146
+
147
+ ## License
148
+
149
+ [Apache License 2.0](LICENSE)
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@hasna/todos",
3
- "version": "0.1.0",
3
+ "version": "0.1.1",
4
4
  "description": "Universal task management for AI coding agents - CLI + MCP server + interactive TUI",
5
5
  "type": "module",
6
6
  "main": "dist/index.js",
@@ -16,7 +16,9 @@
16
16
  }
17
17
  },
18
18
  "files": [
19
- "dist"
19
+ "dist",
20
+ "LICENSE",
21
+ "README.md"
20
22
  ],
21
23
  "scripts": {
22
24
  "build": "bun build src/cli/index.tsx --outdir dist/cli --target bun --external ink --external react --external chalk --external @modelcontextprotocol/sdk && bun build src/mcp/index.ts --outdir dist/mcp --target bun --external @modelcontextprotocol/sdk && bun build src/index.ts --outdir dist --target bun && cp src/types/index.ts dist/index.d.ts",