sketchi 0.2.0 → 0.4.0
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 +42 -18
- package/THIRD_PARTY_NOTICES +1 -0
- package/chunks/{869.5b67ed51413ab1a9.js → 869.cacc093c4bbc5a04.js} +1 -1
- package/package.json +1 -1
- package/sketchi.js +73 -52
package/README.md
CHANGED
|
@@ -38,7 +38,31 @@ sketchi --version
|
|
|
38
38
|
|
|
39
39
|
Sketchi requires Node.js 24.13.0 or newer.
|
|
40
40
|
|
|
41
|
-
##
|
|
41
|
+
## Generate a PNG from a prompt
|
|
42
|
+
|
|
43
|
+
`generate` sends one prompt to Sketchi's public generation API, validates and
|
|
44
|
+
persists the editable result, then writes `<generated-id>.png` in the current
|
|
45
|
+
directory:
|
|
46
|
+
|
|
47
|
+
```sh
|
|
48
|
+
sketchi generate --prompt "Map release approval with pass and revise branches"
|
|
49
|
+
```
|
|
50
|
+
|
|
51
|
+
The PNG is rendered locally from the returned validated artifacts and is not
|
|
52
|
+
written back into the record. Choose another artifact or destination explicitly:
|
|
53
|
+
|
|
54
|
+
```sh
|
|
55
|
+
sketchi generate --prompt "Organize launch readiness" --type mindmap --format excalidraw --dest launch.excalidraw
|
|
56
|
+
sketchi generate --prompt "Map release approval" --dest - > release.png
|
|
57
|
+
sketchi generate --prompt "Map release approval" --output json
|
|
58
|
+
```
|
|
59
|
+
|
|
60
|
+
`--format` accepts `png`, `excalidraw`, or `scene`; their default names are
|
|
61
|
+
`<id>.png`, `<id>.excalidraw`, and `<id>.scene.json`. With `--dest -`, stdout
|
|
62
|
+
contains artifact bytes only and the text or JSON status envelope moves to
|
|
63
|
+
stderr. Generation, sharing, and pulling are the CLI's three network commands.
|
|
64
|
+
|
|
65
|
+
## Create and work with a diagram offline
|
|
42
66
|
|
|
43
67
|
Create a canonical flowchart from inline JSON:
|
|
44
68
|
|
|
@@ -54,9 +78,20 @@ sketchi show release-flow
|
|
|
54
78
|
|
|
55
79
|
sketchi edit release-flow --json '{"type":"flowchart","spec":{"id":"release-flow","title":"Release approval revised","nodes":[{"id":"start","label":"Change proposed","kind":"start"},{"id":"review","label":"Review complete evidence","kind":"process"},{"id":"end","label":"Release approved","kind":"end"}],"edges":[{"source":"start","target":"review"},{"source":"review","target":"end"}]}}'
|
|
56
80
|
|
|
81
|
+
sketchi patch release-flow --json '{"operations":[{"op":"setStyle","selector":{"nodeIds":["review"]},"style":{"fillColor":"#dbeafe","strokeColor":"#2563eb"}}]}'
|
|
82
|
+
|
|
57
83
|
sketchi list
|
|
58
84
|
```
|
|
59
85
|
|
|
86
|
+
`patch` reuses Sketchi's semantic selectors and operations (`setStyle`,
|
|
87
|
+
`setDefaultStyle`, `setShape`, `translate`, `replaceText`, and
|
|
88
|
+
`rerouteEdges`) without exposing raw Excalidraw mutation. It is fully offline,
|
|
89
|
+
preserves the prior full revision, retains `document.json` unchanged as
|
|
90
|
+
provenance, makes `scene.json` authoritative, and removes any stale stored PNG.
|
|
91
|
+
Patched records report `authority: "patched"` and
|
|
92
|
+
`documentAuthoritative: false`; restore a canonical revision before using
|
|
93
|
+
`edit` again.
|
|
94
|
+
|
|
60
95
|
Export the stored editable artifact:
|
|
61
96
|
|
|
62
97
|
```sh
|
|
@@ -81,20 +116,6 @@ only artifact bytes to stdout; a PNG file export also includes one generic
|
|
|
81
116
|
inline-Markdown display hint for calling agents. Its destination is enclosed
|
|
82
117
|
in CommonMark angle brackets so local paths containing spaces remain valid.
|
|
83
118
|
|
|
84
|
-
## Generate from a prompt
|
|
85
|
-
|
|
86
|
-
`generate` sends one prompt to Sketchi's public generation API, validates the
|
|
87
|
-
result server-side, and commits the same local record shape used by `create`:
|
|
88
|
-
|
|
89
|
-
```sh
|
|
90
|
-
sketchi generate --prompt "Map release approval with pass and revise branches"
|
|
91
|
-
sketchi generate --prompt "Organize launch readiness" --type mindmap --output json
|
|
92
|
-
```
|
|
93
|
-
|
|
94
|
-
It requires no API key, token, account, or login. `generate`, `share`, and
|
|
95
|
-
`pull` are the CLI's three explicit network commands; each makes one HTTPS
|
|
96
|
-
request.
|
|
97
|
-
|
|
98
119
|
## Share, pull, and restore browser edits
|
|
99
120
|
|
|
100
121
|
Create an immutable encrypted Excalidraw snapshot link from the record's current
|
|
@@ -201,9 +222,10 @@ source ~/.sketchi/completions/sketchi.fish
|
|
|
201
222
|
|
|
202
223
|
## For AI agents
|
|
203
224
|
|
|
204
|
-
The
|
|
205
|
-
`restore`—are fully offline and require no credentials, account,
|
|
206
|
-
or MCP server. Those
|
|
225
|
+
The seven deterministic commands—`create`, `patch`, `show`, `edit`, `list`,
|
|
226
|
+
`export`, and `restore`—are fully offline and require no credentials, account,
|
|
227
|
+
browser, model, or MCP server. Those seven commands never send stored records
|
|
228
|
+
to a provider.
|
|
207
229
|
Agents can use
|
|
208
230
|
`--output json`, complete noninteractive input through `--json` or `--file`, and
|
|
209
231
|
raw artifact output through `export --dest -` without prompts.
|
|
@@ -227,7 +249,9 @@ availability details.
|
|
|
227
249
|
|
|
228
250
|
```sh
|
|
229
251
|
sketchi --help
|
|
252
|
+
sketchi docs
|
|
230
253
|
sketchi create --help
|
|
254
|
+
sketchi patch --help
|
|
231
255
|
sketchi generate --help
|
|
232
256
|
sketchi share --help
|
|
233
257
|
sketchi pull --help
|
package/THIRD_PARTY_NOTICES
CHANGED
|
@@ -70,6 +70,7 @@ Excalifont
|
|
|
70
70
|
-----------
|
|
71
71
|
|
|
72
72
|
Copyright (c) 2024 by Excalidraw. All rights reserved.
|
|
73
|
+
Trademark: Excalifont is a trademark of Excalidraw.
|
|
73
74
|
Manufacturer and designer: Your Own Font Foundry (Virgil); Jan Filipek /
|
|
74
75
|
DizajnDesign (Excalifont, modifications)
|
|
75
76
|
|