sketchi 0.5.0 → 0.6.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 CHANGED
@@ -17,7 +17,7 @@
17
17
 
18
18
  Sketchi stores canonical diagram documents and authoritative Excalidraw artifacts
19
19
  under `~/.sketchi/diagrams`. Its manual and recovery workflows stay local;
20
- generation and encrypted snapshot exchange are explicit, credential-free network
20
+ generation, Universal Canvas compilation, and encrypted snapshot exchange are explicit, credential-free network
21
21
  commands.
22
22
 
23
23
  ## Install
@@ -83,7 +83,27 @@ sketchi generate --prompt "Map release approval" --output json
83
83
  `--format` accepts `png`, `excalidraw`, or `scene`; their default names are
84
84
  `<id>.png`, `<id>.excalidraw`, and `<id>.scene.json`. With `--dest -`, stdout
85
85
  contains artifact bytes only and the text or JSON status envelope moves to
86
- stderr. Generation, sharing, and pulling are the CLI's three network commands.
86
+ stderr. Generation, Universal Canvas compilation, sharing, and pulling are the CLI's four network commands.
87
+
88
+ ## Build a Universal CanvasSpec
89
+
90
+ `canvas` sends an already-authored, typed CanvasSpec to Sketchi's public
91
+ create-canvas API, validates the response, preserves the normalized scene and
92
+ editable Excalidraw artifact in the local store, and exports PNG by default:
93
+
94
+ ```sh
95
+ sketchi canvas --file canvas.json --output json
96
+ printf '%s' "$CANVAS_SPEC" | sketchi canvas --file - --format excalidraw --dest canvas.excalidraw
97
+ ```
98
+
99
+ The input is the CanvasSpec object itself—not a request wrapper and not raw
100
+ Excalidraw JSON. The command never prompts, so files and piped stdin are safe for
101
+ agents and scripts. `--format` and `--dest` have the same behavior as `generate`.
102
+ The endpoint defaults to
103
+ `https://playground.sketchi.app/api/v1/canvases/create`; use `--endpoint URL` or
104
+ `SKETCHI_CANVAS_ENDPOINT` only for preview and local testing. The existing
105
+ `create` command remains the separate, strictly offline command for accepted
106
+ flowchart, mindmap, and sequence documents.
87
107
 
88
108
  ## Create and work with a diagram offline
89
109
 
@@ -259,7 +279,7 @@ to human text TTYs and is never enabled by JSON output, pipes, redirects, or CI.
259
279
  After exporting PNG to a file, agents can follow the returned hint to display
260
280
  that path as an inline Markdown image for the user.
261
281
 
262
- `generate`, `share`, and `pull` are deliberately separate, explicit network
282
+ `generate`, `canvas`, `share`, and `pull` are deliberately separate, explicit network
263
283
  commands. They remain credential-free and each makes one HTTPS request. Share
264
284
  is randomized by its key and IV; pull depends on remote availability and
265
285
  untrusted input, so neither belongs to determinism claims.
@@ -279,6 +299,7 @@ sketchi docs
279
299
  sketchi create --help
280
300
  sketchi patch --help
281
301
  sketchi generate --help
302
+ sketchi canvas --help
282
303
  sketchi share --help
283
304
  sketchi pull --help
284
305
  sketchi restore --help