codiedev 0.3.3 → 0.3.4
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/dist/cli.js +248 -3
- package/package.json +1 -1
package/dist/cli.js
CHANGED
|
@@ -25,6 +25,10 @@ const promote_1 = require("./commands/promote");
|
|
|
25
25
|
const HELP = `
|
|
26
26
|
CodieDev CLI
|
|
27
27
|
|
|
28
|
+
The team artifact layer for agent-coded work. Share specs and reviews
|
|
29
|
+
with teammates, get pinged when they need your input, pick up where
|
|
30
|
+
someone left off across sessions and providers.
|
|
31
|
+
|
|
28
32
|
Connect:
|
|
29
33
|
codiedev connect Link Claude Code / Codex to your org
|
|
30
34
|
|
|
@@ -45,19 +49,260 @@ Capture:
|
|
|
45
49
|
codiedev note "<text>" Capture a passing thought
|
|
46
50
|
|
|
47
51
|
Other:
|
|
48
|
-
codiedev help
|
|
52
|
+
codiedev help [command] Show this help, or details for one command
|
|
53
|
+
codiedev docs Print the full usage guide
|
|
49
54
|
codiedev version Show version
|
|
50
55
|
|
|
56
|
+
Filename conventions:
|
|
57
|
+
spec-*.md → spec review-*.md → review
|
|
58
|
+
decision-*.md → decision proposal-*.md → proposal
|
|
59
|
+
bugfix-*.md → bugfix anything else → note
|
|
60
|
+
|
|
61
|
+
Examples:
|
|
62
|
+
codiedev push docs/specs/spec-cart-clear.md
|
|
63
|
+
codiedev pull spec-cart-clear.md
|
|
64
|
+
codiedev ping maya "thoughts on batch vs parallel?" --with spec-cart-clear.md
|
|
65
|
+
codiedev inbox --unread
|
|
66
|
+
codiedev note "idempotency key is worth a follow-up"
|
|
67
|
+
|
|
51
68
|
Backend: ${process.env.CODIEDEV_URL ?? "https://codiedev.com"}
|
|
69
|
+
Token: https://codiedev.com/portal/integrations/claude-code
|
|
70
|
+
Docs: codiedev docs
|
|
71
|
+
`.trim();
|
|
72
|
+
const COMMAND_HELP = {
|
|
73
|
+
connect: `
|
|
74
|
+
codiedev connect — link your agent CLI to CodieDev
|
|
75
|
+
|
|
76
|
+
Interactive setup. Prompts for an API token, then installs:
|
|
77
|
+
- ~/.codiedev/config.json (token + org + tracked repos)
|
|
78
|
+
- ~/.claude/settings.json hook (captures session transcripts)
|
|
79
|
+
- ~/.claude/CLAUDE.md instructions (teaches Claude the commands)
|
|
80
|
+
- ~/.codex/hooks.json hook (same, for Codex)
|
|
81
|
+
- ~/.codex/AGENTS.md instructions (same, for Codex)
|
|
82
|
+
|
|
83
|
+
Re-run anytime to swap accounts or refresh the instruction block.
|
|
84
|
+
|
|
85
|
+
Get your token: https://codiedev.com/portal/integrations/claude-code
|
|
86
|
+
`.trim(),
|
|
87
|
+
push: `
|
|
88
|
+
codiedev push — author or update an artifact
|
|
89
|
+
|
|
90
|
+
Usage:
|
|
91
|
+
codiedev push <file.md> [--type spec|review|decision|proposal|bugfix|note]
|
|
92
|
+
|
|
93
|
+
The file's basename becomes its key (unique per company). Pushing the
|
|
94
|
+
same key again creates a new version — full history is preserved.
|
|
95
|
+
|
|
96
|
+
Type is inferred from the filename prefix unless you override with --type.
|
|
97
|
+
|
|
98
|
+
Examples:
|
|
99
|
+
codiedev push spec-cart-clear.md
|
|
100
|
+
codiedev push docs/review-auth.md --type review
|
|
101
|
+
codiedev push notes/random.md --type note
|
|
102
|
+
`.trim(),
|
|
103
|
+
pull: `
|
|
104
|
+
codiedev pull — fetch an artifact
|
|
105
|
+
|
|
106
|
+
Usage:
|
|
107
|
+
codiedev pull <key> [--version N] [--out path.md]
|
|
108
|
+
|
|
109
|
+
By default prints to stdout (pipe-friendly). --out writes to a file.
|
|
110
|
+
--version gets a specific historical version; omit for the latest.
|
|
111
|
+
|
|
112
|
+
Examples:
|
|
113
|
+
codiedev pull spec-cart-clear.md
|
|
114
|
+
codiedev pull spec-cart-clear.md --version 2
|
|
115
|
+
codiedev pull spec-cart-clear.md --out ./local-copy.md
|
|
116
|
+
codiedev pull spec-cart-clear.md | less
|
|
117
|
+
`.trim(),
|
|
118
|
+
ping: `
|
|
119
|
+
codiedev ping — send a teammate a message, optionally attached to an artifact
|
|
120
|
+
|
|
121
|
+
Usage:
|
|
122
|
+
codiedev ping <user> "<message>" [--with <artifact-key>]
|
|
123
|
+
|
|
124
|
+
<user> resolves to a teammate in your org by first name, full name,
|
|
125
|
+
or email. Ambiguous matches return a list — retry with the full email.
|
|
126
|
+
|
|
127
|
+
Teammates are notified by email and can reply from their own agent.
|
|
128
|
+
|
|
129
|
+
Examples:
|
|
130
|
+
codiedev ping maya "thoughts on batch vs parallel?" --with spec-cart-clear.md
|
|
131
|
+
codiedev ping nic@signalandcode.co "can you take this one?"
|
|
132
|
+
`.trim(),
|
|
133
|
+
inbox: `
|
|
134
|
+
codiedev inbox — show messages from teammates
|
|
135
|
+
|
|
136
|
+
Usage:
|
|
137
|
+
codiedev inbox [--unread] [--limit N]
|
|
138
|
+
|
|
139
|
+
Lists pings with sender, subject artifact, and preview. Each row
|
|
140
|
+
shows a ping-id you can pass to 'codiedev read'.
|
|
141
|
+
|
|
142
|
+
Unread rows show as ● ; read rows as · .
|
|
143
|
+
|
|
144
|
+
Examples:
|
|
145
|
+
codiedev inbox
|
|
146
|
+
codiedev inbox --unread
|
|
147
|
+
codiedev inbox --limit 10
|
|
148
|
+
`.trim(),
|
|
149
|
+
read: `
|
|
150
|
+
codiedev read — mark a ping as read and show its full content
|
|
151
|
+
|
|
152
|
+
Usage:
|
|
153
|
+
codiedev read <ping-id>
|
|
154
|
+
|
|
155
|
+
Grab the ping-id from 'codiedev inbox'. After reading, the ping will
|
|
156
|
+
drop out of 'codiedev inbox --unread' and the portal inbox badge
|
|
157
|
+
decrements for you.
|
|
158
|
+
`.trim(),
|
|
159
|
+
note: `
|
|
160
|
+
codiedev note — capture a passing thought, linked to your session
|
|
161
|
+
|
|
162
|
+
Usage:
|
|
163
|
+
codiedev note "<text>"
|
|
164
|
+
|
|
165
|
+
Stores the note in your org memory so you can search it later or
|
|
166
|
+
reference it in a ticket. Notes appear in the portal under the
|
|
167
|
+
Agent Inbox → My authored artifacts.
|
|
168
|
+
|
|
169
|
+
Examples:
|
|
170
|
+
codiedev note "idempotency key is worth a follow-up"
|
|
171
|
+
codiedev note "timeout threshold feels arbitrary — validate on slow networks"
|
|
172
|
+
`.trim(),
|
|
173
|
+
promote: `
|
|
174
|
+
codiedev promote — promote an auto-extracted artifact to authored
|
|
175
|
+
|
|
176
|
+
Usage:
|
|
177
|
+
codiedev promote <artifact-id> [--key filename.md]
|
|
178
|
+
|
|
179
|
+
The session-capture pipeline auto-extracts spec/bugfix/decision
|
|
180
|
+
artifacts from each agent session. Promote turns one of those into
|
|
181
|
+
a first-class authored artifact your team can ping, pull, and
|
|
182
|
+
update versions of.
|
|
183
|
+
|
|
184
|
+
Find artifact-ids in the portal under Knowledge → Memory, or via
|
|
185
|
+
the portal search.
|
|
186
|
+
`.trim(),
|
|
187
|
+
};
|
|
188
|
+
const DOCS = `
|
|
189
|
+
CodieDev — usage guide
|
|
190
|
+
|
|
191
|
+
## What this is
|
|
192
|
+
|
|
193
|
+
CodieDev is a team artifact layer on top of your coding agent (Claude
|
|
194
|
+
Code, Codex, etc.). It persists the *durable* outputs of agent work —
|
|
195
|
+
specs, reviews, decisions, proposals, and captured thoughts — so:
|
|
196
|
+
|
|
197
|
+
- Your teammates can pick up where you left off without a handoff call.
|
|
198
|
+
- Your manager can see what's shipping and why, grounded in real
|
|
199
|
+
session evidence.
|
|
200
|
+
- Your future self can search "what did we decide about X?" and get
|
|
201
|
+
a real answer with citations.
|
|
202
|
+
|
|
203
|
+
## Core loop
|
|
204
|
+
|
|
205
|
+
1. You push an artifact:
|
|
206
|
+
codiedev push spec-cart-clear.md
|
|
207
|
+
|
|
208
|
+
2. Your teammate gets pinged (either directly by you, or because
|
|
209
|
+
they asked to be kept in the loop on that key):
|
|
210
|
+
codiedev ping maya "thoughts?" --with spec-cart-clear.md
|
|
211
|
+
|
|
212
|
+
3. They check their inbox:
|
|
213
|
+
codiedev inbox
|
|
214
|
+
|
|
215
|
+
4. They pull your artifact, edit it, and push back:
|
|
216
|
+
codiedev pull spec-cart-clear.md > my-copy.md
|
|
217
|
+
# ...edit...
|
|
218
|
+
codiedev push my-copy.md (saves as v2 of the same key)
|
|
219
|
+
|
|
220
|
+
5. You pull the updated version and keep building.
|
|
221
|
+
|
|
222
|
+
## Versions
|
|
223
|
+
|
|
224
|
+
Every push of the same filename creates a new version. Latest is the
|
|
225
|
+
default on pull; use --version N to get a historical one. All versions
|
|
226
|
+
are preserved — you can always roll back.
|
|
227
|
+
|
|
228
|
+
## Lifecycle
|
|
229
|
+
|
|
230
|
+
Artifacts have a status that auto-advances as PRs reference them:
|
|
231
|
+
|
|
232
|
+
draft → accepted → implementing → shipped
|
|
233
|
+
→ archived
|
|
234
|
+
|
|
235
|
+
Artifacts stay editable at every stage, including after merge —
|
|
236
|
+
lessons-learned and follow-up notes append as new versions.
|
|
237
|
+
|
|
238
|
+
## Portal
|
|
239
|
+
|
|
240
|
+
Everything you do in the CLI is visible at:
|
|
241
|
+
|
|
242
|
+
https://codiedev.com/portal/inbox
|
|
243
|
+
|
|
244
|
+
Your CTO (or any non-technical teammate) can follow along without ever
|
|
245
|
+
touching a terminal — they read the artifacts in the portal and get
|
|
246
|
+
email notifications when pinged.
|
|
247
|
+
|
|
248
|
+
## Agent-native
|
|
249
|
+
|
|
250
|
+
If you use Claude Code or Codex, the agent already knows the commands —
|
|
251
|
+
'codiedev connect' installs instructions into your user-level config.
|
|
252
|
+
Just say things like:
|
|
253
|
+
|
|
254
|
+
"push this spec and ping Nic"
|
|
255
|
+
"any messages?"
|
|
256
|
+
"pull Maya's latest spec"
|
|
257
|
+
|
|
258
|
+
The agent will run the right command via Bash.
|
|
259
|
+
|
|
260
|
+
## Command reference
|
|
261
|
+
|
|
262
|
+
Run 'codiedev help <command>' for each, or see the quick list:
|
|
263
|
+
|
|
264
|
+
codiedev help
|
|
265
|
+
|
|
266
|
+
## Getting a token
|
|
267
|
+
|
|
268
|
+
1. Log in to https://codiedev.com/portal/integrations/claude-code
|
|
269
|
+
2. Click "Create token"
|
|
270
|
+
3. Copy the cdv_... string and paste it into 'codiedev connect'
|
|
271
|
+
|
|
272
|
+
Tokens are per-user. Rotate any time by revoking + creating a new one.
|
|
52
273
|
`.trim();
|
|
53
274
|
async function main() {
|
|
54
275
|
const [, , command, ...rest] = process.argv;
|
|
55
|
-
if (!command || command === "
|
|
276
|
+
if (!command || command === "--help" || command === "-h") {
|
|
56
277
|
console.log(HELP);
|
|
57
278
|
return;
|
|
58
279
|
}
|
|
280
|
+
if (command === "help") {
|
|
281
|
+
const sub = rest[0];
|
|
282
|
+
if (sub && COMMAND_HELP[sub]) {
|
|
283
|
+
console.log(COMMAND_HELP[sub]);
|
|
284
|
+
return;
|
|
285
|
+
}
|
|
286
|
+
if (sub) {
|
|
287
|
+
console.log(`No help for "${sub}". Valid commands:`);
|
|
288
|
+
console.log(Object.keys(COMMAND_HELP).join(", "));
|
|
289
|
+
return;
|
|
290
|
+
}
|
|
291
|
+
console.log(HELP);
|
|
292
|
+
return;
|
|
293
|
+
}
|
|
294
|
+
if (command === "docs") {
|
|
295
|
+
console.log(DOCS);
|
|
296
|
+
return;
|
|
297
|
+
}
|
|
298
|
+
// Support `codiedev <command> --help` too.
|
|
299
|
+
if (rest.includes("--help") || rest.includes("-h")) {
|
|
300
|
+
if (COMMAND_HELP[command]) {
|
|
301
|
+
console.log(COMMAND_HELP[command]);
|
|
302
|
+
return;
|
|
303
|
+
}
|
|
304
|
+
}
|
|
59
305
|
if (command === "version" || command === "--version" || command === "-v") {
|
|
60
|
-
// Package version is replaced at publish via tsc — for now, print the source-of-truth.
|
|
61
306
|
console.log("codiedev cli");
|
|
62
307
|
return;
|
|
63
308
|
}
|