careervivid 1.1.2 → 1.1.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/README.md CHANGED
@@ -35,8 +35,8 @@ cv auth set-key cv_live_YOUR_KEY_HERE
35
35
  # 3. Publish an article
36
36
  cv publish my-article.md --tags "typescript,react"
37
37
 
38
- # 4. Create & publish an architecture diagram
39
- cv whiteboard new my-arch --template system-arch
38
+ # 4. Create & publish an architecture diagram (shortcuts)
39
+ cv new my-arch --template system-arch
40
40
  cv whiteboard publish my-arch.mmd --title "System Architecture"
41
41
  ```
42
42
 
@@ -84,16 +84,12 @@ cv publish article.md --dry-run
84
84
 
85
85
  ---
86
86
 
87
- ### `cv whiteboard`
88
-
89
- Create and publish **Mermaid architecture diagrams** without any extra packages. All templates are built into the `careervivid` CLI.
87
+ ### `cv new` (Shortcut)
90
88
 
91
- #### `cv whiteboard new`
92
-
93
- Scaffold a new `.mmd` diagram file from a built-in template.
89
+ Scaffold a new Mermaid diagram file from a built-in template. (Also available as `cv whiteboard new`)
94
90
 
95
91
  ```
96
- cv whiteboard new [filename] [options]
92
+ cv new [filename] [options]
97
93
  ```
98
94
 
99
95
  | Option | Description |
@@ -103,41 +99,26 @@ cv whiteboard new [filename] [options]
103
99
 
104
100
  ```bash
105
101
  # Interactive wizard — picks template and filename for you
106
- cv whiteboard new
102
+ cv new
107
103
 
108
104
  # Non-interactive — specify template and filename directly
109
- cv whiteboard new my-diagram --template system-arch
105
+ cv new my-diagram --template system-arch
110
106
 
111
107
  # Preview a template without creating any file
112
- cv whiteboard new --template ci-cd --print
108
+ cv new --template ci-cd --print
113
109
  ```
114
110
 
115
- #### `cv whiteboard publish`
111
+ ### `cv list-templates` (Shortcut)
116
112
 
117
- Publish an existing `.mmd` file as a whiteboard post.
118
-
119
- ```
120
- cv whiteboard publish <file> [options]
121
- ```
122
-
123
- | Option | Description |
124
- |---|---|
125
- | `-t, --title <title>` | Diagram title (required) |
126
- | `--tags <tags>` | Comma-separated tags |
127
- | `--dry-run` | Validate without publishing |
128
- | `--json` | Machine-readable JSON output |
113
+ Print all available built-in Mermaid templates. (Also available as `cv whiteboard list-templates`)
129
114
 
130
115
  ```bash
131
- cv whiteboard publish my-diagram.mmd --title "CI/CD Pipeline" --tags "devops,cicd"
116
+ cv list-templates
132
117
  ```
133
118
 
134
- #### `cv whiteboard list-templates`
135
-
136
- Print all available built-in Mermaid templates.
119
+ ### `cv whiteboard`
137
120
 
138
- ```bash
139
- cv whiteboard list-templates
140
- ```
121
+ Grouped commands for Mermaid architecture diagrams.
141
122
 
142
123
  ---
143
124
 
@@ -188,7 +169,7 @@ cv config set apiUrl https://careervivid.app/api/publish
188
169
 
189
170
  ## Whiteboard Templates
190
171
 
191
- Run `cv whiteboard list-templates` to see all templates. Available out of the box:
172
+ Run `cv list-templates` to see all templates. Available out of the box:
192
173
 
193
174
  | Template | Description |
194
175
  |---|---|
@@ -205,7 +186,7 @@ Run `cv whiteboard list-templates` to see all templates. Available out of the bo
205
186
 
206
187
  ```bash
207
188
  # 1. Pick a template and scaffold the file
208
- cv whiteboard new my-pipeline --template ci-cd
189
+ cv new my-pipeline --template ci-cd
209
190
 
210
191
  # 2. Edit it in your editor (or let your AI agent edit it)
211
192
  code my-pipeline.mmd
@@ -8,5 +8,7 @@
8
8
  * cv whiteboard list-templates List all available diagram templates
9
9
  */
10
10
  import { Command } from "commander";
11
+ export declare function registerNewCommand(program: Command | any): void;
12
+ export declare function registerListTemplatesCommand(program: Command | any): void;
11
13
  export declare function registerWhiteboardCommand(program: Command): void;
12
14
  //# sourceMappingURL=whiteboard.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"whiteboard.d.ts","sourceRoot":"","sources":["../../src/commands/whiteboard.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAEH,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAkNpC,wBAAgB,yBAAyB,CAAC,OAAO,EAAE,OAAO,GAAG,IAAI,CA8IhE"}
