sketchi 0.0.1 → 0.0.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/README.md +140 -0
- package/package.json +3 -2
- package/sketchi.js +21 -21
package/README.md
ADDED
|
@@ -0,0 +1,140 @@
|
|
|
1
|
+
<p align="center">
|
|
2
|
+
<img src="https://sketchi.app/icon.svg" alt="Sketchi" width="112" height="112" />
|
|
3
|
+
</p>
|
|
4
|
+
|
|
5
|
+
<h1 align="center">Sketchi CLI</h1>
|
|
6
|
+
|
|
7
|
+
<p align="center">
|
|
8
|
+
<strong>Typed, deterministic diagrams from your terminal.</strong><br />
|
|
9
|
+
Create, inspect, revise, and export local flowcharts and mindmaps—or turn one prompt into validated, editable Excalidraw.
|
|
10
|
+
</p>
|
|
11
|
+
|
|
12
|
+
<p align="center">
|
|
13
|
+
<a href="https://www.npmjs.com/package/sketchi"><img alt="npm version" src="https://img.shields.io/npm/v/sketchi?logo=npm&color=CB3837" /></a>
|
|
14
|
+
<a href="https://sketchi.app/"><img alt="Sketchi website" src="https://img.shields.io/badge/sketchi.app-live-765264" /></a>
|
|
15
|
+
<a href="https://github.com/shpitdev/sketchi/blob/main/LICENSE"><img alt="MIT license" src="https://img.shields.io/badge/license-MIT-2F855A" /></a>
|
|
16
|
+
</p>
|
|
17
|
+
|
|
18
|
+
Sketchi stores canonical diagram documents and deterministic Excalidraw artifacts
|
|
19
|
+
under `~/.sketchi/diagrams`. Its manual workflow stays local; generation is one
|
|
20
|
+
explicit, credential-free network command.
|
|
21
|
+
|
|
22
|
+
## Install
|
|
23
|
+
|
|
24
|
+
Use the noninteractive installer to install the npm package and configure
|
|
25
|
+
completions for a detected Zsh, Bash, or Fish shell:
|
|
26
|
+
|
|
27
|
+
```sh
|
|
28
|
+
curl -fsSL https://raw.githubusercontent.com/shpitdev/sketchi/main/install.sh | sh
|
|
29
|
+
```
|
|
30
|
+
|
|
31
|
+
Or install directly from npm:
|
|
32
|
+
|
|
33
|
+
```sh
|
|
34
|
+
npm install -g sketchi
|
|
35
|
+
sketchi --version
|
|
36
|
+
```
|
|
37
|
+
|
|
38
|
+
Sketchi requires Node.js 24.13.0 or newer.
|
|
39
|
+
|
|
40
|
+
## Create and work with a diagram
|
|
41
|
+
|
|
42
|
+
Create a canonical flowchart from inline JSON:
|
|
43
|
+
|
|
44
|
+
```sh
|
|
45
|
+
sketchi create --json '{"type":"flowchart","spec":{"id":"release-flow","title":"Release approval","nodes":[{"id":"start","label":"Change proposed","kind":"start"},{"id":"review","label":"Review evidence","kind":"process"},{"id":"end","label":"Release approved","kind":"end"}],"edges":[{"source":"start","target":"review"},{"source":"review","target":"end"}]}}'
|
|
46
|
+
```
|
|
47
|
+
|
|
48
|
+
Inspect it, replace it with another complete canonical document, and list the
|
|
49
|
+
local store:
|
|
50
|
+
|
|
51
|
+
```sh
|
|
52
|
+
sketchi show release-flow
|
|
53
|
+
|
|
54
|
+
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"}]}}'
|
|
55
|
+
|
|
56
|
+
sketchi list
|
|
57
|
+
```
|
|
58
|
+
|
|
59
|
+
Export the stored editable artifact:
|
|
60
|
+
|
|
61
|
+
```sh
|
|
62
|
+
sketchi export release-flow --format excalidraw --dest release-flow.excalidraw
|
|
63
|
+
```
|
|
64
|
+
|
|
65
|
+
Every command also supports `--output json` for a stable machine-readable
|
|
66
|
+
result envelope. `export --dest -` writes only artifact bytes to stdout and
|
|
67
|
+
writes its status envelope to stderr.
|
|
68
|
+
|
|
69
|
+
## Generate from a prompt
|
|
70
|
+
|
|
71
|
+
`generate` sends one prompt to Sketchi's public generation API, validates the
|
|
72
|
+
result server-side, and commits the same local record shape used by `create`:
|
|
73
|
+
|
|
74
|
+
```sh
|
|
75
|
+
sketchi generate --prompt "Map release approval with pass and revise branches"
|
|
76
|
+
sketchi generate --prompt "Organize launch readiness" --type mindmap --output json
|
|
77
|
+
```
|
|
78
|
+
|
|
79
|
+
It requires no API key, token, account, or login. It is the CLI's only network
|
|
80
|
+
boundary.
|
|
81
|
+
|
|
82
|
+
## Shell completions
|
|
83
|
+
|
|
84
|
+
The installer configures completions automatically. For a direct npm install,
|
|
85
|
+
generate the script for your shell and source the dedicated file:
|
|
86
|
+
|
|
87
|
+
Zsh initializes its completion system before loading Sketchi:
|
|
88
|
+
|
|
89
|
+
```zsh
|
|
90
|
+
mkdir -p ~/.sketchi/completions
|
|
91
|
+
sketchi --completions zsh > ~/.sketchi/completions/sketchi.zsh
|
|
92
|
+
autoload -Uz compinit
|
|
93
|
+
(( ${+functions[compdef]} )) || compinit
|
|
94
|
+
source ~/.sketchi/completions/sketchi.zsh
|
|
95
|
+
```
|
|
96
|
+
|
|
97
|
+
For Bash:
|
|
98
|
+
|
|
99
|
+
```bash
|
|
100
|
+
mkdir -p ~/.sketchi/completions
|
|
101
|
+
sketchi --completions bash > ~/.sketchi/completions/sketchi.bash
|
|
102
|
+
if [ "${BASH_VERSINFO[0]:-0}" -ge 4 ]; then
|
|
103
|
+
source ~/.sketchi/completions/sketchi.bash
|
|
104
|
+
fi
|
|
105
|
+
```
|
|
106
|
+
|
|
107
|
+
Generated Bash completions require Bash 4 or newer. The installer silently
|
|
108
|
+
skips them on the stock macOS Bash 3.2. Bash login shells may not read
|
|
109
|
+
`.bashrc`, so `.bash_profile` may need to source `.bashrc` for completions to be
|
|
110
|
+
available.
|
|
111
|
+
|
|
112
|
+
For Fish:
|
|
113
|
+
|
|
114
|
+
```fish
|
|
115
|
+
mkdir -p ~/.sketchi/completions
|
|
116
|
+
sketchi --completions fish > ~/.sketchi/completions/sketchi.fish
|
|
117
|
+
source ~/.sketchi/completions/sketchi.fish
|
|
118
|
+
```
|
|
119
|
+
|
|
120
|
+
## For AI agents
|
|
121
|
+
|
|
122
|
+
The five deterministic commands—`create`, `show`, `edit`, `list`, and
|
|
123
|
+
`export`—are fully offline and require no credentials, account, browser, model,
|
|
124
|
+
or MCP server. They never send stored records to a provider. Agents can use
|
|
125
|
+
`--output json`, complete noninteractive input through `--json` or `--file`, and
|
|
126
|
+
raw artifact output through `export --dest -` without prompts.
|
|
127
|
+
|
|
128
|
+
`generate` is deliberately separate: it uses the public Sketchi API, remains
|
|
129
|
+
credential-free, and is the only command that uses the network.
|
|
130
|
+
|
|
131
|
+
## Help
|
|
132
|
+
|
|
133
|
+
```sh
|
|
134
|
+
sketchi --help
|
|
135
|
+
sketchi create --help
|
|
136
|
+
sketchi generate --help
|
|
137
|
+
```
|
|
138
|
+
|
|
139
|
+
Source, issue tracking, and architecture documentation live in the
|
|
140
|
+
[Sketchi repository](https://github.com/shpitdev/sketchi).
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "sketchi",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.2",
|
|
4
4
|
"description": "Local Sketchi authoring CLI: offline flowchart and mindmap workflows plus one unauthenticated prompt-assisted generate command.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"sketchi",
|
|
@@ -26,7 +26,8 @@
|
|
|
26
26
|
"sketchi": "./sketchi.js"
|
|
27
27
|
},
|
|
28
28
|
"files": [
|
|
29
|
-
"sketchi.js"
|
|
29
|
+
"sketchi.js",
|
|
30
|
+
"README.md"
|
|
30
31
|
],
|
|
31
32
|
"engines": {
|
|
32
33
|
"node": ">=24.13.0"
|