@gizai/cli 1.0.0 → 1.0.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.
- package/cli/giz.mjs +4 -3
- package/package.json +2 -2
package/cli/giz.mjs
CHANGED
|
@@ -3,11 +3,13 @@ import { createHash, randomBytes } from 'node:crypto'
|
|
|
3
3
|
import { openAsBlob } from 'node:fs'
|
|
4
4
|
import { chmod, mkdir, readFile, unlink, writeFile } from 'node:fs/promises'
|
|
5
5
|
import { createServer } from 'node:http'
|
|
6
|
+
import { createRequire } from 'node:module'
|
|
6
7
|
import os from 'node:os'
|
|
7
8
|
import path from 'node:path'
|
|
8
9
|
import { spawn, spawnSync } from 'node:child_process'
|
|
9
10
|
import { fileURLToPath } from 'node:url'
|
|
10
11
|
|
|
12
|
+
const { version: CLI_VERSION } = createRequire(import.meta.url)('../package.json')
|
|
11
13
|
const DEFAULT_URL = 'https://www.giz.ai'
|
|
12
14
|
const CALLBACK_URL = 'http://127.0.0.1:53682/callback'
|
|
13
15
|
const CLIENT_ID = 'giz-cli'
|
|
@@ -344,7 +346,7 @@ async function invoke(baseUrl, tool, input) {
|
|
|
344
346
|
|
|
345
347
|
async function runCommand(baseUrl, positionals, options) {
|
|
346
348
|
const [command, subcommand, ...rest] = positionals
|
|
347
|
-
if (options.version === true) return { kind: 'message', value:
|
|
349
|
+
if (options.version === true) return { kind: 'message', value: CLI_VERSION }
|
|
348
350
|
if (!command || command === 'help' || options.help === true) return { kind: 'help', value: help(command) }
|
|
349
351
|
if (command === 'auth' && subcommand === 'login') {
|
|
350
352
|
return { kind: 'auth', value: await login(baseUrl, options) }
|
|
@@ -522,8 +524,7 @@ async function runCommand(baseUrl, positionals, options) {
|
|
|
522
524
|
const endpoint = new URL('/api/mcp', baseUrl).href
|
|
523
525
|
if (client === 'codex') {
|
|
524
526
|
runExternal('codex', ['mcp', 'add', 'giz', '--url', endpoint, '--oauth-resource', endpoint], 'Install Codex CLI first.')
|
|
525
|
-
|
|
526
|
-
return { kind: 'message', value: 'Giz is connected to Codex.' }
|
|
527
|
+
return { kind: 'message', value: 'Giz was added to Codex. Complete the browser approval opened by Codex.' }
|
|
527
528
|
}
|
|
528
529
|
if (client === 'claude') {
|
|
529
530
|
runExternal('claude', ['mcp', 'add', '--transport', 'http', '--scope', 'user', 'giz', endpoint], 'Install Claude Code first.')
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@gizai/cli",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.1",
|
|
4
4
|
"description": "Giz CLI, MCP installer, and agent Skills for non-LLM models, Drive, and Computer",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"bin": {
|
|
@@ -27,7 +27,7 @@
|
|
|
27
27
|
"homepage": "https://www.giz.ai/mcp/",
|
|
28
28
|
"repository": {
|
|
29
29
|
"type": "git",
|
|
30
|
-
"url": "https://github.com/exinno/giz.git",
|
|
30
|
+
"url": "git+https://github.com/exinno/giz.git",
|
|
31
31
|
"directory": "apps/space/external"
|
|
32
32
|
},
|
|
33
33
|
"publishConfig": {
|