1
+ {"version":3,"file":"whiteboard.d.ts","sourceRoot":"","sources":["../../src/commands/whiteboard.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAEH,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAkNpC,wBAAgB,kBAAkB,CAAC,OAAO,EAAE,OAAO,GAAG,GAAG,GAAG,IAAI,CA6D/D;AAED,wBAAgB,4BAA4B,CAAC,OAAO,EAAE,OAAO,GAAG,GAAG,GAAG,IAAI,CAMzE;AAED,wBAAgB,yBAAyB,CAAC,OAAO,EAAE,OAAO,GAAG,IAAI,CA+EhE"}
@@ -198,12 +198,8 @@ async function promptInteractive() {
198
198
  return { name: name.trim() || `my-${template}`, template };
199
199
  }
200
200
  // ── Command Registration ──────────────────────────────────────────────────────
201
- export function registerWhiteboardCommand(program) {
202
- const wb = program
203
- .command("whiteboard")
204
- .description("Create and publish Mermaid diagram whiteboards to CareerVivid");
205
- // ── cv whiteboard new ─────────────────────────────────────────────────────
206
- wb.command("new [filename]")
201
+ export function registerNewCommand(program) {
202
+ program.command("new [filename]")
207
203
  .description("Scaffold a new Mermaid diagram file from a built-in template")
208
204
  .option("--template <name>", `Template to use (${TEMPLATE_NAMES.join(" | ")})`)
209
205
  .option("--print", "Print the template to stdout instead of writing a file")
@@ -211,7 +207,7 @@ export function registerWhiteboardCommand(program) {
211
207
  let templateKey;
212
208
  let filename;
213
209
  if (opts.template && !TEMPLATES[opts.template]) {
214
- printError(`Unknown template "${opts.template}". Run ${chalk.cyan("cv whiteboard list-templates")} to see available options.`);
210
+ printError(`Unknown template "${opts.template}". Run ${chalk.cyan("cv list-templates")} to see available options.`);
215
211
  process.exit(1);
216
212
  }
217
213
  if (opts.template && filenameArg) {
@@ -250,6 +246,20 @@ export function registerWhiteboardCommand(program) {
250
246
  console.log(` 2. Publish it: ${chalk.cyan(`cv publish ${filename} --title "Your Diagram Title"`)}`);
251
247
  console.log();
252
248
  });
249
+ }
250
+ export function registerListTemplatesCommand(program) {
251
+ program.command("list-templates")
252
+ .description("List all available Mermaid diagram templates")
253
+ .action(() => {
254
+ printTemplateList();
255
+ });
256
+ }
257
+ export function registerWhiteboardCommand(program) {
258
+ const wb = program
259
+ .command("whiteboard")
260
+ .description("Create and publish Mermaid diagram whiteboards to CareerVivid");
261
+ // ── cv whiteboard new ─────────────────────────────────────────────────────
262
+ registerNewCommand(wb);
253
263
  // ── cv whiteboard publish ─────────────────────────────────────────────────
254
264
  wb.command("publish <file>")
255
265
  .description("Publish a .mmd file to CareerVivid as a whiteboard post")
@@ -306,9 +316,5 @@ export function registerWhiteboardCommand(program) {
306
316
  }, jsonMode);
307
317
  });
308
318
  // ── cv whiteboard list-templates ──────────────────────────────────────────
309
- wb.command("list-templates")
310
- .description("List all available Mermaid diagram templates")
311
- .action(() => {
312
- printTemplateList();
313
- });
319
+ registerListTemplatesCommand(wb);
314
320
  }
package/dist/index.js CHANGED
@@ -19,17 +19,20 @@ import { Command } from "commander";
19
19
  import { registerAuthCommand } from "./commands/auth.js";
20
20
  import { registerPublishCommand } from "./commands/publish.js";
21
21
  import { registerConfigCommand } from "./commands/config.js";
22
- import { registerWhiteboardCommand } from "./commands/whiteboard.js";
22
+ import { registerWhiteboardCommand, registerNewCommand, registerListTemplatesCommand, } from "./commands/whiteboard.js";
23
23
  const program = new Command();
24
24
  program
25
25
  .name("cv")
26
26
  .description("CareerVivid CLI — publish articles, diagrams, and portfolio updates from your terminal or AI agent")
27
- .version("1.1.2", "-v, --version", "Print CLI version")
27
+ .version("1.1.4", "-v, --version", "Print CLI version")
28
28
  .helpOption("-h, --help", "Show help");
29
29
  registerAuthCommand(program);
30
30
  registerPublishCommand(program);
31
31
  registerConfigCommand(program);
32
32
  registerWhiteboardCommand(program);
33
+ // Shortcuts for whiteboard creation
34
+ registerNewCommand(program);
35
+ registerListTemplatesCommand(program);
33
36
  program.parseAsync(process.argv).catch((err) => {
34
37
  console.error(`\nFatal error: ${err.message}`);
35
38
  process.exit(1);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "careervivid",
3
- "version": "1.1.2",
3
+ "version": "1.1.4",
4
4
  "description": "Official CLI for CareerVivid — publish articles, diagrams, and portfolio updates from your terminal or AI agent",
5
5
  "type": "module",
6
6
  "bin": {