@creator-notes/cli 0.2.0 → 0.2.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/.claude-plugin/plugin.json +13 -0
- package/README.md +208 -0
- package/SKILL.md +105 -226
- package/dist/cn.js +13 -1
- package/dist/cn.js.map +1 -1
- package/dist/commands/auth.d.ts +7 -0
- package/dist/commands/auth.d.ts.map +1 -1
- package/dist/commands/auth.js +12 -9
- package/dist/commands/auth.js.map +1 -1
- package/dist/commands/init.d.ts +3 -0
- package/dist/commands/init.d.ts.map +1 -0
- package/dist/commands/init.js +153 -0
- package/dist/commands/init.js.map +1 -0
- package/dist/commands/workspace.d.ts +10 -0
- package/dist/commands/workspace.d.ts.map +1 -1
- package/dist/commands/workspace.js +43 -13
- package/dist/commands/workspace.js.map +1 -1
- package/dist/lib/auth-store.d.ts.map +1 -1
- package/dist/lib/auth-store.js +2 -1
- package/dist/lib/auth-store.js.map +1 -1
- package/dist/lib/style.d.ts +10 -0
- package/dist/lib/style.d.ts.map +1 -0
- package/dist/lib/style.js +17 -0
- package/dist/lib/style.js.map +1 -0
- package/package.json +5 -2
- package/skills/cn/SKILL.md +289 -0
|
@@ -0,0 +1,289 @@
|
|
|
1
|
+
# CreatorNotes CLI (`cn`)
|
|
2
|
+
|
|
3
|
+
A command-line interface for CreatorNotes — create notes, build canvases, search knowledge, and manage workspaces from the terminal.
|
|
4
|
+
|
|
5
|
+
## Getting Started
|
|
6
|
+
|
|
7
|
+
### Install
|
|
8
|
+
|
|
9
|
+
```bash
|
|
10
|
+
npm install -g @creator-notes/cli
|
|
11
|
+
```
|
|
12
|
+
|
|
13
|
+
### Authenticate
|
|
14
|
+
|
|
15
|
+
```bash
|
|
16
|
+
cn auth login # Opens browser for OAuth
|
|
17
|
+
cn auth login --token <key> # Direct API key
|
|
18
|
+
cn auth status # Check current session
|
|
19
|
+
```
|
|
20
|
+
|
|
21
|
+
### Select a Workspace
|
|
22
|
+
|
|
23
|
+
```bash
|
|
24
|
+
cn workspace list
|
|
25
|
+
cn workspace select <id>
|
|
26
|
+
cn workspace current # Verify active workspace
|
|
27
|
+
```
|
|
28
|
+
|
|
29
|
+
## Command Reference
|
|
30
|
+
|
|
31
|
+
### Global Flags (apply to ALL commands)
|
|
32
|
+
```
|
|
33
|
+
--json Output raw JSON (best for piping / parsing)
|
|
34
|
+
-q, --quiet Minimal output (IDs only — useful for scripting)
|
|
35
|
+
-w, --workspace <id> Override active workspace
|
|
36
|
+
--server <url> Override server URL (default: https://creatornotes.app)
|
|
37
|
+
```
|
|
38
|
+
|
|
39
|
+
### Notes (`cn notes` / `cn n`)
|
|
40
|
+
```bash
|
|
41
|
+
# List notes (default 20, excludes drafts)
|
|
42
|
+
cn notes list [--search <query>] [--type <type>] [--tags <csv>] [--pinned] [--limit <n>]
|
|
43
|
+
|
|
44
|
+
# Get a single note by display ID or Convex ID
|
|
45
|
+
cn notes get <id> [--all-versions]
|
|
46
|
+
|
|
47
|
+
# Create a note
|
|
48
|
+
cn notes create --markdown-file <path.md> [--title <title>] [--type <type>] [--tags <csv>] [--draft]
|
|
49
|
+
cn notes create --markdown "<content>" [--title <title>] [--type <type>] [--tags <csv>] [--draft] # inline (short content only)
|
|
50
|
+
cn notes create --content-file <path.json> # TipTap JSON from file
|
|
51
|
+
cn notes create --content-stdin # TipTap JSON from stdin
|
|
52
|
+
|
|
53
|
+
# Update metadata only (not content — use versions for that)
|
|
54
|
+
cn notes update <id> [--title <t>] [--type <t>] [--tags <csv>] [--archive] [--unarchive] [--pin] [--unpin]
|
|
55
|
+
|
|
56
|
+
# Delete (archive)
|
|
57
|
+
cn notes delete <id>
|
|
58
|
+
|
|
59
|
+
# Bulk archive/unarchive multiple notes at once
|
|
60
|
+
cn notes bulk-archive --ids '["MEETING-1","PRD-3","IDEA-7"]' [--unarchive]
|
|
61
|
+
|
|
62
|
+
# Bulk create interlinked notes in one atomic transaction
|
|
63
|
+
# Use @key placeholders for cross-references — resolved to real displayIds server-side
|
|
64
|
+
cn notes bulk-create --notes '[{"key":"A","title":"Note A","type":"Insight","markdownFile":"./a.md"},{"key":"B","title":"Note B","type":"Problem","markdownFile":"./b.md"}]' --json
|
|
65
|
+
|
|
66
|
+
# Text search
|
|
67
|
+
cn notes search <query> [--type <type>] [--limit <n>]
|
|
68
|
+
```
|
|
69
|
+
|
|
70
|
+
### Versions (`cn versions` / `cn v`)
|
|
71
|
+
```bash
|
|
72
|
+
# List versions
|
|
73
|
+
cn versions list <noteId>
|
|
74
|
+
|
|
75
|
+
# Create a new version (updates note content)
|
|
76
|
+
cn versions create <noteId> --description "what changed" --markdown-file <path.md>
|
|
77
|
+
cn versions create <noteId> --description "what changed" --markdown "<short content>" # inline (short only)
|
|
78
|
+
cn versions create <noteId> --description "what changed" --content-file <path.json>
|
|
79
|
+
```
|
|
80
|
+
|
|
81
|
+
### Canvas (`cn canvas` / `cn c`)
|
|
82
|
+
```bash
|
|
83
|
+
# List / get (archived canvases excluded by default)
|
|
84
|
+
cn canvas list [--include-archived]
|
|
85
|
+
cn canvas get <canvasId>
|
|
86
|
+
|
|
87
|
+
# AI digest (summary) of canvas
|
|
88
|
+
cn canvas digest <canvasId>
|
|
89
|
+
|
|
90
|
+
# Create / delete
|
|
91
|
+
cn canvas create "<name>"
|
|
92
|
+
cn canvas delete <canvasId>
|
|
93
|
+
cn canvas set-as-home <canvasId>
|
|
94
|
+
|
|
95
|
+
# Add nodes to canvas
|
|
96
|
+
cn canvas add-node <canvasId> --note <noteId> [--x <n>] [--y <n>]
|
|
97
|
+
cn canvas add-text <canvasId> --text "<content>" [--size heading|paragraph] [--x <n>] [--y <n>]
|
|
98
|
+
cn canvas add-list <canvasId> --name "<name>" --notes <id1,id2,...> [--view list|grid] [--x <n>] [--y <n>]
|
|
99
|
+
cn canvas add-link <canvasId> --target <otherCanvasId> [--x <n>] [--y <n>]
|
|
100
|
+
|
|
101
|
+
# Bulk add multiple notes at once (more efficient than repeated add-node)
|
|
102
|
+
cn canvas bulk-add <canvasId> --notes '[{"noteId":"NOTE-1","x":100,"y":100},{"noteId":"NOTE-2","x":400,"y":100}]'
|
|
103
|
+
|
|
104
|
+
# Move / remove nodes
|
|
105
|
+
cn canvas move-node <canvasId> --node <nodeId> --x <n> --y <n>
|
|
106
|
+
cn canvas remove-node <canvasId> --node <nodeId>
|
|
107
|
+
|
|
108
|
+
# Bulk remove multiple nodes at once
|
|
109
|
+
cn canvas bulk-remove <canvasId> --nodes '["nodeId1","nodeId2"]'
|
|
110
|
+
|
|
111
|
+
# Bulk move multiple nodes at once (more efficient than repeated move-node)
|
|
112
|
+
cn canvas bulk-move <canvasId> --moves '[{"nodeId":"abc","nodeType":"note","x":200,"y":300},{"nodeId":"def","nodeType":"text","x":500,"y":300}]'
|
|
113
|
+
# nodeType: note | text | list | canvas (defaults to "note")
|
|
114
|
+
|
|
115
|
+
# Connect nodes
|
|
116
|
+
cn canvas add-edge <canvasId> --source <nodeId> --target <nodeId> [--label "<text>"]
|
|
117
|
+
|
|
118
|
+
# Templates — create structured canvases from predefined layouts
|
|
119
|
+
cn canvas templates # List available templates
|
|
120
|
+
cn canvas from-template <templateId> [--title "<title>"] # Create empty skeleton
|
|
121
|
+
cn canvas from-template <templateId> --populate # Auto-populate zones with matching notes
|
|
122
|
+
# Templates: sprint-retrospective, swot-analysis, kanban-board, feature-prioritization, meeting-notes, product-roadmap
|
|
123
|
+
```
|
|
124
|
+
|
|
125
|
+
### Timeline (`cn timeline` / `cn tl`)
|
|
126
|
+
```bash
|
|
127
|
+
# Show recent changes (default: last 7 days)
|
|
128
|
+
cn timeline [--since <when>] [--until <when>] [--type <noteType>] [--note <filter>] [--limit <n>]
|
|
129
|
+
|
|
130
|
+
# Examples
|
|
131
|
+
cn timeline # last 7 days
|
|
132
|
+
cn timeline --since 30d # last 30 days
|
|
133
|
+
cn timeline --since 2w --type Meeting # meetings in last 2 weeks
|
|
134
|
+
cn timeline --since 7d --note standup # filter by note name
|
|
135
|
+
# Supported --since formats: relative (7d, 2w, 3h, 30m), ISO date (2026-03-21), unix ms
|
|
136
|
+
```
|
|
137
|
+
|
|
138
|
+
### Relationships (`cn relationships` / `cn rel`)
|
|
139
|
+
```bash
|
|
140
|
+
cn rel list [--note <displayId>]
|
|
141
|
+
```
|
|
142
|
+
|
|
143
|
+
### Semantic Search (`cn search` / `cn s`)
|
|
144
|
+
```bash
|
|
145
|
+
cn search semantic "<query>" [--limit <n>] [--canvas <canvasId>]
|
|
146
|
+
```
|
|
147
|
+
|
|
148
|
+
### Types (`cn types` / `cn t`)
|
|
149
|
+
```bash
|
|
150
|
+
# List all types (supertags) in the workspace
|
|
151
|
+
cn types list
|
|
152
|
+
|
|
153
|
+
# Create a new type
|
|
154
|
+
cn types create <name> [--prefix <PREFIX>] [--display-name <name>] [--description <text>] [--color <hex>]
|
|
155
|
+
|
|
156
|
+
# Update an existing type
|
|
157
|
+
cn types update <name> [--prefix <PREFIX>] [--display-name <name>] [--description <text>] [--color <hex>]
|
|
158
|
+
```
|
|
159
|
+
|
|
160
|
+
### Memory (`cn memory` / `cn mem`)
|
|
161
|
+
```bash
|
|
162
|
+
# Search facts and entities by relevance
|
|
163
|
+
cn memory query "<query>" [--limit <n>] [--source <conversation|notes>]
|
|
164
|
+
|
|
165
|
+
# List all workspace facts (extracted from notes and conversations)
|
|
166
|
+
cn memory facts [--source <conversation|notes>]
|
|
167
|
+
|
|
168
|
+
# List all entities (people, topics, orgs) identified by Zep
|
|
169
|
+
cn memory entities [--source <conversation|notes>]
|
|
170
|
+
```
|
|
171
|
+
|
|
172
|
+
### Config
|
|
173
|
+
```bash
|
|
174
|
+
cn config get-server
|
|
175
|
+
cn config set-server <url>
|
|
176
|
+
```
|
|
177
|
+
|
|
178
|
+
## Best Practices
|
|
179
|
+
|
|
180
|
+
### Note IDs
|
|
181
|
+
- Notes have **display IDs** like `MEETING-12`, `PRD-5`, `IDEA-3` — use these in commands.
|
|
182
|
+
- Convex IDs (e.g., `n17a43p7aenrxyr...`) also work but are less readable.
|
|
183
|
+
- When creating notes, capture the display ID from the output for subsequent commands.
|
|
184
|
+
|
|
185
|
+
### Note Types
|
|
186
|
+
- The `--type` parameter must reference an **existing supertag** in the workspace. Free-text type strings are rejected.
|
|
187
|
+
- Before creating a note, check available types with `cn types list`.
|
|
188
|
+
- If the type you need doesn't exist, create it first: `cn types create "MyType" --prefix "MT"`
|
|
189
|
+
- Type names are **case-sensitive** and use PascalCase (e.g., `Update`, `PainPoint`, `Meeting`).
|
|
190
|
+
- The display ID prefix (e.g., `UPDATE-`, `PP-`) comes from the supertag's `prefix` field.
|
|
191
|
+
|
|
192
|
+
### Content via Markdown
|
|
193
|
+
- For multi-line content, **use `--markdown-file`**: write content to a file first, then pass the path.
|
|
194
|
+
```bash
|
|
195
|
+
cn notes create --markdown-file ./note.md --title "My Note" --type "Note"
|
|
196
|
+
```
|
|
197
|
+
- Only use inline `--markdown "..."` for very short, single-line content.
|
|
198
|
+
- The server converts markdown to TipTap JSON automatically.
|
|
199
|
+
- **Relationship mentions in markdown**: Use `[NOTE-123](relationship:references)` or `[NOTE-123: Title](relationship:references)` syntax — plain text "NOTE-123" does NOT create clickable mentions.
|
|
200
|
+
- Supported relationship types: `depends-on`, `blocks`, `related-to`, `derived-from`, `references`, `extends`, `implements`, `invalidates`, `duplicates`
|
|
201
|
+
- Simple mention shorthand: `[NOTE-123]` or `[NOTE-123: Title]` (defaults to "references")
|
|
202
|
+
|
|
203
|
+
### Updating Content vs Metadata
|
|
204
|
+
- To change note **content**, create a new **version**: `cn versions create <id> --description "..." --markdown-file ./updated.md`
|
|
205
|
+
- To change note **title/type/tags/pin/archive**, use: `cn notes update <id> --title "..."`
|
|
206
|
+
- These are separate operations by design.
|
|
207
|
+
|
|
208
|
+
### JSON Mode for Scripting
|
|
209
|
+
- Use `--json` to get raw JSON output for parsing with `jq` or piping between commands.
|
|
210
|
+
- Use `-q` (quiet) to get just the ID, useful for chaining:
|
|
211
|
+
```bash
|
|
212
|
+
NOTE_ID=$(cn notes create --markdown "Quick note" -q)
|
|
213
|
+
cn canvas add-node <canvasId> --note "$NOTE_ID"
|
|
214
|
+
```
|
|
215
|
+
|
|
216
|
+
### Canvas Layout
|
|
217
|
+
|
|
218
|
+
When adding 3+ notes to a canvas, **plan all positions upfront** and use `bulk-add` in a single call instead of repeated `add-node` calls.
|
|
219
|
+
|
|
220
|
+
#### Layout Constants
|
|
221
|
+
|
|
222
|
+
| Item | Width (px) | Height (px) |
|
|
223
|
+
|------|-----------|-------------|
|
|
224
|
+
| Node (rendered) | 280 | 100 |
|
|
225
|
+
| Grid cell (node + padding) | 400 | 180 |
|
|
226
|
+
| Edge label | ~80 | ~14 |
|
|
227
|
+
|
|
228
|
+
Node center offset from top-left: `(+140, +50)`.
|
|
229
|
+
|
|
230
|
+
#### Text Node Sizing
|
|
231
|
+
|
|
232
|
+
Use `--size` to control text node font size (default: `heading`):
|
|
233
|
+
|
|
234
|
+
| Size | Use for |
|
|
235
|
+
|------|---------|
|
|
236
|
+
| `heading` (default) | Section headers, zone titles, canvas labels |
|
|
237
|
+
| `paragraph` | Descriptions, annotations, supporting context |
|
|
238
|
+
|
|
239
|
+
#### Positioning Algorithm
|
|
240
|
+
|
|
241
|
+
1. **Build the graph** — list all notes and their relationships.
|
|
242
|
+
2. **Assign ranks** — Rank 0 for root nodes (no incoming edges), Rank N = `max(parent ranks) + 1`.
|
|
243
|
+
3. **Calculate positions** — `Y = 100 + rank × 180`. Center each rank horizontally with 400px spacing between nodes.
|
|
244
|
+
4. **Use `bulk-add`** for all nodes, then add edges with `add-edge`.
|
|
245
|
+
|
|
246
|
+
#### Common Topologies
|
|
247
|
+
|
|
248
|
+
**Linear chain** (A→B→C→D): stack vertically at X=300, Y increments of 180.
|
|
249
|
+
|
|
250
|
+
**Fan-out** (A→B, A→C, A→D): root on top, children spread horizontally at 400px intervals.
|
|
251
|
+
|
|
252
|
+
**Diamond** (A→B, A→C, B→D, C→D): 2-column layout centered under root.
|
|
253
|
+
|
|
254
|
+
### Interlinking Notes
|
|
255
|
+
|
|
256
|
+
When creating multiple related notes, interlink at two levels:
|
|
257
|
+
|
|
258
|
+
**1. Relationship mentions inside note content** — connects notes in the knowledge graph:
|
|
259
|
+
- Use `cn notes bulk-create` with `@key` placeholders for cross-references.
|
|
260
|
+
- Example: `[@B: The Problem](relationship:references)` in markdown.
|
|
261
|
+
- The server resolves placeholders to real display IDs in one atomic transaction.
|
|
262
|
+
|
|
263
|
+
**2. Canvas edges between nodes** — visual connections on the canvas:
|
|
264
|
+
- After adding nodes, connect them with `cn canvas add-edge`.
|
|
265
|
+
- Use descriptive labels (e.g., "triggers", "depends on").
|
|
266
|
+
|
|
267
|
+
Both levels are needed — edges are visual-only, mentions are content-level.
|
|
268
|
+
|
|
269
|
+
#### Placeholder Syntax for `bulk-create`
|
|
270
|
+
|
|
271
|
+
Use `[@key: Title](relationship:type)` where `key` matches a note's `key` field in the `--notes` JSON:
|
|
272
|
+
```markdown
|
|
273
|
+
This builds on [@B: The Problem](relationship:references) and enables [@C: The Workflow](relationship:derived-from).
|
|
274
|
+
```
|
|
275
|
+
|
|
276
|
+
Supported relationship types: `depends-on`, `blocks`, `related-to`, `derived-from`, `references`, `extends`, `implements`, `invalidates`, `duplicates`
|
|
277
|
+
|
|
278
|
+
### Memory
|
|
279
|
+
|
|
280
|
+
Before creating or updating notes on a topic, **query memory first** to understand what is already known:
|
|
281
|
+
|
|
282
|
+
1. **Start broad:** `cn memory query "<topic>"` — get the top facts and entities.
|
|
283
|
+
2. **Follow entities:** Run follow-up queries on related people, teams, or initiatives.
|
|
284
|
+
3. **Check temporal validity:** Facts have `validAt`/`invalidAt` timestamps — prefer current facts.
|
|
285
|
+
4. **Synthesize:** Combine facts from 2-3 queries before acting.
|
|
286
|
+
|
|
287
|
+
### Error Handling
|
|
288
|
+
- If a command fails with auth errors, run `cn auth status` to verify credentials.
|
|
289
|
+
- If workspace-related errors occur, verify with `cn workspace current`.
|