@gizai/cli 2.1.0 → 2.1.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 CHANGED
@@ -1,6 +1,6 @@
1
1
  # @gizai/cli
2
2
 
3
- GizStack 0.1.0-preview.20261022.1 from npm: a native language, web server and database in one stack. TypeScript syntax; PostgreSQL, Redis and S3 protocols. Docs: https://gizstack.com/docs/start
3
+ GizStack 0.1.0-preview.20261023.8 from npm: natively compiled TypeScript, with the whole stack built in: a modern web framework and server, OLTP and OLAP SQL (PostgreSQL- and Oracle-compatible), vector search, key-value, distributed POSIX and S3 storage, GPU tensors, and local LLM, image and video generation. Docs: https://gizstack.com/docs/start
4
4
 
5
5
  ```sh
6
6
  npm install -g @gizai/cli
package/bin/giz.js CHANGED
@@ -1,5 +1,5 @@
1
1
  #!/usr/bin/env node
2
- // The npm entry of GizStack 0.1.0-preview.20261022.1 (generated by tools/distribution/channels).
2
+ // The npm entry of GizStack 0.1.0-preview.20261023.8 (generated by tools/distribution/channels).
3
3
  // The giz.ai commands (auth api-key credits model models chat generate job drive table upload computer app connection plugin agent invoke mcp skill engine update __update-check), help and --version run the command line binary of this platform's package
4
4
  // (@gizai/cli-OS-CPU, an optional dependency), which needs no toolchain: giz.ai CLI 2.0's users keep working right after
5
5
  // `npm install`. Every other command needs the toolchain: the first such run installs this version with install.sh, which
@@ -12,7 +12,7 @@ const fs = require("fs");
12
12
  const os = require("os");
13
13
  const path = require("path");
14
14
 
15
- const VERSION = "0.1.0-preview.20261022.1";
15
+ const VERSION = "0.1.0-preview.20261023.8";
16
16
  const ACCOUNT = new Set("auth api-key credits model models chat generate job drive table upload computer app connection plugin agent invoke mcp skill engine update __update-check".split(" ").filter(Boolean));
17
17
  // 2.0's flags that take no value: the command is the first word that is not a flag or a flag's value.
18
18
  const BOOLEANS = new Set(["help", "json", "no-open", "version", "device"]);
@@ -48,6 +48,26 @@ function bundled() {
48
48
  return fs.existsSync(file) ? file : undefined;
49
49
  } catch { return undefined; }
50
50
  }
51
+ // Once a day a detached node asks npm for the newest @gizai/cli; a later run in a terminal names a newer one in one line on
52
+ // stderr. Off in CI, without a terminal and with GIZ_NO_UPDATE_CHECK, and it never delays or fails the command.
53
+ function notice() {
54
+ if (!process.stderr.isTTY || process.env.CI || process.env.GIZ_NO_UPDATE_CHECK) return;
55
+ const file = path.join(os.homedir(), ".giz", "update-check.json");
56
+ let seen = {};
57
+ try { seen = JSON.parse(fs.readFileSync(file, "utf8")); } catch {}
58
+ const newer = (a, b) => { const x = a.split("."), y = b.split("."); for (let i = 0; i < 3; i += 1) { if (+x[i] !== +y[i]) return +x[i] > +y[i]; } return false; };
59
+ if (typeof seen.latest === "string" && /^\d+\.\d+\.\d+$/.test(seen.latest) && newer(seen.latest, "2.1.2")) {
60
+ process.stderr.write("giz " + seen.latest + " is out (you have 2.1.2): giz update\n");
61
+ }
62
+ if (Date.now() - (seen.checked || 0) < 86400000) return;
63
+ try {
64
+ fs.mkdirSync(path.dirname(file), { recursive: true });
65
+ fs.writeFileSync(file, JSON.stringify({ ...seen, checked: Date.now() }));
66
+ const check = "fetch('https://registry.npmjs.org/@gizai/cli/latest').then(r => r.json()).then(j => { const f = process.argv[1]; const s = JSON.parse(require('fs').readFileSync(f, 'utf8')); require('fs').writeFileSync(f, JSON.stringify({ ...s, latest: j.version })); }).catch(() => {});";
67
+ require("child_process").spawn(process.execPath, ["-e", check, file], { detached: true, stdio: "ignore" }).unref();
68
+ } catch {}
69
+ }
70
+ notice();
51
71
  function run(file, standalone) {
52
72
  const env = { ...process.env, GIZ_INSTALLER: installer(), GIZ_SELF: process.argv[1],
53
73
  GIZ_SKILLS: path.join(__dirname, "..", "skills") };
@@ -58,18 +78,24 @@ function run(file, standalone) {
58
78
  process.exit(ran.status === null ? 1 : ran.status);
59
79
  }
60
80
 
81
+ // `gizdb` (bin/gizdb.js) is the same package's: the toolchain carries the server, so `npm i -g @gizai/cli && gizdb serve`
82
+ // needs no PATH edit. It has no giz.ai commands.
83
+ const database = process.env.GIZ_NPM_DATABASE === "1";
84
+ delete process.env.GIZ_NPM_DATABASE;
61
85
  const argv = process.argv.slice(2);
62
86
  const command = commandOf(argv);
63
- const own = bundled();
87
+ const own = database ? undefined : bundled();
64
88
  if (process.platform === "win32") {
65
89
  if (!own) fail("the Windows binary package was not installed; reinstall without --omit=optional");
66
90
  run(own, true);
67
91
  }
68
- if (own && (ACCOUNT.has(command) || argv.length === 0 || command === "help" || command === "-h" || (command === "" && (argv.includes("--version") || argv.includes("--help"))))) {
92
+ // `--version` goes to the toolchain: it names the toolchain's version, and the install guide's first command fetches it.
93
+ // `help` with an argument (`giz help --all`, `giz help deploy`) is the toolchain's: the 2.0 binary knows only its own commands.
94
+ if (own && (ACCOUNT.has(command) || argv.length === 0 || ((command === "help" || command === "-h") && argv.length === 1) || (command === "" && argv.includes("--help")))) {
69
95
  run(own, true);
70
96
  }
71
97
  const root = process.env.GIZ_INSTALL || path.join(os.homedir(), ".giz");
72
- const bin = path.join(root, "bin", "giz");
98
+ const bin = path.join(root, "bin", database ? "gizdb" : "giz");
73
99
  const installed = spawnSync("sh", [path.join(__dirname, "install.sh"), ..."".split(" ").filter(Boolean), "--if-missing", "--no-modify-path", "--version", VERSION],
74
100
  { stdio: ["inherit", process.stderr, "inherit"], env: { ...process.env, GIZ_INSTALL: root } });
75
101
  if (installed.error) fail("cannot run sh: " + installed.error.message + ". Supported platforms: https://gizstack.com/download");
package/bin/gizdb.js ADDED
@@ -0,0 +1,5 @@
1
+ #!/usr/bin/env node
2
+ // gizdb of @gizai/cli: giz.js runs the installed toolchain's bin/gizdb.
3
+ "use strict";
4
+ process.env.GIZ_NPM_DATABASE = "1";
5
+ require("./giz.js");
package/bin/install.sh CHANGED
@@ -1,6 +1,6 @@
1
1
  #!/bin/sh
2
- # Install GizStack: curl -fsSL https://gizstack.com/install | sh
3
- # Install the GizDB server alone: curl -fsSL https://gizstack.com/install | sh -s -- --only gizdb
2
+ # Install Gizlang: curl -fsSL https://gizstack.com/install | sh
3
+ # Install it for the GizDB server: curl -fsSL https://gizstack.com/install | sh -s -- --only gizdb
4
4
  # While gizstack.com is in private preview, the command on your signed-in page adds
5
5
  # -H "Authorization: Bearer TOKEN": the script served for it carries that access token
6
6
  # and stores it in ~/.config/gizstack/access-token, where the installer and
@@ -12,8 +12,8 @@
12
12
  # activates the version. Nothing needs root. Docs: https://gizstack.com/docs/start
13
13
  #
14
14
  # Options (sh -s -- OPTION...):
15
- # --only gizdb install only the GizDB server (bin/gizdb): the same
16
- # signed release, without the compiler, into ~/.gizdb
15
+ # --only gizdb install it for the GizDB server, into ~/.gizdb: bin/gizdb
16
+ # runs the server, which compiles its scan kernels with it
17
17
  # --version VERSION install this published version (default: the newest)
18
18
  # --no-modify-path do not add the bin directory to shell profiles
19
19
  # --installer FILE use this downloaded installer (the npm and Homebrew
@@ -32,13 +32,11 @@ SITE="https://gizstack.com"
32
32
  # The access token this script was served for (the server writes it here), or empty.
33
33
  ACCESS=''
34
34
 
35
- # Published installers: product (toolchain, or gizdb for the server alone),
36
- # target, version, installer SHA-256.
35
+ # Published installers: target, version, installer SHA-256.
37
36
  # Generated from $SITE/api/releases when this script was served.
38
37
  releases() {
39
38
  cat <<'RELEASES'
40
- toolchain x86_64-unknown-linux-gnu 0.1.0-preview.20261022.1 e628a629819b7e9a4f965ca8038ec5d364644ee3c526316be2a577c5d300b506
41
- gizdb x86_64-unknown-linux-gnu 0.1.0-preview.20261015.5 cc102bb96abcbe04a98dbc697595310e28b7d997a716f979258ff2afaf4620c6
39
+ x86_64-unknown-linux-gnu 0.1.0-preview.20261023.8 69c0c897fa694c7e9b9fa8de9dec8d54b0479d5b451fa2a118c427300c111aac
42
40
  RELEASES
43
41
  }
44
42
 
@@ -59,9 +57,9 @@ detect_target() {
59
57
  if ls /lib/ld-musl-* >/dev/null 2>&1 || (ldd --version 2>&1 | grep -qi musl); then libc=musl; fi
60
58
  target="$arch-unknown-linux-$libc" ;;
61
59
  Darwin)
62
- # A shell under Rosetta reports x86_64 on Apple Silicon.
63
- if [ "$arch" = x86_64 ] && [ "$(sysctl -n sysctl.proc_translated 2>/dev/null)" = 1 ]; then arch=aarch64; fi
64
- target="$arch-apple-darwin" ;;
60
+ # No macOS release until a Mac builds and tests it: say so instead of naming a missing target.
61
+ printf '%s\n' "macOS is coming; use the Playground ($SITE/play) or a Linux machine meanwhile" >&2
62
+ exit 1 ;;
65
63
  MINGW* | MSYS* | CYGWIN* | Windows_NT)
66
64
  fail "on Windows, run in PowerShell: irm $SITE/install.ps1 | iex" ;;
67
65
  *) fail "unsupported operating system: $os. Supported platforms: $SITE/download" ;;
@@ -71,14 +69,14 @@ detect_target() {
71
69
  # Sets digest and version from the table, or explains what exists.
72
70
  select_release() {
73
71
  digest=""
74
- [ -n "$(releases)" ] || fail "no GizStack release supports this install script yet. Download an installer: $SITE/download"
75
- found=$(releases | while read -r p t v d; do
76
- if [ "$p" = "$product" ] && [ "$t" = "$target" ] && { [ -z "$wanted" ] || [ "$v" = "$wanted" ]; }; then say "$v $d"; break; fi
72
+ [ -n "$(releases)" ] || fail "no Gizlang release supports this install script yet. Download an installer: $SITE/download"
73
+ found=$(releases | while read -r t v d; do
74
+ if [ "$t" = "$target" ] && { [ -z "$wanted" ] || [ "$v" = "$wanted" ]; }; then say "$v $d"; break; fi
77
75
  done)
78
76
  if [ -n "$found" ]; then version=${found% *}; digest=${found#* }; return; fi
79
- available=$(releases | while read -r p t v d; do if [ "$p" = "$product" ] && [ "$t" = "$target" ]; then printf ' %s' "$v"; fi; done)
77
+ available=$(releases | while read -r t v d; do if [ "$t" = "$target" ]; then printf ' %s' "$v"; fi; done)
80
78
  if [ -n "$available" ]; then fail "$name $wanted is not published for $target. Published:$available"; fi
81
- platforms=$(releases | while read -r p t v d; do if [ "$p" = "$product" ]; then printf '\n %s' "$t"; fi; done)
79
+ platforms=$(releases | while read -r t v d; do printf '\n %s' "$t"; done)
82
80
  [ -n "$platforms" ] || fail "no $name release supports this install script yet. Release status: $SITE/download"
83
81
  fail "no $name release for $target yet. Published platforms:$platforms
84
82
  Use the browser Playground meanwhile: $SITE/play. Release status: $SITE/download"
@@ -91,8 +89,15 @@ download() { # URL FILE
91
89
  elif command -v wget >/dev/null 2>&1; then
92
90
  if [ -n "$KEY" ]; then wget --https-only -q --header="Authorization: Bearer $KEY" -O "$2" "$1"
93
91
  else wget --https-only -q -O "$2" "$1"; fi
92
+ elif command -v node >/dev/null 2>&1; then
93
+ # The npm package runs this script, so Node.js is there even where curl and wget are not (node:*-slim, a minimal WSL).
94
+ node -e 'const [u, f, k] = process.argv.slice(1); if (!u.startsWith("https://")) { console.error("not https: " + u); process.exit(1); }
95
+ require("https").get(u, { headers: k ? { Authorization: "Bearer " + k } : {} }, (r) => {
96
+ if (r.statusCode !== 200) { console.error("HTTP " + r.statusCode + " for " + u); process.exit(1); }
97
+ r.pipe(require("fs").createWriteStream(f)).on("error", (e) => { console.error(e.message); process.exit(1); });
98
+ }).on("error", (e) => { console.error(e.message); process.exit(1); });' "$1" "$2" "$KEY"
94
99
  else
95
- fail "curl or wget is required"
100
+ fail "curl, wget or node is required"
96
101
  fi
97
102
  }
98
103
 
@@ -135,6 +140,12 @@ ENV
135
140
  fishrc="$HOME/.config/fish/conf.d/$command.fish"
136
141
  add_line "$fishrc" "$fishline"
137
142
  fi
143
+ # The profile this shell reads, for the line that tells the person what to source now.
144
+ case "${SHELL:-}" in
145
+ */zsh) rc=$zshrc ;;
146
+ */fish) rc=${fishrc:-$HOME/.bashrc} ;;
147
+ *) rc="$HOME/.bashrc" ;;
148
+ esac
138
149
  }
139
150
 
140
151
  # The installer, `giz upgrade` and package reads send this token to gizstack.com.
@@ -160,12 +171,12 @@ main() {
160
171
  wanted=""
161
172
  local_installer=""
162
173
  if_missing=0
163
- product=toolchain
174
+ only=""
164
175
  path_changes=1
165
176
  if [ -n "${NO_MODIFY_PATH:-}" ]; then path_changes=0; fi
166
177
  while [ $# -gt 0 ]; do
167
178
  case "$1" in
168
- --only) [ $# -ge 2 ] || fail "--only needs a value"; [ "$2" = gizdb ] || fail "--only takes gizdb (the GizDB server alone), not $2"; product=gizdb; shift 2 ;;
179
+ --only) [ $# -ge 2 ] || fail "--only needs a value"; [ "$2" = gizdb ] || fail "--only takes gizdb (the GizDB server), not $2"; only=gizdb; shift 2 ;;
169
180
  --version) [ $# -ge 2 ] || fail "--version needs a value"; wanted=$2; shift 2 ;;
170
181
  --no-modify-path) path_changes=0; shift ;;
171
182
  --if-missing) if_missing=1; shift ;;
@@ -174,18 +185,19 @@ main() {
174
185
  *) fail "unknown option: $1 (see $SITE/docs/start)" ;;
175
186
  esac
176
187
  done
177
- # The GizDB server alone is its own installation, beside a toolchain's, never inside it.
178
- if [ "$product" = gizdb ]; then
188
+ # For the GizDB server the toolchain goes to a folder of its own: its bin/gizdb runs the server, which compiles its
189
+ # scan kernels with that toolchain (a server without a compiler ran every query on the interpreter).
190
+ if [ "$only" = gizdb ]; then
179
191
  name=GizDB; command=gizdb; variable=GIZDB_INSTALL; root="${GIZDB_INSTALL:-}"; home=.gizdb
180
192
  else
181
- name=GizStack; command=giz; variable=GIZ_INSTALL; root="${GIZ_INSTALL:-}"; home=.giz
193
+ name=Gizlang; command=giz; variable=GIZ_INSTALL; root="${GIZ_INSTALL:-}"; home=.giz
182
194
  fi
183
195
  if [ -z "$root" ]; then
184
196
  [ -n "${HOME:-}" ] || fail "HOME is not set; set $variable to the installation directory"
185
197
  root="$HOME/$home"
186
198
  # An install from before the command was gizstack (~/.gizlang) is upgraded in place: the installer then removes
187
199
  # its gizlang command, and no second command stays on PATH.
188
- if [ "$product" != gizdb ] && [ ! -e "$root" ] && [ -f "$HOME/.gizlang/active-toolchain" ]; then root="$HOME/.gizlang"; fi
200
+ if [ "$only" != gizdb ] && [ ! -e "$root" ] && [ -f "$HOME/.gizlang/active-toolchain" ]; then root="$HOME/.gizlang"; fi
189
201
  fi
190
202
  if [ "$wanted" = latest ]; then wanted=""; fi
191
203
  case "$root" in
@@ -199,7 +211,7 @@ main() {
199
211
  detect_target
200
212
  select_release
201
213
  if [ "$if_missing" = 1 ]; then
202
- for installed in "$root/versions/$product-$target-$version-"*; do
214
+ for installed in "$root/versions/toolchain-$target-$version-"*; do
203
215
  if [ -f "$installed/release.json" ]; then exit 0; fi
204
216
  done
205
217
  fi
@@ -210,7 +222,6 @@ main() {
210
222
  if [ -n "$local_installer" ]; then
211
223
  cp "$local_installer" "$installer" || fail "cannot read the installer $local_installer"
212
224
  else
213
- say "Downloading the $name $version installer for $target"
214
225
  resolve_access
215
226
  if ! download "$SITE/objects/sha256/$digest" "$installer"; then
216
227
  [ -n "$KEY" ] || fail "the installer download was refused: $name is in private preview. Signed in at $SITE, your install command on $SITE/download carries your access key (or set GIZ_ACCESS_TOKEN). No invitation yet: $SITE/access-request"
@@ -220,41 +231,29 @@ main() {
220
231
  actual=$(sha256 "$installer")
221
232
  [ "$actual" = "$digest" ] || fail "the installer SHA-256 is $actual, not $digest; nothing was installed"
222
233
  chmod u+x "$installer"
223
- # A copy that came through a browser or an archive tool carries the macOS
224
- # quarantine attribute, and Gatekeeper then refuses the ad-hoc signed program.
225
- # The SHA-256 check above replaces what the attribute would have asked the user to trust.
226
- if [ "$os" = Darwin ] && command -v xattr >/dev/null 2>&1; then xattr -d com.apple.quarantine "$installer" 2>/dev/null || :; fi
227
234
 
228
235
  store_access
229
236
  mkdir -p "$root" || fail "cannot create $root"
230
- "$installer" --root "$root" || fail "the installer failed; the previous version, if any, stays active"
237
+ # The installer's own report is for a direct run; here the one summary line below says it.
238
+ report=$("$installer" --root "$root") || { printf '%s\n' "$report" >&2; fail "the installer failed; the previous version, if any, stays active"; }
231
239
 
232
240
  changed=""
233
241
  if [ "$path_changes" = 1 ]; then modify_path; fi
234
- say ""
235
- if [ "$product" = gizdb ]; then
242
+ if [ "$only" = gizdb ]; then
236
243
  # gizdb has no --version; its usage proves the installed server runs here.
237
244
  "$root/bin/gizdb" --help >/dev/null || fail "$root/bin/gizdb does not run on this computer"
238
- say "GizDB $version for $target is installed: $root/bin/gizdb"
245
+ next="GIZDB_PASSWORD=... gizdb serve --dir ~/gizdb-data --port 5432"
239
246
  else
240
- "$root/bin/giz" --version || fail "$root/bin/giz does not run on this computer"
247
+ "$root/bin/giz" --version >/dev/null || fail "$root/bin/giz does not run on this computer"
248
+ next="giz init hello && cd hello && giz run main.giz"
241
249
  fi
242
- say ""
250
+ shown=$root
251
+ case "$root" in "${HOME:-/nonexistent}"/*) shown="~${root#"$HOME"}" ;; esac
252
+ kb=$(du -sk "$root/versions" 2>/dev/null | cut -f 1)
253
+ say "$name $version installed ($(( (${kb:-0} + 512) / 1024 )) MB in $shown). Next: $next"
254
+ # PATH text only when a profile changed: under --no-modify-path (the npm package) the command is already found.
243
255
  if [ -n "$changed" ]; then
244
- say "Added $root/bin to PATH in:$changed"
245
- say "Open a new terminal, or run: . \"$root/env\""
246
- elif [ "$path_changes" = 1 ]; then
247
- say "$root/bin is already on PATH in your shell profiles."
248
- else
249
- say "Add $root/bin to PATH to run $command."
250
- fi
251
- say ""
252
- if [ "$product" = gizdb ]; then
253
- say "Next: GIZDB_PASSWORD=... gizdb serve --dir ~/gizdb-data --port 5432"
254
- say "Docs: $SITE/docs/operations/gizdb-server (systemd unit, backups, upgrades)"
255
- else
256
- say "Next: giz init hello && cd hello && giz run main.giz"
257
- say "Docs: $SITE/docs/start"
256
+ say "Added $shown/bin to PATH in:$(printf %s "$changed" | sed "s#$HOME/#~/#g"). Open a new terminal, or run: source $(printf %s "$rc" | sed "s#^$HOME/#~/#")"
258
257
  fi
259
258
  }
260
259
 
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@gizai/cli",
3
- "version": "2.1.0",
4
- "description": "GizStack: a native language, web server and database in one stack. TypeScript syntax; PostgreSQL, Redis and S3 protocols",
3
+ "version": "2.1.2",
4
+ "description": "GizStack: natively compiled TypeScript, with the whole stack built in: a modern web framework and server, OLTP and OLAP SQL (PostgreSQL- and Oracle-compatible), vector search, key-value, distributed POSIX and S3 storage, GPU tensors, and local LLM, image and video generation",
5
5
  "homepage": "https://gizstack.com",
6
6
  "repository": {
7
7
  "type": "git",
@@ -12,17 +12,13 @@
12
12
  "access": "public"
13
13
  },
14
14
  "bin": {
15
- "giz": "bin/giz.js"
15
+ "giz": "bin/giz.js",
16
+ "gizdb": "bin/gizdb.js"
16
17
  },
17
18
  "files": [
18
- "bin",
19
- "skills"
19
+ "bin"
20
20
  ],
21
21
  "engines": {
22
22
  "node": ">=16"
23
- },
24
- "optionalDependencies": {
25
- "@gizai/cli-linux-x64": "2.1.0",
26
- "@gizai/cli-win32-x64": "2.1.0"
27
23
  }
28
24
  }
@@ -1,131 +0,0 @@
1
- ---
2
- name: giz
3
- description: Use Giz text, image, video, audio, speech, embedding, reranking, Drive, and Computer capabilities from an AI agent. Trigger when the user asks to run an AI model through Giz, generate or transform media, embed or rerank content, inspect or modify Giz Drive files, operate a Giz Computer or terminal, or discover live Giz models and their parameters.
4
- ---
5
-
6
- # Giz
7
-
8
- Use the `giz` CLI or the configured Giz MCP server. Prefer MCP when available and the CLI when working in a shell.
9
-
10
- ## Workflow
11
-
12
- 1. Run `model_list` before selecting an unfamiliar media model.
13
- 2. Run `model_get` and treat its live input schema as the source of truth.
14
- 3. Call `model_run` with the exact model ID and supported inputs.
15
- 4. Generation returns a durable job. Poll `job_get`; do not resubmit while it is queued or processing.
16
- 5. Preserve completed Drive URLs and paths. Use Drive tools to inspect or organize results.
17
- 6. Use `giz_computer_exec` for commands; it runs outside persistent terminals and has a bounded deadline. Use `terminal_list`, `terminal_observe`, and `terminal_send` only to inspect or interact with an existing visible session. Pass a known exact Computer name, slug, or ID directly as `computer`; use `computer_list` only when the target is unknown or ambiguous.
18
- 7. Ask for explicit confirmation immediately before destructive Drive removal, Computer runtime changes, or commands with material side effects.
19
-
20
- ## CLI
21
-
22
- Connect once in a browser:
23
-
24
- ```bash
25
- giz auth login
26
- ```
27
-
28
- Discover and generate:
29
-
30
- ```bash
31
- giz model list --type image-generation
32
- giz model get MODEL_ID
33
- giz model run MODEL_ID --input '{"prompt":"..."}'
34
- ```
35
-
36
- Use the OpenAI-compatible chat boundary:
37
-
38
- ```bash
39
- giz chat gpt-6-luna "..."
40
- ```
41
-
42
- Upload local media into an exact model field:
43
-
44
- ```bash
45
- giz model run MODEL_ID \
46
- --input '{"prompt":"Animate this frame"}' \
47
- --upload image=./frame.png
48
- ```
49
-
50
- Invoke an exact item-driven tool:
51
-
52
- ```bash
53
- giz invoke drive.readFile --input '{"path":"notes/brief.md"}'
54
- ```
55
-
56
- Pass `--json` for machine output. Use `GIZ_TOKEN` only in ephemeral automation.
57
-
58
- ## Boundaries
59
-
60
- - Do not guess model ids, parameter names, enum values, or costs.
61
- - Do not turn argv arrays into shell strings.
62
- - Do not read binary Drive content unless the task needs it; prefer returned URLs and metadata.
63
- - Do not retry failed generations blindly. Report the provider or contract error.
64
-
65
- Read [references/operations.md](references/operations.md) when MCP discovery is unavailable or when choosing between Drive and Computer tools.
66
-
67
- App changes pass the `revision` read from `giz app list` explicitly.
68
- `run`, `publish` and `delete` require `--expected-revision REVISION`.
69
- The `--input` of `create` and `save` carries `id` and `expectedRevision` (0 for a new App).
70
- The CLI never re-reads the list to substitute a revision, so the server rejects the call if another change landed after your review.
71
-
72
- The table below is generated from the CLI dispatcher and the tool descriptors. To refresh it, run:
73
- `GIZ_UPDATE_CLI_SURFACE=1 pnpm --filter giz-app-giz test --runInBand --runTestsByPath server/external/cli-surface.spec.ts`.
74
- A normal CI run does not write the document; it fails on any difference in the table.
75
-
76
- <!-- cli-surface:start -->
77
- | Command | Tool ID | MCP tool | Required input | Scope | Agent discovery |
78
- | --- | --- | --- | --- | --- | --- |
79
- | model list | model.list | model_list | - | giz.read | model.list |
80
- | model get | model.get | model_get | model | giz.read | model.get |
81
- | model run | model.run | model_run | model, input | giz.inference | model.run |
82
- | generate image | generateImage | generateImage | prompt | giz.write | generateImage |
83
- | generate video | generateVideo | generateVideo | prompt | giz.write | generateVideo |
84
- | generate music | generateMusic | generateMusic | prompt | giz.write | generateMusic |
85
- | generate talking-head | generateTalkingHead | generateTalkingHead | prompt, references | giz.write | generateTalkingHead |
86
- | generate audio | generateAudio | generateAudio | purpose | giz.write | generateAudio |
87
- | job list | job.list | job_list | - | giz.read | server job |
88
- | job get | job.get | job_get | job | giz.read | server job |
89
- | job wait | job.get | job_get | job | giz.read | server job |
90
- | job cancel | job.cancel | job_cancel | job | giz.destructive | server job |
91
- | credits | account.credits | account_credits | - | giz.read | account.credits |
92
- | drive ls | drive.list | drive_list | - | giz.read | drive.list |
93
- | drive list | drive.list | drive_list | - | giz.read | drive.list |
94
- | drive search | drive.search | drive_search | query | giz.read | drive.search |
95
- | drive read | drive.readFile | drive_readFile | path | giz.read | drive.readFile |
96
- | drive write | drive.writeFile | drive_writeFile | path, content | giz.write | drive.writeFile |
97
- | drive mkdir | drive.makeDirectory | drive_makeDirectory | path | giz.write | drive.makeDirectory |
98
- | drive move | drive.movePath | drive_movePath | from, to | giz.write | drive.movePath |
99
- | drive delete | drive.deletePath | drive_deletePath | path | giz.destructive | drive.deletePath |
100
- | table list | workspace.objects | workspace_objects | - | giz.read | workspace.objects |
101
- | table get | workspace.objects | workspace_objects | - | giz.read | workspace.objects |
102
- | table read | table.readRows | table_readRows | table | giz.read | table.readRows |
103
- | table write | table.writeRows | table_writeRows | table | giz.write | table.writeRows |
104
- | table action | workspace.executeAction | workspace_executeAction | view, action | giz.execute | workspace.executeAction |
105
- | computer list | computer.list | computer_list | - | giz.read | computer.list |
106
- | computer get | computer.get | computer_get | - | giz.read | external only |
107
- | computer start | computer.start | computer_start | - | giz.execute | external only |
108
- | computer stop | computer.stop | computer_stop | - | giz.destructive | external only |
109
- | computer exec | computer.exec | giz_computer_exec | - | giz.execute | computer.exec |
110
- | app list | app.list | app_list | - | giz.read | app.list |
111
- | app create | app.save | app_save | id, expectedRevision | giz.execute | app.save |
112
- | app save | app.save | app_save | id, expectedRevision | giz.execute | app.save |
113
- | app run | app.run | app_run | id, expectedRevision | giz.execute | app.run |
114
- | app publish | app.publish | app_publish | id, expectedRevision, visibility | giz.write | app.publish |
115
- | app open | app.open | app_open | id | giz.read | app.open |
116
- | app delete | app.delete | app_delete | id, expectedRevision | giz.destructive | app.delete |
117
- | plugin list | plugin.catalog | plugin_catalog | - | giz.read | plugin.catalog |
118
- | plugin search | plugin.catalog | plugin_catalog | - | giz.read | plugin.catalog |
119
- | plugin inspect | plugin.catalog | plugin_catalog | - | giz.read | plugin.catalog |
120
- | plugin install | plugin.install | plugin_install | - | giz.execute | plugin.install |
121
- | plugin update | plugin.manage | plugin_manage | operation | giz.destructive | plugin.manage |
122
- | plugin enable | plugin.manage | plugin_manage | operation | giz.destructive | plugin.manage |
123
- | plugin disable | plugin.manage | plugin_manage | operation | giz.destructive | plugin.manage |
124
- | plugin remove | plugin.manage | plugin_manage | operation | giz.destructive | plugin.manage |
125
- | plugin publish | plugin.manage | plugin_manage | operation | giz.destructive | plugin.manage |
126
- | plugin unpublish | plugin.manage | plugin_manage | operation | giz.destructive | plugin.manage |
127
- | connection list | capability.status | capability_status | - | giz.read | capability.status |
128
- | agent start | agent.start | agent_start | agentId, prompt | giz.execute | external only |
129
- | agent status | agent.status | agent_status | turnId | giz.read | agent.status |
130
- | agent cancel | agent.cancel | agent_cancel | turnId | giz.execute | agent.cancel |
131
- <!-- cli-surface:end -->
@@ -1,4 +0,0 @@
1
- interface:
2
- display_name: "Giz"
3
- short_description: "Use Giz media, Drive, and Computer tools"
4
- default_prompt: "Use Giz to create media or work with my Drive and Computer."
@@ -1,19 +0,0 @@
1
- # Giz operation map
2
-
3
- | Goal | Operation |
4
- |---|---|
5
- | Discover non-LLM models and fields | `model_list`, `model_get` |
6
- | Run any live non-LLM model | `model_run` |
7
- | Track durable generation | `job_list`, `job_get`, `job_cancel` |
8
- | List, search, or read Drive | `drive_list`, `drive_search`, `drive_readFile` |
9
- | Create or change Drive content | `drive_writeFile`, `drive_makeDirectory`, `drive_movePath`, `drive_importUrl` |
10
- | Move Drive content to Trash | `drive_deletePath` |
11
- | Read a table's fields and rows | `table_readRows` |
12
- | Create, update or remove table rows (one undoable change per call) | `table_writeRows` |
13
- | Turn rows into a new table | `table_createFromRows` |
14
- | Discover and control Computers | `computer_list`, `computer_start`, `computer_stop` |
15
- | Run a Computer command | `giz_computer_exec` |
16
- | Find, inspect, or interact with an existing terminal | `terminal_list`, `terminal_observe`, `terminal_send` |
17
- | Record, inspect or transform media | `media_capture`, `media_probe`, `media_process` |
18
-
19
- Always prefer the live `tools/list` result over this map. Streamable HTTP MCP is `/api/mcp`; ChatGPT OpenAPI is `/api/openapi.json`; the authenticated HTTP manifest is `/api/tools`. `giz_computer_exec` accepts an exact Computer name, slug, or ID as `computer`, argv `command`, optional `stdin`, `cwd`, and `deadlineMs`; do not send `timeoutMs`, `yieldMs`, `sessionId`, or shell command strings. Omit `computer` for the default Computer and use `computer_list` only when the target is unknown or ambiguous.
@@ -1,95 +0,0 @@
1
- # Giz Presentation & Slide Authoring
2
-
3
- The requested deliverable is a presentation: editable PPTX and, when requested,
4
- PDF. Choose the design workflow from the user's intent. Image-designed proposals
5
- start with complete slide images; direct SVG authoring remains an option.
6
- `slides.create/read/edit/inspect/export` share one Drive document for reconstruction
7
- and subsequent edits. The SVG is an intermediate representation and live preview;
8
- it must not dictate or simplify the image model's design.
9
-
10
- ## Image-designed proposals
11
-
12
- 1. Read the source material and reference pages. Establish the audience, narrative,
13
- approved wording, numbers and sources. Retain this content separately from image
14
- recognition: generated pixels do not override approved facts.
15
- 2. Discover the requested image model with `model.list/model.get`. Use its actual
16
- quality, size and reference-image contract. Honor the requested model; report a
17
- failure instead of silently substituting the default or a cheaper model. Use
18
- `model.run` with the exact retrieved input schema for model-specific quality or
19
- variant controls, including subsequent reference-image cleanup.
20
- 3. Generate **complete slide designs**, including typography, headings, body copy,
21
- diagrams, cards and artwork, through the existing image generation tools. Match
22
- the reference's visual ambition, information density and aspect ratio. Pass reference images
23
- to maintain composition and consistent design across pages. Save the finished
24
- slide images in Drive; they are the visual targets for conversion.
25
- 4. Inspect each target at readable resolution. Inventory all visible components,
26
- including icons and decorative marks, before cleanup; account for every one in
27
- the reconstructed layers. Reconstruct its actual composition,
28
- text bounds, line breaks, hierarchy, colors, borders and grouping in reference
29
- pixel coordinates. Do not redesign it as a generic template. Native text uses
30
- the approved source wording even where the image misspells or changes a number.
31
- 5. Extract photographs, logos and complex artwork with `assets` pixel crops.
32
- Where editable labels overlap artwork, edit the original image through
33
- the same image model and quality settings with that reference. Remove only the
34
- labels and preserve the composition. Inspect the cleaned pixels for leftover glyphs and unwanted design
35
- changes. Cropping alone does not clean text; flat masks cannot restore complex
36
- backgrounds. Rebuild simple cards, lines, arrows and labels as native objects.
37
- If retaining a background layer, remove those editable objects from its pixels
38
- too: moving a card or text box must not leave its original raster version behind.
39
- 6. Compose the reconstructed layers in one SVG document. Match the actual reference
40
- dimensions on every page, preserve stable object IDs and logical `g` groups,
41
- and use visible `text`/`tspan` with explicit line baselines and page fonts.
42
- Do not outline glyphs or use invisible text over full-slide screenshots.
43
- Preserve notes/citations and the original design image Drive path in each page's
44
- `desc` so future edits can repeat the same reference comparison. Match the
45
- reference typography and geometry; do not shrink body copy merely to hide an incorrect reconstruction.
46
- 7. Run `slides.inspect` with `previewPages` and corresponding `referenceImages`.
47
- This renders the deck once through PPTX and LibreOffice and returns each
48
- original image beside its exported counterpart in the observation sequence.
49
- Compare composition, artwork, typography, line breaks, content and cleanliness.
50
- `info.export.textBounds` gives measured rendered lines in SVG coordinates;
51
- use them to correct placement through `slides.read/edit`, then inspect again.
52
- The technical `passed` flag does not measure similarity to the reference.
53
- 8. Export the exact inspected revision with `slides.export`. Deliver the PPTX/PDF,
54
- retain the original design images and editable source, and disclose raster-only
55
- areas or unresolved differences. LibreOffice rendering does not establish pixel
56
- identity in Microsoft PowerPoint.
57
-
58
- ## Direct SVG authoring
59
-
60
- When direct vector authoring suits the request, create native text, shapes, groups
61
- and optional artwork directly, then use the same inspection and export path.
62
- This option does not replace a requested image-model design workflow. The live
63
- SVG editor and PowerPoint use different text renderers.
64
-
65
- ## Canonical source and asset placement
66
-
67
- ```json
68
- {
69
- "path": "Proposals/inventory.svg",
70
- "content": "<svg xmlns=\"http://www.w3.org/2000/svg\" id=\"deck\" viewBox=\"0 0 1920 1080\"><svg data-slide=\"true\" id=\"slide-1\" viewBox=\"0 0 1920 1080\"><title>Inventory</title><rect width=\"1920\" height=\"1080\" fill=\"#FFFFFF\"/><image id=\"hero\" x=\"1000\" y=\"100\" width=\"800\" height=\"600\"/><g id=\"value\"><rect x=\"80\" y=\"160\" width=\"840\" height=\"320\" rx=\"16\" fill=\"#EEF4FA\"/><text id=\"headline\" x=\"120\" y=\"250\" font-family=\"Noto Sans CJK KR\" font-size=\"48\" fill=\"#123456\">재고를 한눈에 확인</text></g></svg></svg>",
71
- "assets": {
72
- "hero": { "path": "Proposals/artwork.png", "crop": { "left": 620, "top": 70, "width": 800, "height": 600 } }
73
- }
74
- }
75
- ```
76
-
77
- Asset paths are relative to the Drive root. A plain string embeds the whole image;
78
- `{path,crop}` extracts exact pixels after EXIF orientation, without resizing.
79
- SVG geometry controls placement. Out-of-bounds crops fail before saving. The same
80
- asset map works for creation and element edits; an existing image requires its
81
- replacement fingerprint. Embedded bytes make the saved document self-contained.
82
-
83
- `slides.read` returns a compact outline. Selected text/shapes return exact XML and
84
- opaque `before` values. Images and groups containing images return attributes and
85
- `imageIds` instead of embedded bytes. Use `changes:[{id,before,attributes:{x:"80"}}]`
86
- to change geometry without resending content; `null` removes an attribute. Use
87
- `attributes:{}` together with `assets` to replace artwork. Attribute changes and
88
- `after` XML replacements are mutually exclusive and share the same fingerprint/CAS.
89
- Read individual child IDs when changing the contents of a group. Insert a page under the root with `slides.edit.inserts`; preserve
90
- unrelated objects. Whole-document replacement requires `expectedRevision`.
91
-
92
- Inspection example: `slides.inspect({path:"Proposals/inventory.svg", expectedRevision,
93
- previewPages:[1], referenceImages:[{page:1,path:"Proposals/design-1.png"}], language:"ko-KR"})`. Export requires `path`, `expectedRevision`, `format` (`pptx` or
94
- `pdf`) and a new `outputPath`. Set `language:"ko-KR"` for Korean. `reversePages`
95
- changes export page order only when requested for the actual printing workflow.