@gizai/cli 2.2.0 → 2.2.1

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.
Files changed (2) hide show
  1. package/cli/toolchain.mjs +3 -15
  2. package/package.json +1 -1
package/cli/toolchain.mjs CHANGED
@@ -2,12 +2,11 @@ import { spawnSync } from 'node:child_process'
2
2
  import { existsSync } from 'node:fs'
3
3
  import os from 'node:os'
4
4
  import path from 'node:path'
5
- import { createInterface } from 'node:readline/promises'
6
5
 
7
6
  // The Gizlang toolchain (GizStack: giz init, run, build, test, deploy, … and gizdb) is a native program per OS. This
8
- // package carries none of it: the first command that needs it installs it with gizstack.com's own install script for
9
- // this OS, which names the download size, checks the release signature and every file, and selects the version (a
10
- // project pin or the active one). Later runs execute the installed program at once.
7
+ // package carries none of it: the first command that needs it installs it at once, with no question, by gizstack.com's
8
+ // own install script for this OS, which names the download size first, checks the release signature and every file,
9
+ // and selects the version (a project pin or the active one). Later runs execute the installed program at once.
11
10
  const SITE = 'https://gizstack.com'
12
11
  // The toolchain's public commands (gizlang tools/cli/commands.giz). Only these, or a program file, install it: an agent
13
12
  // that asks for help on a command that does not exist must get an error, not a 200 MB download. Once the toolchain is
@@ -30,16 +29,6 @@ function installed(root, program) {
30
29
  return path.join(root, 'bin', program + (windows ? '.exe' : ''))
31
30
  }
32
31
 
33
- async function confirmed(command) {
34
- // A script or CI has no terminal to ask: it asked for the command, so it gets it.
35
- if (!process.stdin.isTTY || !process.stderr.isTTY) return true
36
- const prompt = createInterface({ input: process.stdin, output: process.stderr })
37
- try {
38
- const answer = await prompt.question(`giz ${command} needs the Gizlang toolchain, which is not installed. Install it from ${SITE} now? [Y/n] `)
39
- return !/^n/i.test(answer.trim())
40
- } finally { prompt.close() }
41
- }
42
-
43
32
  async function install(root) {
44
33
  const response = await fetch(`${SITE}/${windows ? 'install.ps1' : 'install'}`)
45
34
  if (!response.ok) throw new Error(`cannot download the install script: HTTP ${response.status} from ${SITE}`)
@@ -57,7 +46,6 @@ export async function runToolchain(program, args) {
57
46
  const root = toolchainRoot()
58
47
  const file = installed(root, program)
59
48
  if (!existsSync(file)) {
60
- if (!await confirmed(args[0] || program)) { process.exitCode = 1; return }
61
49
  if (!await install(root) || !existsSync(file)) {
62
50
  process.stderr.write(`The Gizlang toolchain is not installed, so giz ${args[0] || program} cannot run here. Supported platforms: ${SITE}/download\n`)
63
51
  process.exitCode = 1
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@gizai/cli",
3
- "version": "2.2.0",
3
+ "version": "2.2.1",
4
4
  "description": "The official command-line interface for giz.ai: run AI models, Drive, Computers and Apps, connect Claude Code, Codex and other agents over MCP, and run Gizlang (giz init, run, deploy), installed on first use.",
5
5
  "keywords": [
6
6
  "giz",