sketchi 0.32.1 → 0.33.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 +75 -4
- package/package.json +1 -1
- package/sketchi.js +106 -71
package/README.md
CHANGED
|
@@ -84,6 +84,74 @@ sketchi generate --prompt "Map release approval" --output json
|
|
|
84
84
|
contains artifact bytes only and the text or JSON status envelope moves to
|
|
85
85
|
stderr. Generation, Universal Canvas compilation, sharing, and pulling are the CLI's four network commands.
|
|
86
86
|
|
|
87
|
+
A successful generate prints the title and type, where the file went, and the id:
|
|
88
|
+
|
|
89
|
+
```text
|
|
90
|
+
Checkout flow (flowchart)
|
|
91
|
+
Saved checkout-flow.png
|
|
92
|
+
Copied to clipboard, paste anywhere
|
|
93
|
+
Id checkout-flow
|
|
94
|
+
```
|
|
95
|
+
|
|
96
|
+
When stdout is not a terminal, as when an agent runs it, a final `Hint` row says to
|
|
97
|
+
display the saved PNG as an inline Markdown image. `--output json` keeps everything
|
|
98
|
+
else: the full record, the generation model and provider, and export details.
|
|
99
|
+
|
|
100
|
+
### Clipboard
|
|
101
|
+
|
|
102
|
+
After writing a PNG file, `generate` copies the image to the desktop clipboard so
|
|
103
|
+
you can paste it straight into a doc, chat, or issue. It uses `wl-copy` on Wayland
|
|
104
|
+
(install `wl-clipboard`), `xclip` on X11, `osascript` on macOS, and PowerShell on
|
|
105
|
+
Windows; Sketchi adds no native dependency. The copy happens whenever a desktop
|
|
106
|
+
clipboard is available, including when an agent runs the CLI with piped output.
|
|
107
|
+
It is skipped in CI, for `--dest -`, for `--format excalidraw|scene`, and with
|
|
108
|
+
`--no-copy`, and nothing is printed when the session has no desktop clipboard.
|
|
109
|
+
If the copy fails, one line says why; the file is still saved and the exit code
|
|
110
|
+
does not change. JSON output adds `"clipboard": {"copied": true}` or
|
|
111
|
+
`{"copied": false, "reason": "..."}`.
|
|
112
|
+
|
|
113
|
+
Set `SKETCHI_CLIPBOARD_COMMAND` to a command that reads a PNG on standard input to
|
|
114
|
+
use a clipboard Sketchi does not detect, or to `off` to never copy.
|
|
115
|
+
|
|
116
|
+
Copy any stored diagram again, rendering its PNG on demand:
|
|
117
|
+
|
|
118
|
+
```sh
|
|
119
|
+
sketchi copy # the newest diagram
|
|
120
|
+
sketchi copy release # by id or unique id prefix
|
|
121
|
+
```
|
|
122
|
+
|
|
123
|
+
macOS and Windows clipboard support is unit-tested but not yet verified on
|
|
124
|
+
those systems.
|
|
125
|
+
|
|
126
|
+
## Find past diagrams
|
|
127
|
+
|
|
128
|
+
`list` shows the newest diagrams first with id, title, type, and how long ago
|
|
129
|
+
each was created. Add words to search titles, ids, and the prompts that generated
|
|
130
|
+
them:
|
|
131
|
+
|
|
132
|
+
```sh
|
|
133
|
+
sketchi list
|
|
134
|
+
sketchi list checkout
|
|
135
|
+
sketchi list --type sequence --limit 5
|
|
136
|
+
```
|
|
137
|
+
|
|
138
|
+
Text output shows 20 diagrams and says how many older ones it hid. `--output json`
|
|
139
|
+
returns every match as an array in the same newest-first order, adding `createdAt`,
|
|
140
|
+
`updatedAt`, and `prompt` when known. Records made before Sketchi stored creation
|
|
141
|
+
times sort by when they last changed.
|
|
142
|
+
|
|
143
|
+
Every command that takes a diagram id also accepts `latest` for the newest
|
|
144
|
+
diagram, or any unique prefix of an id. An unknown id suggests the closest ones:
|
|
145
|
+
|
|
146
|
+
```sh
|
|
147
|
+
sketchi show latest
|
|
148
|
+
sketchi export check --format png --dest checkout.png
|
|
149
|
+
```
|
|
150
|
+
|
|
151
|
+
`show` prints a summary: title, type, id, when it was created, its prompt,
|
|
152
|
+
revisions, and where it is stored. Add `--document` for the canonical document;
|
|
153
|
+
`show --output json` always includes it.
|
|
154
|
+
|
|
87
155
|
## Build a Universal CanvasSpec
|
|
88
156
|
|
|
89
157
|
`canvas` sends an already-authored, typed CanvasSpec to Sketchi's public
|
|
@@ -264,9 +332,9 @@ source ~/.sketchi/completions/sketchi.fish
|
|
|
264
332
|
|
|
265
333
|
## For AI agents
|
|
266
334
|
|
|
267
|
-
The
|
|
335
|
+
The deterministic commands—`create`, `patch`, `show`, `edit`, `list`,
|
|
268
336
|
`export`, and `restore`—are fully offline and require no credentials, account,
|
|
269
|
-
browser, model, or MCP server.
|
|
337
|
+
browser, model, or MCP server. They, and `copy`, never send stored records
|
|
270
338
|
to a provider.
|
|
271
339
|
Agents can use
|
|
272
340
|
`--output json`, complete noninteractive input through `--json` or `--file`, and
|
|
@@ -275,8 +343,11 @@ raw artifact output through `export --dest -` without prompts.
|
|
|
275
343
|
Agents must pass `--prompt` to `generate`. Interactive prompting is restricted
|
|
276
344
|
to human text TTYs and is never enabled by JSON output, pipes, redirects, or CI.
|
|
277
345
|
|
|
278
|
-
After
|
|
279
|
-
that path as an inline Markdown image for the user
|
|
346
|
+
After writing a PNG file, `generate` and `export` give agents a hint to display
|
|
347
|
+
that path as an inline Markdown image for the user: a `Hint` row in generate's
|
|
348
|
+
text output when stdout is not a terminal, `export.hint` in generate's JSON, and
|
|
349
|
+
`hint:` in export's status. When generate reports `Copied`, the user can also
|
|
350
|
+
paste the image themselves.
|
|
280
351
|
|
|
281
352
|
`generate`, `canvas`, `share`, and `pull` are deliberately separate, explicit network
|
|
282
353
|
commands. They remain credential-free and each makes one HTTPS request. Share
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "sketchi",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.33.0",
|
|
4
4
|
"description": "Local Sketchi authoring CLI with offline workflows and four credential-free network commands for generation, Universal Canvas compilation, and encrypted Excalidraw sharing.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"sketchi",
|