@schuttdev/gigai 0.3.0 → 0.3.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 ADDED
@@ -0,0 +1,41 @@
1
+ # @schuttdev/gigai
2
+
3
+ Server CLI for [Kon](https://github.com/Kaden-Schutt/kon) — runs on your machine and exposes tools to Claude over HTTPS.
4
+
5
+ Manages tool registration, MCP server wrapping, authentication, cron scheduling, and HTTPS setup via Tailscale Funnel or Cloudflare Tunnel.
6
+
7
+ ## Install
8
+
9
+ ```bash
10
+ npm install -g @schuttdev/gigai
11
+ ```
12
+
13
+ ## Quickstart
14
+
15
+ ```bash
16
+ gigai init # interactive setup wizard
17
+ gigai pair # generate a pairing code for Claude
18
+ ```
19
+
20
+ ## Commands
21
+
22
+ ```bash
23
+ gigai start # start the server
24
+ gigai stop # stop the server
25
+ gigai status # check if running
26
+ gigai pair # generate a new pairing code
27
+ gigai install # install as background service (launchd / systemd)
28
+ gigai uninstall # remove background service
29
+ gigai mcp add <n> -- <cmd> # add an MCP server
30
+ gigai wrap cli|mcp|script # add a tool interactively
31
+ gigai unwrap <name> # remove a tool
32
+ gigai cron add ... # schedule a task
33
+ ```
34
+
35
+ ## Documentation
36
+
37
+ See the [full documentation](https://github.com/Kaden-Schutt/kon) for setup guides, tool configuration, and architecture details.
38
+
39
+ ## License
40
+
41
+ MIT
@@ -1682,6 +1682,31 @@ async function runInit() {
1682
1682
  console.log(` Run 'gigai pair' to generate a new one.
1683
1683
  `);
1684
1684
  }
1685
+ function splitCommand(input3) {
1686
+ const tokens = [];
1687
+ let current = "";
1688
+ let inQuote = null;
1689
+ for (const ch of input3.trim()) {
1690
+ if (inQuote) {
1691
+ if (ch === inQuote) {
1692
+ inQuote = null;
1693
+ } else {
1694
+ current += ch;
1695
+ }
1696
+ } else if (ch === '"' || ch === "'") {
1697
+ inQuote = ch;
1698
+ } else if (ch === " " || ch === " ") {
1699
+ if (current) {
1700
+ tokens.push(current);
1701
+ current = "";
1702
+ }
1703
+ } else {
1704
+ current += ch;
1705
+ }
1706
+ }
1707
+ if (current) tokens.push(current);
1708
+ return { command: tokens[0] ?? input3.trim(), args: tokens.slice(1) };
1709
+ }
1685
1710
  async function loadConfigFile(path) {
1686
1711
  const configPath = resolve5(path ?? "gigai.config.json");
1687
1712
  const raw = await readFile5(configPath, "utf8");
@@ -1694,16 +1719,19 @@ async function saveConfig(config, path) {
1694
1719
  async function wrapCli() {
1695
1720
  const { config, path } = await loadConfigFile();
1696
1721
  const name = await input2({ message: "Tool name:", required: true });
1697
- const command = await input2({ message: "Command:", required: true });
1722
+ const commandInput = await input2({
1723
+ message: "Command (as you'd run it in your terminal):",
1724
+ required: true
1725
+ });
1698
1726
  const description = await input2({ message: "Description:", required: true });
1699
- const argsStr = await input2({ message: "Default args (space-separated, optional):" });
1700
1727
  const timeoutStr = await input2({ message: "Timeout in ms (optional):", default: "30000" });
1728
+ const { command, args } = splitCommand(commandInput);
1701
1729
  const tool = {
1702
1730
  type: "cli",
1703
1731
  name,
1704
1732
  command,
1705
1733
  description,
1706
- ...argsStr && { args: argsStr.split(" ").filter(Boolean) },
1734
+ ...args.length > 0 && { args },
1707
1735
  timeout: parseInt(timeoutStr, 10)
1708
1736
  };
1709
1737
  config.tools.push(tool);
package/dist/index.js CHANGED
@@ -4,12 +4,12 @@
4
4
  import { defineCommand, runMain } from "citty";
5
5
 
6
6
  // src/version.ts
7
- var VERSION = "0.3.0";
7
+ var VERSION = "0.3.2";
8
8
 
9
9
  // src/index.ts
10
10
  async function requireServer() {
11
11
  try {
12
- return await import("./dist-H6URC2HQ.js");
12
+ return await import("./dist-DTBR4X7U.js");
13
13
  } catch {
14
14
  console.error("Server dependencies not installed.");
15
15
  console.error("Run: npm install -g @schuttdev/gigai");
package/package.json CHANGED
@@ -1,7 +1,8 @@
1
1
  {
2
2
  "name": "@schuttdev/gigai",
3
- "version": "0.3.0",
3
+ "version": "0.3.2",
4
4
  "type": "module",
5
+ "license": "MIT",
5
6
  "bin": {
6
7
  "gigai": "dist/index.js"
7
8
  },
@@ -12,7 +13,8 @@
12
13
  }
13
14
  },
14
15
  "files": [
15
- "dist"
16
+ "dist",
17
+ "README.md"
16
18
  ],
17
19
  "scripts": {
18
20
  "build": "tsup",
@@ -23,11 +25,11 @@
23
25
  "dependencies": {
24
26
  "citty": "^0.1.6",
25
27
  "zod": "^3.22.0",
26
- "fastify": "^4.25.0",
27
- "@fastify/cors": "^9.0.0",
28
- "@fastify/rate-limit": "^9.0.0",
29
- "@fastify/multipart": "^8.0.0",
30
- "fastify-plugin": "^4.5.0",
28
+ "fastify": "^5.8.2",
29
+ "@fastify/cors": "^10.0.0",
30
+ "@fastify/rate-limit": "^10.0.0",
31
+ "@fastify/multipart": "^9.0.0",
32
+ "fastify-plugin": "^5.0.0",
31
33
  "@modelcontextprotocol/sdk": "^1.0.0",
32
34
  "@inquirer/prompts": "^7.0.0",
33
35
  "nanoid": "^5.0.0"