@devpad/cli 2.0.0 → 2.0.2
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.
- package/README.md +141 -0
- package/dist/index.js +13112 -519
- package/package.json +4 -4
- package/dist/index.d.ts +0 -2
package/README.md
ADDED
|
@@ -0,0 +1,141 @@
|
|
|
1
|
+
# @devpad/cli
|
|
2
|
+
|
|
3
|
+
Command-line interface for devpad project and task management.
|
|
4
|
+
|
|
5
|
+
## Get an API Key
|
|
6
|
+
|
|
7
|
+
1. Sign up at [devpad.tools](https://devpad.tools)
|
|
8
|
+
2. Go to [devpad.tools/account](https://devpad.tools/account)
|
|
9
|
+
3. Generate an API key
|
|
10
|
+
|
|
11
|
+
## Installation
|
|
12
|
+
|
|
13
|
+
```bash
|
|
14
|
+
bun install -g @devpad/cli
|
|
15
|
+
```
|
|
16
|
+
|
|
17
|
+
Or run directly with bunx:
|
|
18
|
+
|
|
19
|
+
```bash
|
|
20
|
+
bunx @devpad/cli projects list
|
|
21
|
+
```
|
|
22
|
+
|
|
23
|
+
## Configuration
|
|
24
|
+
|
|
25
|
+
Set your API key as an environment variable:
|
|
26
|
+
|
|
27
|
+
```bash
|
|
28
|
+
export DEVPAD_API_KEY="your-api-key"
|
|
29
|
+
```
|
|
30
|
+
|
|
31
|
+
Or add it to your shell profile (`~/.bashrc`, `~/.zshrc`, etc.):
|
|
32
|
+
|
|
33
|
+
```bash
|
|
34
|
+
echo 'export DEVPAD_API_KEY="your-api-key"' >> ~/.zshrc
|
|
35
|
+
```
|
|
36
|
+
|
|
37
|
+
### Environment Variables
|
|
38
|
+
|
|
39
|
+
| Variable | Required | Description |
|
|
40
|
+
|----------|----------|-------------|
|
|
41
|
+
| `DEVPAD_API_KEY` | Yes | Your API key from devpad.tools/account |
|
|
42
|
+
| `DEVPAD_BASE_URL` | No | API base URL (default: https://devpad.tools/api/v1) |
|
|
43
|
+
|
|
44
|
+
## Usage
|
|
45
|
+
|
|
46
|
+
### Projects
|
|
47
|
+
|
|
48
|
+
```bash
|
|
49
|
+
devpad projects list
|
|
50
|
+
devpad projects get <id-or-name>
|
|
51
|
+
```
|
|
52
|
+
|
|
53
|
+
### Tasks
|
|
54
|
+
|
|
55
|
+
```bash
|
|
56
|
+
devpad tasks list
|
|
57
|
+
devpad tasks list --project <project-id>
|
|
58
|
+
devpad tasks get <id>
|
|
59
|
+
devpad tasks create --title "My task" --project <project-id>
|
|
60
|
+
devpad tasks create --title "Bug fix" --project <id> --priority high --summary "Fix the login bug"
|
|
61
|
+
devpad tasks done <id>
|
|
62
|
+
devpad tasks todo <id>
|
|
63
|
+
devpad tasks delete <id> --yes
|
|
64
|
+
devpad tasks history <id>
|
|
65
|
+
```
|
|
66
|
+
|
|
67
|
+
### Milestones
|
|
68
|
+
|
|
69
|
+
```bash
|
|
70
|
+
devpad milestones list
|
|
71
|
+
devpad milestones list --project <project-id>
|
|
72
|
+
devpad milestones create --name "v1.0" --project <project-id>
|
|
73
|
+
```
|
|
74
|
+
|
|
75
|
+
### Goals
|
|
76
|
+
|
|
77
|
+
```bash
|
|
78
|
+
devpad goals list
|
|
79
|
+
devpad goals create --name "Launch MVP" --milestone <milestone-id>
|
|
80
|
+
```
|
|
81
|
+
|
|
82
|
+
### Tags
|
|
83
|
+
|
|
84
|
+
```bash
|
|
85
|
+
devpad tags list
|
|
86
|
+
```
|
|
87
|
+
|
|
88
|
+
### GitHub
|
|
89
|
+
|
|
90
|
+
```bash
|
|
91
|
+
devpad github repos
|
|
92
|
+
devpad github branches <owner> <repo>
|
|
93
|
+
```
|
|
94
|
+
|
|
95
|
+
### User
|
|
96
|
+
|
|
97
|
+
```bash
|
|
98
|
+
devpad user history
|
|
99
|
+
devpad user preferences --user-id <id> --view list
|
|
100
|
+
```
|
|
101
|
+
|
|
102
|
+
## Output Formats
|
|
103
|
+
|
|
104
|
+
All list and get commands support `--format` option:
|
|
105
|
+
|
|
106
|
+
```bash
|
|
107
|
+
devpad projects list --format json # JSON output (default)
|
|
108
|
+
devpad projects list --format table # Table output
|
|
109
|
+
```
|
|
110
|
+
|
|
111
|
+
JSON output can be piped to `jq` for further processing:
|
|
112
|
+
|
|
113
|
+
```bash
|
|
114
|
+
devpad projects list | jq '.[].name'
|
|
115
|
+
devpad tasks list | jq '.[] | select(.task.priority == "HIGH")'
|
|
116
|
+
```
|
|
117
|
+
|
|
118
|
+
## Examples
|
|
119
|
+
|
|
120
|
+
List all high-priority tasks:
|
|
121
|
+
```bash
|
|
122
|
+
devpad tasks list | jq '.[] | select(.task.priority == "HIGH") | .task.title'
|
|
123
|
+
```
|
|
124
|
+
|
|
125
|
+
Get task count per project:
|
|
126
|
+
```bash
|
|
127
|
+
devpad tasks list | jq 'group_by(.task.project_id) | map({project: .[0].task.project_id, count: length})'
|
|
128
|
+
```
|
|
129
|
+
|
|
130
|
+
Create a task and get its ID:
|
|
131
|
+
```bash
|
|
132
|
+
devpad tasks create --title "New feature" --project my-project | jq '.id'
|
|
133
|
+
```
|
|
134
|
+
|
|
135
|
+
## Development
|
|
136
|
+
|
|
137
|
+
```bash
|
|
138
|
+
bun install
|
|
139
|
+
bun run build
|
|
140
|
+
DEVPAD_API_KEY=your-key bun run src/index.ts projects list
|
|
141
|
+
```
|