clabox 0.0.2 → 0.1.0

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 (52) hide show
  1. package/README.md +30 -0
  2. package/clabox.config.example.mjs +44 -0
  3. package/docs/guideline.md +43 -10
  4. package/lib/aliases-DKGcMHHe.js +60 -0
  5. package/lib/aliases-DKGcMHHe.js.map +1 -0
  6. package/lib/aliases-DXyz-ufw.d.ts +31 -0
  7. package/lib/app-CieBa29D.js +246 -0
  8. package/lib/app-CieBa29D.js.map +1 -0
  9. package/lib/app-CpuMtOoj.d.ts +30 -0
  10. package/lib/cli.js +46 -9
  11. package/lib/cli.js.map +1 -1
  12. package/lib/{config-DXTNeUhH.js → config-BQ44iVWT.js} +56 -4
  13. package/lib/config-BQ44iVWT.js.map +1 -0
  14. package/lib/config-DQWueb4a.d.ts +134 -0
  15. package/lib/ghostty-Ca0g9P9P.js +74 -0
  16. package/lib/ghostty-Ca0g9P9P.js.map +1 -0
  17. package/lib/ghostty-DemKkfqf.d.ts +34 -0
  18. package/lib/index.d.ts +9 -4
  19. package/lib/index.js +9 -4
  20. package/lib/init/aliases.d.ts +2 -0
  21. package/lib/init/aliases.js +2 -0
  22. package/lib/init/app.d.ts +2 -0
  23. package/lib/init/app.js +2 -0
  24. package/lib/init/ghostty.d.ts +2 -0
  25. package/lib/init/ghostty.js +2 -0
  26. package/lib/init/raycast.d.ts +2 -0
  27. package/lib/init/raycast.js +2 -0
  28. package/lib/init/scaffold.d.ts +2 -0
  29. package/lib/init/scaffold.js +2 -0
  30. package/lib/{profile-Bw6L1MiV.d.ts → profile-BeM41NXc.d.ts} +2 -2
  31. package/lib/{profile-CxqsgezL.js → profile-DM6NAgb-.js} +9 -12
  32. package/lib/profile-DM6NAgb-.js.map +1 -0
  33. package/lib/raycast-BCdO2Se1.js +35 -0
  34. package/lib/raycast-BCdO2Se1.js.map +1 -0
  35. package/lib/raycast-DM7c559f.d.ts +22 -0
  36. package/lib/{run-Dyp_hW97.js → run-CNehSQ-S.js} +20 -11
  37. package/lib/run-CNehSQ-S.js.map +1 -0
  38. package/lib/{run-BfF3Cwg7.d.ts → run-Cx8cuTh5.d.ts} +10 -3
  39. package/lib/sandbox/profile.d.ts +1 -1
  40. package/lib/sandbox/profile.js +1 -1
  41. package/lib/sandbox/run.d.ts +2 -2
  42. package/lib/sandbox/run.js +2 -2
  43. package/lib/scaffold-ByIbYAeS.d.ts +46 -0
  44. package/lib/scaffold-CRzC5KYe.js +141 -0
  45. package/lib/scaffold-CRzC5KYe.js.map +1 -0
  46. package/lib/utils/config.d.ts +2 -2
  47. package/lib/utils/config.js +2 -2
  48. package/package.json +1 -1
  49. package/lib/config-CUyriGxm.d.ts +0 -67
  50. package/lib/config-DXTNeUhH.js.map +0 -1
  51. package/lib/profile-CxqsgezL.js.map +0 -1
  52. package/lib/run-Dyp_hW97.js.map +0 -1
package/lib/cli.js CHANGED
@@ -1,29 +1,66 @@
1
1
  #!/usr/bin/env node
2
- import { a as loadConfig } from "./config-DXTNeUhH.js";
3
- import { n as profilePath, r as runClaude, t as generateProfile } from "./run-Dyp_hW97.js";
2
+ import { l as resolveBox, s as loadConfig } from "./config-BQ44iVWT.js";
3
+ import { n as runInit } from "./scaffold-CRzC5KYe.js";
4
+ import { a as runClaude, i as resolveProjectDir, n as generateProfile, r as profilePath } from "./run-CNehSQ-S.js";
5
+ import path from "node:path";
4
6
  import yargs from "yargs";
5
7
  import { hideBin } from "yargs/helpers";
6
8
  //#region src/cli.ts
9
+ /** Pick the explicit config path: a `--box <name>` wins over `--config <path>`. */
10
+ function explicitConfig(argv) {
11
+ if (argv.box) return resolveBox(argv.box);
12
+ return argv.config ?? void 0;
13
+ }
7
14
  await yargs(hideBin(process.argv)).scriptName("clabox").parserConfiguration({ "unknown-options-as-args": true }).option("config", {
8
15
  type: "string",
9
16
  describe: "Path to a JS config file (overrides CLABOX_CONFIG)"
17
+ }).option("box", {
18
+ alias: "b",
19
+ type: "string",
20
+ describe: "Run a named config from ~/.config/clabox/configs/<name>.config.mjs"
10
21
  }).command(["run [claudeArgs..]", "$0 [claudeArgs..]"], "Generate the profile and run claude inside the sandbox (default)", (y) => y.positional("claudeArgs", {
11
22
  describe: "Arguments passed through to claude",
12
23
  array: true,
13
24
  default: []
14
25
  }), async (argv) => {
15
- const { config, configFile } = await loadConfig(argv.config);
26
+ const { config, configFile } = await loadConfig(explicitConfig(argv));
16
27
  const code = runClaude(config, argv.claudeArgs ?? [], { configFile });
17
28
  process.exit(code);
18
- }).command("generate", "Build the sandbox profile only and print its path", {}, async (argv) => {
19
- const { config } = await loadConfig(argv.config);
29
+ }).command("generate", "Build the sandbox profile only and print its path", (y) => y, async (argv) => {
30
+ const { config } = await loadConfig(explicitConfig(argv));
20
31
  console.log(generateProfile(config));
21
- }).command("profile", "Print the sandbox profile path (no build)", {}, () => {
22
- console.log(profilePath());
23
- }).example("$0 run --dangerously-skip-permissions", "YOLO mode inside the sandbox").example("$0 --config ./my.clabox.mjs run", "Use a specific JS config file").example("CLAUDE_CONFIG_DIR=~/.claude_work $0 run", "Use a different Claude profile").epilogue([
32
+ }).command("profile", "Print the sandbox profile path (no build)", (y) => y, async (argv) => {
33
+ const { config } = await loadConfig(explicitConfig(argv));
34
+ console.log(profilePath(resolveProjectDir(config)));
35
+ }).command("init", "Generate clabox-<name> shell aliases and build Ghostty apps for `app` boxes", (y) => y.option("dir", {
36
+ type: "string",
37
+ describe: "Base dir holding configs/ and scripts/ (default: ./__)"
38
+ }).option("apps", {
39
+ type: "boolean",
40
+ default: true,
41
+ describe: "Build Ghostty apps for `app` boxes (use --no-apps to skip)"
42
+ }).option("app", {
43
+ type: "string",
44
+ describe: "Build only this app box (by box name or app display name)"
45
+ }), async (argv) => {
46
+ const { profiles, indexFile, written, apps, raycastCommands, warnings } = await runInit({
47
+ baseDir: argv.dir,
48
+ buildApps: argv.apps,
49
+ only: argv.app ?? null
50
+ });
51
+ console.log(`clabox init: ${profiles.length} profile(s) → ${profiles.join(", ")}`);
52
+ for (const f of written) console.log(` ${path.basename(f)}`);
53
+ for (const a of apps) console.log(` 📦 ${a.appPath} (${a.signed})`);
54
+ for (const r of raycastCommands) console.log(` 🚀 ${r}`);
55
+ for (const w of warnings) console.warn(` ⚠️ ${w}`);
56
+ console.log(`\nAdd to ~/.zshrc: source ${indexFile}`);
57
+ if (raycastCommands.length > 0) console.log(`Add to Raycast (Script Commands dir): ${path.dirname(raycastCommands[0])}`);
58
+ }).example("$0 run --dangerously-skip-permissions", "YOLO mode inside the sandbox").example("$0 -b ax-root", "Run the ~/.config/clabox/configs/ax-root.config.mjs box").example("$0 init", "Generate shell aliases from __/configs/*.config.mjs").example("$0 --config ./my.clabox.mjs run", "Use a specific JS config file").example("CLAUDE_CONFIG_DIR=~/.claude_work $0 run", "Use a different Claude profile").epilogue([
24
59
  "Config (later wins): defaults -> env vars -> JS config file.",
25
60
  "File: ./clabox.config.mjs or ~/.config/clabox/config.mjs",
26
- "(or --config /path, or CLABOX_CONFIG=/path)."
61
+ "(or --config /path, or CLABOX_CONFIG=/path).",
62
+ "Named boxes: -b <name> -> ~/.config/clabox/configs/<name>.config.mjs",
63
+ "(dir overridable via CLABOX_CONFIGS_DIR)."
27
64
  ].join("\n")).version(false).help().alias("h", "help").fail((msg, err) => {
28
65
  console.error(`Error: ${err?.message ?? msg}`);
29
66
  process.exit(1);
package/lib/cli.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"cli.js","names":[],"sources":["../src/cli.ts"],"sourcesContent":["#!/usr/bin/env node\n// clabox — run Claude Code in a sandbox for super-safe YOLO mode.\n// SPDX-License-Identifier: MIT\n//\n// Configure in plain JS: clabox.config.mjs (CWD) or\n// ~/.config/clabox/config.mjs. See clabox.config.example.mjs.\n\nimport yargs from 'yargs';\nimport { hideBin } from 'yargs/helpers';\nimport { generateProfile, profilePath, runClaude } from './sandbox/run.js';\nimport { loadConfig } from './utils/config.js';\n\nawait yargs(hideBin(process.argv))\n .scriptName('clabox')\n // Keep unknown flags (e.g. --dangerously-skip-permissions) as positionals so\n // they pass straight through to claude instead of erroring out.\n .parserConfiguration({ 'unknown-options-as-args': true })\n // clabox-owned flag: a config-file path that wins over CLABOX_CONFIG.\n .option('config', {\n type: 'string',\n describe: 'Path to a JS config file (overrides CLABOX_CONFIG)',\n })\n .command(\n ['run [claudeArgs..]', '$0 [claudeArgs..]'],\n 'Generate the profile and run claude inside the sandbox (default)',\n (y) =>\n y.positional('claudeArgs', {\n describe: 'Arguments passed through to claude',\n array: true,\n default: [] as string[],\n }),\n async (argv) => {\n const { config, configFile } = await loadConfig(argv.config as string | undefined);\n const claudeArgs = (argv.claudeArgs ?? []) as string[];\n const code = runClaude(config, claudeArgs, { configFile });\n process.exit(code);\n },\n )\n .command('generate', 'Build the sandbox profile only and print its path', {}, async (argv) => {\n const { config } = await loadConfig(argv.config as string | undefined);\n console.log(generateProfile(config));\n })\n .command('profile', 'Print the sandbox profile path (no build)', {}, () => {\n console.log(profilePath());\n })\n .example('$0 run --dangerously-skip-permissions', 'YOLO mode inside the sandbox')\n .example('$0 --config ./my.clabox.mjs run', 'Use a specific JS config file')\n .example('CLAUDE_CONFIG_DIR=~/.claude_work $0 run', 'Use a different Claude profile')\n .epilogue(\n [\n 'Config (later wins): defaults -> env vars -> JS config file.',\n 'File: ./clabox.config.mjs or ~/.config/clabox/config.mjs',\n '(or --config /path, or CLABOX_CONFIG=/path).',\n ].join('\\n'),\n )\n .version(false)\n .help()\n .alias('h', 'help')\n .fail((msg, err) => {\n console.error(`Error: ${err?.message ?? msg}`);\n process.exit(1);\n })\n .parseAsync();\n"],"mappings":";;;;;;AAYA,MAAM,MAAM,QAAQ,QAAQ,IAAI,CAAC,CAAC,CAC/B,WAAW,QAAQ,CAAC,CAGpB,oBAAoB,EAAE,2BAA2B,KAAK,CAAC,CAAC,CAExD,OAAO,UAAU;CAChB,MAAM;CACN,UAAU;AACZ,CAAC,CAAC,CACD,QACC,CAAC,sBAAsB,mBAAmB,GAC1C,qEACC,MACC,EAAE,WAAW,cAAc;CACzB,UAAU;CACV,OAAO;CACP,SAAS,CAAC;AACZ,CAAC,GACH,OAAO,SAAS;CACd,MAAM,EAAE,QAAQ,eAAe,MAAM,WAAW,KAAK,MAA4B;CAEjF,MAAM,OAAO,UAAU,QADH,KAAK,cAAc,CAAC,GACG,EAAE,WAAW,CAAC;CACzD,QAAQ,KAAK,IAAI;AACnB,CACF,CAAC,CACA,QAAQ,YAAY,qDAAqD,CAAC,GAAG,OAAO,SAAS;CAC5F,MAAM,EAAE,WAAW,MAAM,WAAW,KAAK,MAA4B;CACrE,QAAQ,IAAI,gBAAgB,MAAM,CAAC;AACrC,CAAC,CAAC,CACD,QAAQ,WAAW,6CAA6C,CAAC,SAAS;CACzE,QAAQ,IAAI,YAAY,CAAC;AAC3B,CAAC,CAAC,CACD,QAAQ,yCAAyC,8BAA8B,CAAC,CAChF,QAAQ,mCAAmC,+BAA+B,CAAC,CAC3E,QAAQ,2CAA2C,gCAAgC,CAAC,CACpF,SACC;CACE;CACA;CACA;AACF,CAAC,CAAC,KAAK,IAAI,CACb,CAAC,CACA,QAAQ,KAAK,CAAC,CACd,KAAK,CAAC,CACN,MAAM,KAAK,MAAM,CAAC,CAClB,MAAM,KAAK,QAAQ;CAClB,QAAQ,MAAM,UAAU,KAAK,WAAW,KAAK;CAC7C,QAAQ,KAAK,CAAC;AAChB,CAAC,CAAC,CACD,WAAW"}
1
+ {"version":3,"file":"cli.js","names":[],"sources":["../src/cli.ts"],"sourcesContent":["#!/usr/bin/env node\n// clabox — run Claude Code in a sandbox for super-safe YOLO mode.\n// SPDX-License-Identifier: MIT\n//\n// Configure in plain JS: clabox.config.mjs (CWD) or\n// ~/.config/clabox/config.mjs. See clabox.config.example.mjs.\n\nimport path from 'node:path';\nimport yargs from 'yargs';\nimport { hideBin } from 'yargs/helpers';\nimport { runInit } from './init/scaffold.js';\nimport { generateProfile, profilePath, resolveProjectDir, runClaude } from './sandbox/run.js';\nimport { loadConfig, resolveBox } from './utils/config.js';\n\n/** Pick the explicit config path: a `--box <name>` wins over `--config <path>`. */\n// Index signature so any yargs argv (incl. commands with an empty builder)\n// is assignable — `box`/`config` are global options, present on every command.\nfunction explicitConfig(argv: {\n box?: unknown;\n config?: unknown;\n [k: string]: unknown;\n}): string | undefined {\n if (argv.box) return resolveBox(argv.box as string);\n return (argv.config as string | undefined) ?? undefined;\n}\n\nawait yargs(hideBin(process.argv))\n .scriptName('clabox')\n // Keep unknown flags (e.g. --dangerously-skip-permissions) as positionals so\n // they pass straight through to claude instead of erroring out.\n .parserConfiguration({ 'unknown-options-as-args': true })\n // clabox-owned flag: a config-file path that wins over CLABOX_CONFIG.\n .option('config', {\n type: 'string',\n describe: 'Path to a JS config file (overrides CLABOX_CONFIG)',\n })\n // clabox-owned flag: run a named config from the global configs dir.\n // (`-p` is left for claude's --print; `-c/-r/-d/-v` are claude flags too.)\n .option('box', {\n alias: 'b',\n type: 'string',\n describe: 'Run a named config from ~/.config/clabox/configs/<name>.config.mjs',\n })\n .command(\n ['run [claudeArgs..]', '$0 [claudeArgs..]'],\n 'Generate the profile and run claude inside the sandbox (default)',\n (y) =>\n y.positional('claudeArgs', {\n describe: 'Arguments passed through to claude',\n array: true,\n default: [] as string[],\n }),\n async (argv) => {\n const { config, configFile } = await loadConfig(explicitConfig(argv));\n const claudeArgs = (argv.claudeArgs ?? []) as string[];\n const code = runClaude(config, claudeArgs, { configFile });\n process.exit(code);\n },\n )\n .command(\n 'generate',\n 'Build the sandbox profile only and print its path',\n (y) => y,\n async (argv) => {\n const { config } = await loadConfig(explicitConfig(argv));\n console.log(generateProfile(config));\n },\n )\n .command(\n 'profile',\n 'Print the sandbox profile path (no build)',\n (y) => y,\n async (argv) => {\n const { config } = await loadConfig(explicitConfig(argv));\n console.log(profilePath(resolveProjectDir(config)));\n },\n )\n .command(\n 'init',\n 'Generate clabox-<name> shell aliases and build Ghostty apps for `app` boxes',\n (y) =>\n y\n .option('dir', {\n type: 'string',\n describe: 'Base dir holding configs/ and scripts/ (default: ./__)',\n })\n .option('apps', {\n type: 'boolean',\n default: true,\n describe: 'Build Ghostty apps for `app` boxes (use --no-apps to skip)',\n })\n .option('app', {\n type: 'string',\n describe: 'Build only this app box (by box name or app display name)',\n }),\n async (argv) => {\n const { profiles, indexFile, written, apps, raycastCommands, warnings } = await runInit({\n baseDir: argv.dir as string | undefined,\n buildApps: argv.apps as boolean,\n only: (argv.app as string | undefined) ?? null,\n });\n console.log(`clabox init: ${profiles.length} profile(s) → ${profiles.join(', ')}`);\n for (const f of written) console.log(` ${path.basename(f)}`);\n for (const a of apps) console.log(` 📦 ${a.appPath} (${a.signed})`);\n for (const r of raycastCommands) console.log(` 🚀 ${r}`);\n for (const w of warnings) console.warn(` ⚠️ ${w}`);\n console.log(`\\nAdd to ~/.zshrc: source ${indexFile}`);\n if (raycastCommands.length > 0) {\n console.log(`Add to Raycast (Script Commands dir): ${path.dirname(raycastCommands[0])}`);\n }\n },\n )\n .example('$0 run --dangerously-skip-permissions', 'YOLO mode inside the sandbox')\n .example('$0 -b ax-root', 'Run the ~/.config/clabox/configs/ax-root.config.mjs box')\n .example('$0 init', 'Generate shell aliases from __/configs/*.config.mjs')\n .example('$0 --config ./my.clabox.mjs run', 'Use a specific JS config file')\n .example('CLAUDE_CONFIG_DIR=~/.claude_work $0 run', 'Use a different Claude profile')\n .epilogue(\n [\n 'Config (later wins): defaults -> env vars -> JS config file.',\n 'File: ./clabox.config.mjs or ~/.config/clabox/config.mjs',\n '(or --config /path, or CLABOX_CONFIG=/path).',\n 'Named boxes: -b <name> -> ~/.config/clabox/configs/<name>.config.mjs',\n '(dir overridable via CLABOX_CONFIGS_DIR).',\n ].join('\\n'),\n )\n .version(false)\n .help()\n .alias('h', 'help')\n .fail((msg, err) => {\n console.error(`Error: ${err?.message ?? msg}`);\n process.exit(1);\n })\n .parseAsync();\n"],"mappings":";;;;;;;;;AAiBA,SAAS,eAAe,MAID;CACrB,IAAI,KAAK,KAAK,OAAO,WAAW,KAAK,GAAa;CAClD,OAAQ,KAAK,UAAiC,KAAA;AAChD;AAEA,MAAM,MAAM,QAAQ,QAAQ,IAAI,CAAC,CAAC,CAC/B,WAAW,QAAQ,CAAC,CAGpB,oBAAoB,EAAE,2BAA2B,KAAK,CAAC,CAAC,CAExD,OAAO,UAAU;CAChB,MAAM;CACN,UAAU;AACZ,CAAC,CAAC,CAGD,OAAO,OAAO;CACb,OAAO;CACP,MAAM;CACN,UAAU;AACZ,CAAC,CAAC,CACD,QACC,CAAC,sBAAsB,mBAAmB,GAC1C,qEACC,MACC,EAAE,WAAW,cAAc;CACzB,UAAU;CACV,OAAO;CACP,SAAS,CAAC;AACZ,CAAC,GACH,OAAO,SAAS;CACd,MAAM,EAAE,QAAQ,eAAe,MAAM,WAAW,eAAe,IAAI,CAAC;CAEpE,MAAM,OAAO,UAAU,QADH,KAAK,cAAc,CAAC,GACG,EAAE,WAAW,CAAC;CACzD,QAAQ,KAAK,IAAI;AACnB,CACF,CAAC,CACA,QACC,YACA,sDACC,MAAM,GACP,OAAO,SAAS;CACd,MAAM,EAAE,WAAW,MAAM,WAAW,eAAe,IAAI,CAAC;CACxD,QAAQ,IAAI,gBAAgB,MAAM,CAAC;AACrC,CACF,CAAC,CACA,QACC,WACA,8CACC,MAAM,GACP,OAAO,SAAS;CACd,MAAM,EAAE,WAAW,MAAM,WAAW,eAAe,IAAI,CAAC;CACxD,QAAQ,IAAI,YAAY,kBAAkB,MAAM,CAAC,CAAC;AACpD,CACF,CAAC,CACA,QACC,QACA,gFACC,MACC,EACG,OAAO,OAAO;CACb,MAAM;CACN,UAAU;AACZ,CAAC,CAAC,CACD,OAAO,QAAQ;CACd,MAAM;CACN,SAAS;CACT,UAAU;AACZ,CAAC,CAAC,CACD,OAAO,OAAO;CACb,MAAM;CACN,UAAU;AACZ,CAAC,GACL,OAAO,SAAS;CACd,MAAM,EAAE,UAAU,WAAW,SAAS,MAAM,iBAAiB,aAAa,MAAM,QAAQ;EACtF,SAAS,KAAK;EACd,WAAW,KAAK;EAChB,MAAO,KAAK,OAA8B;CAC5C,CAAC;CACD,QAAQ,IAAI,gBAAgB,SAAS,OAAO,gBAAgB,SAAS,KAAK,IAAI,GAAG;CACjF,KAAK,MAAM,KAAK,SAAS,QAAQ,IAAI,KAAK,KAAK,SAAS,CAAC,GAAG;CAC5D,KAAK,MAAM,KAAK,MAAM,QAAQ,IAAI,QAAQ,EAAE,QAAQ,IAAI,EAAE,OAAO,EAAE;CACnE,KAAK,MAAM,KAAK,iBAAiB,QAAQ,IAAI,QAAQ,GAAG;CACxD,KAAK,MAAM,KAAK,UAAU,QAAQ,KAAK,SAAS,GAAG;CACnD,QAAQ,IAAI,8BAA8B,WAAW;CACrD,IAAI,gBAAgB,SAAS,GAC3B,QAAQ,IAAI,0CAA0C,KAAK,QAAQ,gBAAgB,EAAE,GAAG;AAE5F,CACF,CAAC,CACA,QAAQ,yCAAyC,8BAA8B,CAAC,CAChF,QAAQ,iBAAiB,yDAAyD,CAAC,CACnF,QAAQ,WAAW,qDAAqD,CAAC,CACzE,QAAQ,mCAAmC,+BAA+B,CAAC,CAC3E,QAAQ,2CAA2C,gCAAgC,CAAC,CACpF,SACC;CACE;CACA;CACA;CACA;CACA;AACF,CAAC,CAAC,KAAK,IAAI,CACb,CAAC,CACA,QAAQ,KAAK,CAAC,CACd,KAAK,CAAC,CACN,MAAM,KAAK,MAAM,CAAC,CAClB,MAAM,KAAK,QAAQ;CAClB,QAAQ,MAAM,UAAU,KAAK,WAAW,KAAK;CAC7C,QAAQ,KAAK,CAAC;AAChB,CAAC,CAAC,CACD,WAAW"}
@@ -1,5 +1,5 @@
1
- import fs from "node:fs";
2
1
  import path from "node:path";
2
+ import fs from "node:fs";
3
3
  import os from "node:os";
4
4
  import { pathToFileURL } from "node:url";
5
5
  //#region src/utils/config.ts
@@ -14,6 +14,7 @@ function expandHome(p) {
14
14
  const env = process.env;
15
15
  /** Built-in defaults. Everything here is meant to be overridable. */
16
16
  const defaultConfig = {
17
+ cwd: env.CLABOX_CWD ?? null,
17
18
  claudeBin: env.CLABOX_CLAUDE_BIN ?? null,
18
19
  configDir: env.CLAUDE_CONFIG_DIR ?? "~/.claude",
19
20
  claudeArgs: ["--settings", "{\"includeCoAuthoredBy\": false}"],
@@ -22,6 +23,7 @@ const defaultConfig = {
22
23
  email: env.CLABOX_BOT_EMAIL ?? "bot@example.com",
23
24
  sshDir: env.CLABOX_BOT_SSH_DIR ?? "~/.ssh/claudebot"
24
25
  },
26
+ env: {},
25
27
  network: true,
26
28
  ulimitProcs: 1024,
27
29
  hooksDir: env.CLABOX_HOOKS_DIR ?? null,
@@ -45,7 +47,14 @@ const defaultConfig = {
45
47
  "kube",
46
48
  "docker",
47
49
  "config"
48
- ]
50
+ ],
51
+ appBuilder: {
52
+ ghosttyApp: env.CLABOX_GHOSTTY_APP ?? "/Applications/Ghostty.app",
53
+ appsDir: env.CLABOX_APPS_DIR ?? "~/Applications",
54
+ signId: env.CLABOX_SIGN_ID ?? null,
55
+ baseGhosttyConfig: env.CLABOX_GHOSTTY_BASE_CONFIG ?? null,
56
+ claboxBin: env.CLABOX_CLABOX_BIN ?? null
57
+ }
49
58
  };
50
59
  function isPlainObject(v) {
51
60
  return v != null && typeof v === "object" && !Array.isArray(v);
@@ -79,6 +88,49 @@ function findConfigFile(explicit) {
79
88
  ].find((c) => fs.existsSync(c)) ?? null;
80
89
  }
81
90
  /**
91
+ * Global directory holding named "box" configs (`<name>.config.mjs`), used by
92
+ * the `clabox --box <name>` / `-b` flag. Override with `CLABOX_CONFIGS_DIR`.
93
+ */
94
+ function configsDir() {
95
+ return expandHome(env.CLABOX_CONFIGS_DIR ?? "~/.config/clabox/configs");
96
+ }
97
+ const BOX_SUFFIXES = [".config.mjs", ".mjs"];
98
+ /** Candidate file paths for a box name, in resolution order. */
99
+ function boxCandidates(name, dir) {
100
+ return BOX_SUFFIXES.map((s) => path.join(dir, `${name}${s}`));
101
+ }
102
+ /** Named box configs (sorted, de-duplicated) available in {@link configsDir}. */
103
+ function listBoxes(dir = configsDir()) {
104
+ let entries;
105
+ try {
106
+ entries = fs.readdirSync(dir);
107
+ } catch {
108
+ return [];
109
+ }
110
+ const names = /* @__PURE__ */ new Set();
111
+ for (const f of entries) {
112
+ if (f.startsWith("_")) continue;
113
+ const suffix = BOX_SUFFIXES.find((s) => f.endsWith(s));
114
+ if (suffix) names.add(f.slice(0, -suffix.length));
115
+ }
116
+ return [...names].sort();
117
+ }
118
+ /**
119
+ * Resolve a box name to its config file in {@link configsDir}, preferring
120
+ * `<name>.config.mjs` over a bare `<name>.mjs`.
121
+ *
122
+ * @throws if no matching file exists (the message lists the available boxes).
123
+ */
124
+ function resolveBox(name, dir = configsDir()) {
125
+ if (!name.startsWith("_")) {
126
+ const found = boxCandidates(name, dir).find((c) => fs.existsSync(c));
127
+ if (found) return found;
128
+ }
129
+ const available = listBoxes(dir);
130
+ const hint = available.length ? `available: ${available.join(", ")}` : `none found in ${dir}`;
131
+ throw new Error(`clabox: box '${name}' not found in ${dir} (${hint})`);
132
+ }
133
+ /**
82
134
  * Build the effective config: defaults ⊕ env ⊕ config file.
83
135
  *
84
136
  * @param explicitConfig optional config-file path (e.g. from `--config`);
@@ -98,6 +150,6 @@ async function loadConfig(explicitConfig) {
98
150
  };
99
151
  }
100
152
  //#endregion
101
- export { loadConfig as a, findConfigFile as i, defaultConfig as n, mergeConfig as o, expandHome as r, HOME as t };
153
+ export { findConfigFile as a, mergeConfig as c, expandHome as i, resolveBox as l, configsDir as n, listBoxes as o, defaultConfig as r, loadConfig as s, HOME as t };
102
154
 
103
- //# sourceMappingURL=config-DXTNeUhH.js.map
155
+ //# sourceMappingURL=config-BQ44iVWT.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"config-BQ44iVWT.js","names":[],"sources":["../src/utils/config.ts"],"sourcesContent":["// Configuration: sane defaults, env overrides, and an optional JS config file.\n//\n// Resolution order (later wins):\n// 1. defaultConfig (below)\n// 2. env vars (CLAUDE_CONFIG_DIR, CLABOX_*, …)\n// 3. a JS config file (see loadConfig)\n//\n// A config file default-exports either a plain object (merged over the defaults)\n// or a function `(defaults) => config` for full programmatic control.\n\nimport fs from 'node:fs';\nimport os from 'node:os';\nimport path from 'node:path';\nimport { pathToFileURL } from 'node:url';\n\nexport const HOME = os.homedir();\n\n/** Expand a leading `~` / `~/` to the user's home directory. */\nexport function expandHome(p: string): string {\n if (!p) return p;\n if (p === '~') return HOME;\n if (p.startsWith('~/')) return path.join(HOME, p.slice(2));\n return p;\n}\n\nconst env = process.env;\n\n/** Dedicated git/ssh identity for commits made from inside the sandbox. */\nexport interface BotConfig {\n name: string;\n email: string;\n /** If `${sshDir}/id_ed25519` exists, git ssh is pinned to it. */\n sshDir: string;\n}\n\n/**\n * Opt-in marker that turns a box into a standalone Ghostty app. When a box\n * config carries an `app`, `clabox init` generates a Ghostty config for it and\n * builds a cloned `<appsDir>/<name>.app` that launches `clabox -b <box>`.\n */\nexport interface AppConfig {\n /** App display name → `<appsDir>/<name>.app` + CFBundleName. */\n name: string;\n /** Ghostty window title. Defaults to {@link AppConfig.name}. */\n title?: string;\n /** Emoji for the generated Raycast command. Default: the title's leading emoji. */\n emoji?: string;\n /** Path to a `.icns`/`.png` icon for the .app. `.png` is converted. `~` ok. */\n icon?: string;\n /** Ghostty built-in `macos-icon` (e.g. `retro`, `holographic`). */\n macosIcon?: string;\n /** Extra raw `key = value` lines appended to the generated Ghostty config. */\n ghostty?: Record<string, string>;\n /** Bundle id. Default: `com.ghostty.custom.<name dot-joined>`. */\n bundleId?: string;\n}\n\n/** Machine-wide settings for the `clabox init` Ghostty-app builder. */\nexport interface AppBuilderConfig {\n /** Donor app to clone. `~` is expanded. */\n ghosttyApp: string;\n /** Where built apps land. `~` is expanded. */\n appsDir: string;\n /** codesign identity. null → ad-hoc (`codesign -s -`). */\n signId: string | null;\n /** Optional base Ghostty config emitted as a leading `config-file = …`. */\n baseGhosttyConfig: string | null;\n /** `clabox` binary baked into the generated `command`. null → autodetect. */\n claboxBin: string | null;\n}\n\n/** Extra rules layered on top of the built-in base profile. */\nexport interface PathRules {\n /** RW subpaths (beyond project dir + configDir + /tmp). */\n readWrite: string[];\n /** RO subpaths. */\n readOnly: string[];\n /** process-exec subpaths. */\n exec: string[];\n /** explicit deny subpaths (read + write). */\n deny: string[];\n}\n\n/** Effective clabox configuration. */\nexport interface Config {\n /**\n * Working directory to run `claude` in (and grant RW as the project dir).\n * null → the shell's CWD. Handy for named boxes that always target one\n * project regardless of where `clabox` is invoked from. `~` is expanded.\n */\n cwd: string | null;\n /** Path to the `claude` binary. null → autodetect (PATH, then ~/.local/bin). */\n claudeBin: string | null;\n /** Claude config/profile directory — supports multiple accounts. */\n configDir: string;\n /** Extra args always passed to `claude`, before any args from the CLI. */\n claudeArgs: string[];\n bot: BotConfig;\n /**\n * Extra environment variables forced onto the sandboxed `claude` process,\n * layered over the inherited shell env and after the built-in hardening vars\n * (so a key set here wins). Use it to pass secrets like `GITHUB_TOKEN`.\n */\n env: Record<string, string>;\n /** Allow outbound network. `false` → no `(allow network*)` line. */\n network: boolean;\n /** Cap the process table inside the sandbox (fork-bomb guard). 0 → skip. */\n ulimitProcs: number;\n /** Extra directory granted read + execute inside the sandbox. null → disabled. */\n hooksDir: string | null;\n paths: PathRules;\n /** Home subdirectories denied entirely (read + write). */\n denyHome: string[];\n /** Dotfile config dirs under $HOME denied entirely. */\n denyDotConfigs: string[];\n /**\n * Opt-in: build a standalone Ghostty app for this box during `clabox init`.\n * Absent → the box only gets a shell alias (the default).\n */\n app?: AppConfig;\n /** Machine-wide settings for the `clabox init` Ghostty-app builder. */\n appBuilder: AppBuilderConfig;\n}\n\n/** Built-in defaults. Everything here is meant to be overridable. */\nexport const defaultConfig: Config = {\n cwd: env.CLABOX_CWD ?? null,\n claudeBin: env.CLABOX_CLAUDE_BIN ?? null,\n configDir: env.CLAUDE_CONFIG_DIR ?? '~/.claude',\n claudeArgs: ['--settings', '{\"includeCoAuthoredBy\": false}'],\n bot: {\n name: env.CLABOX_BOT_NAME ?? 'claudeBOT',\n email: env.CLABOX_BOT_EMAIL ?? 'bot@example.com',\n sshDir: env.CLABOX_BOT_SSH_DIR ?? '~/.ssh/claudebot',\n },\n env: {},\n network: true,\n ulimitProcs: 1024,\n hooksDir: env.CLABOX_HOOKS_DIR ?? null,\n paths: {\n readWrite: [],\n readOnly: [],\n exec: [],\n deny: [],\n },\n denyHome: ['Documents', 'Desktop', 'Downloads', 'Pictures', 'Movies', 'Music'],\n // `.config/git` is always carved back out for git RO config in the profile.\n denyDotConfigs: ['aws', 'gnupg', 'kube', 'docker', 'config'],\n // `app` is opt-in per box, so there's no default — it stays undefined.\n appBuilder: {\n ghosttyApp: env.CLABOX_GHOSTTY_APP ?? '/Applications/Ghostty.app',\n appsDir: env.CLABOX_APPS_DIR ?? '~/Applications',\n signId: env.CLABOX_SIGN_ID ?? null,\n baseGhosttyConfig: env.CLABOX_GHOSTTY_BASE_CONFIG ?? null,\n claboxBin: env.CLABOX_CLABOX_BIN ?? null,\n },\n};\n\ntype Plain = Record<string, unknown>;\n\nfunction isPlainObject(v: unknown): v is Plain {\n return v != null && typeof v === 'object' && !Array.isArray(v);\n}\n\n/** Shallow-deep merge: nested plain objects merge, everything else replaces. */\nfunction deepMerge(base: Plain, override: Plain): Plain {\n const out: Plain = { ...base };\n for (const [key, val] of Object.entries(override)) {\n if (val === undefined) continue;\n const baseVal = base[key];\n out[key] = isPlainObject(val) && isPlainObject(baseVal) ? deepMerge(baseVal, val) : val;\n }\n return out;\n}\n\n/** Merge a (partial) override over a full config, returning a new config. */\nexport function mergeConfig(base: Config, override: unknown): Config {\n if (!isPlainObject(override)) return base;\n return deepMerge(base as unknown as Plain, override) as unknown as Config;\n}\n\n/**\n * Locate a config file: explicit (CLI arg, then `CLABOX_CONFIG` env),\n * then CWD, then ~/.config. The CLI arg wins over the env var.\n */\nexport function findConfigFile(explicit?: string | null): string | null {\n const chosen = explicit ?? env.CLABOX_CONFIG;\n if (chosen) return expandHome(chosen);\n const candidates = [\n path.join(process.cwd(), 'clabox.config.mjs'),\n path.join(process.cwd(), 'clabox.config.js'),\n path.join(HOME, '.config', 'clabox', 'config.mjs'),\n ];\n return candidates.find((c) => fs.existsSync(c)) ?? null;\n}\n\n/**\n * Global directory holding named \"box\" configs (`<name>.config.mjs`), used by\n * the `clabox --box <name>` / `-b` flag. Override with `CLABOX_CONFIGS_DIR`.\n */\nexport function configsDir(): string {\n return expandHome(env.CLABOX_CONFIGS_DIR ?? '~/.config/clabox/configs');\n}\n\nconst BOX_SUFFIXES = ['.config.mjs', '.mjs'];\n\n/** Candidate file paths for a box name, in resolution order. */\nfunction boxCandidates(name: string, dir: string): string[] {\n return BOX_SUFFIXES.map((s) => path.join(dir, `${name}${s}`));\n}\n\n/** Named box configs (sorted, de-duplicated) available in {@link configsDir}. */\nexport function listBoxes(dir: string = configsDir()): string[] {\n let entries: string[];\n try {\n entries = fs.readdirSync(dir);\n } catch {\n return [];\n }\n const names = new Set<string>();\n for (const f of entries) {\n // `_`-prefixed files are shared partials (e.g. `_presets.mjs`), not boxes.\n if (f.startsWith('_')) continue;\n const suffix = BOX_SUFFIXES.find((s) => f.endsWith(s));\n if (suffix) names.add(f.slice(0, -suffix.length));\n }\n return [...names].sort();\n}\n\n/**\n * Resolve a box name to its config file in {@link configsDir}, preferring\n * `<name>.config.mjs` over a bare `<name>.mjs`.\n *\n * @throws if no matching file exists (the message lists the available boxes).\n */\nexport function resolveBox(name: string, dir: string = configsDir()): string {\n // `_`-prefixed files are shared partials (e.g. `_presets.mjs`), not boxes —\n // keep them un-resolvable so `-b` matches what `listBoxes` advertises.\n if (!name.startsWith('_')) {\n const found = boxCandidates(name, dir).find((c) => fs.existsSync(c));\n if (found) return found;\n }\n const available = listBoxes(dir);\n const hint = available.length ? `available: ${available.join(', ')}` : `none found in ${dir}`;\n throw new Error(`clabox: box '${name}' not found in ${dir} (${hint})`);\n}\n\n/** Result of {@link loadConfig}: the effective config and the file it came from. */\nexport interface LoadedConfig {\n config: Config;\n configFile: string | null;\n}\n\n/**\n * Build the effective config: defaults ⊕ env ⊕ config file.\n *\n * @param explicitConfig optional config-file path (e.g. from `--config`);\n * takes precedence over `CLABOX_CONFIG` and the default lookup locations.\n */\nexport async function loadConfig(explicitConfig?: string | null): Promise<LoadedConfig> {\n let cfg: Config = defaultConfig;\n const file = findConfigFile(explicitConfig);\n if (file) {\n const mod = await import(pathToFileURL(file).href);\n const exported = mod.default ?? mod.config ?? mod;\n const resolved = typeof exported === 'function' ? await exported(defaultConfig) : exported;\n cfg = mergeConfig(defaultConfig, resolved);\n }\n return { config: cfg, configFile: file };\n}\n"],"mappings":"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"}
@@ -0,0 +1,134 @@
1
+ //#region src/utils/config.d.ts
2
+ declare const HOME: string;
3
+ /** Expand a leading `~` / `~/` to the user's home directory. */
4
+ declare function expandHome(p: string): string;
5
+ /** Dedicated git/ssh identity for commits made from inside the sandbox. */
6
+ interface BotConfig {
7
+ name: string;
8
+ email: string;
9
+ /** If `${sshDir}/id_ed25519` exists, git ssh is pinned to it. */
10
+ sshDir: string;
11
+ }
12
+ /**
13
+ * Opt-in marker that turns a box into a standalone Ghostty app. When a box
14
+ * config carries an `app`, `clabox init` generates a Ghostty config for it and
15
+ * builds a cloned `<appsDir>/<name>.app` that launches `clabox -b <box>`.
16
+ */
17
+ interface AppConfig {
18
+ /** App display name → `<appsDir>/<name>.app` + CFBundleName. */
19
+ name: string;
20
+ /** Ghostty window title. Defaults to {@link AppConfig.name}. */
21
+ title?: string;
22
+ /** Emoji for the generated Raycast command. Default: the title's leading emoji. */
23
+ emoji?: string;
24
+ /** Path to a `.icns`/`.png` icon for the .app. `.png` is converted. `~` ok. */
25
+ icon?: string;
26
+ /** Ghostty built-in `macos-icon` (e.g. `retro`, `holographic`). */
27
+ macosIcon?: string;
28
+ /** Extra raw `key = value` lines appended to the generated Ghostty config. */
29
+ ghostty?: Record<string, string>;
30
+ /** Bundle id. Default: `com.ghostty.custom.<name dot-joined>`. */
31
+ bundleId?: string;
32
+ }
33
+ /** Machine-wide settings for the `clabox init` Ghostty-app builder. */
34
+ interface AppBuilderConfig {
35
+ /** Donor app to clone. `~` is expanded. */
36
+ ghosttyApp: string;
37
+ /** Where built apps land. `~` is expanded. */
38
+ appsDir: string;
39
+ /** codesign identity. null → ad-hoc (`codesign -s -`). */
40
+ signId: string | null;
41
+ /** Optional base Ghostty config emitted as a leading `config-file = …`. */
42
+ baseGhosttyConfig: string | null;
43
+ /** `clabox` binary baked into the generated `command`. null → autodetect. */
44
+ claboxBin: string | null;
45
+ }
46
+ /** Extra rules layered on top of the built-in base profile. */
47
+ interface PathRules {
48
+ /** RW subpaths (beyond project dir + configDir + /tmp). */
49
+ readWrite: string[];
50
+ /** RO subpaths. */
51
+ readOnly: string[];
52
+ /** process-exec subpaths. */
53
+ exec: string[];
54
+ /** explicit deny subpaths (read + write). */
55
+ deny: string[];
56
+ }
57
+ /** Effective clabox configuration. */
58
+ interface Config {
59
+ /**
60
+ * Working directory to run `claude` in (and grant RW as the project dir).
61
+ * null → the shell's CWD. Handy for named boxes that always target one
62
+ * project regardless of where `clabox` is invoked from. `~` is expanded.
63
+ */
64
+ cwd: string | null;
65
+ /** Path to the `claude` binary. null → autodetect (PATH, then ~/.local/bin). */
66
+ claudeBin: string | null;
67
+ /** Claude config/profile directory — supports multiple accounts. */
68
+ configDir: string;
69
+ /** Extra args always passed to `claude`, before any args from the CLI. */
70
+ claudeArgs: string[];
71
+ bot: BotConfig;
72
+ /**
73
+ * Extra environment variables forced onto the sandboxed `claude` process,
74
+ * layered over the inherited shell env and after the built-in hardening vars
75
+ * (so a key set here wins). Use it to pass secrets like `GITHUB_TOKEN`.
76
+ */
77
+ env: Record<string, string>;
78
+ /** Allow outbound network. `false` → no `(allow network*)` line. */
79
+ network: boolean;
80
+ /** Cap the process table inside the sandbox (fork-bomb guard). 0 → skip. */
81
+ ulimitProcs: number;
82
+ /** Extra directory granted read + execute inside the sandbox. null → disabled. */
83
+ hooksDir: string | null;
84
+ paths: PathRules;
85
+ /** Home subdirectories denied entirely (read + write). */
86
+ denyHome: string[];
87
+ /** Dotfile config dirs under $HOME denied entirely. */
88
+ denyDotConfigs: string[];
89
+ /**
90
+ * Opt-in: build a standalone Ghostty app for this box during `clabox init`.
91
+ * Absent → the box only gets a shell alias (the default).
92
+ */
93
+ app?: AppConfig;
94
+ /** Machine-wide settings for the `clabox init` Ghostty-app builder. */
95
+ appBuilder: AppBuilderConfig;
96
+ }
97
+ /** Built-in defaults. Everything here is meant to be overridable. */
98
+ declare const defaultConfig: Config;
99
+ /** Merge a (partial) override over a full config, returning a new config. */
100
+ declare function mergeConfig(base: Config, override: unknown): Config;
101
+ /**
102
+ * Locate a config file: explicit (CLI arg, then `CLABOX_CONFIG` env),
103
+ * then CWD, then ~/.config. The CLI arg wins over the env var.
104
+ */
105
+ declare function findConfigFile(explicit?: string | null): string | null;
106
+ /**
107
+ * Global directory holding named "box" configs (`<name>.config.mjs`), used by
108
+ * the `clabox --box <name>` / `-b` flag. Override with `CLABOX_CONFIGS_DIR`.
109
+ */
110
+ declare function configsDir(): string;
111
+ /** Named box configs (sorted, de-duplicated) available in {@link configsDir}. */
112
+ declare function listBoxes(dir?: string): string[];
113
+ /**
114
+ * Resolve a box name to its config file in {@link configsDir}, preferring
115
+ * `<name>.config.mjs` over a bare `<name>.mjs`.
116
+ *
117
+ * @throws if no matching file exists (the message lists the available boxes).
118
+ */
119
+ declare function resolveBox(name: string, dir?: string): string;
120
+ /** Result of {@link loadConfig}: the effective config and the file it came from. */
121
+ interface LoadedConfig {
122
+ config: Config;
123
+ configFile: string | null;
124
+ }
125
+ /**
126
+ * Build the effective config: defaults ⊕ env ⊕ config file.
127
+ *
128
+ * @param explicitConfig optional config-file path (e.g. from `--config`);
129
+ * takes precedence over `CLABOX_CONFIG` and the default lookup locations.
130
+ */
131
+ declare function loadConfig(explicitConfig?: string | null): Promise<LoadedConfig>;
132
+ //#endregion
133
+ export { HOME as a, configsDir as c, findConfigFile as d, listBoxes as f, resolveBox as h, Config as i, defaultConfig as l, mergeConfig as m, AppConfig as n, LoadedConfig as o, loadConfig as p, BotConfig as r, PathRules as s, AppBuilderConfig as t, expandHome as u };
134
+ //# sourceMappingURL=config-DQWueb4a.d.ts.map
@@ -0,0 +1,74 @@
1
+ import path from "node:path";
2
+ //#region src/init/ghostty.ts
3
+ /** The `command = bash -c '…'` line that boots clabox for the box. */
4
+ function buildCommand(opts) {
5
+ return `command = bash -c '${`${opts.projectDir ? `cd ${opts.projectDir} && ` : ""}CLABOX_CONFIGS_DIR=${opts.configsDir} ${opts.claboxBin} -b ${opts.boxName}; exec zsh`}'`;
6
+ }
7
+ /** Build the Ghostty config text for an app box. */
8
+ function buildGhosttyConfig(opts) {
9
+ const { app } = opts;
10
+ const lines = ["# Generated by `clabox init` — do not edit; rerun it after changing the box config."];
11
+ if (opts.baseGhosttyConfig) lines.push(`config-file = ${opts.baseGhosttyConfig}`);
12
+ lines.push("", `title = "${app.title ?? app.name}"`);
13
+ if (app.macosIcon) lines.push(`macos-icon = ${app.macosIcon}`);
14
+ if (app.ghostty && Object.keys(app.ghostty).length > 0) {
15
+ lines.push("");
16
+ for (const [key, value] of Object.entries(app.ghostty)) lines.push(`${key} = ${value}`);
17
+ }
18
+ lines.push("", buildCommand(opts));
19
+ return `${lines.join("\n")}\n`;
20
+ }
21
+ /** Escape a string for embedding as a C double-quoted literal. */
22
+ function cEscape(s) {
23
+ return s.replace(/\\/g, "\\\\").replace(/"/g, "\\\"");
24
+ }
25
+ /**
26
+ * Build the C launcher source. It finds itself, locates `ghostty.real` next to
27
+ * it, and re-execs it with `--config-file=<configPath>` prepended — so the clone
28
+ * always boots with its own config regardless of how it's launched.
29
+ */
30
+ function buildLauncherSource(configPath) {
31
+ return `// Generated by clabox init. Launches ghostty.real with a baked config.
32
+ #include <stdio.h>
33
+ #include <unistd.h>
34
+ #include <stdlib.h>
35
+ #include <libgen.h>
36
+ #include <mach-o/dyld.h>
37
+
38
+ static const char *CONFIG_PATH = "${cEscape(configPath)}";
39
+
40
+ int main(int argc, char *argv[]) {
41
+ char path[4096];
42
+ uint32_t size = sizeof(path);
43
+ _NSGetExecutablePath(path, &size);
44
+
45
+ char *dir = dirname(path);
46
+ char real_path[4096];
47
+ snprintf(real_path, sizeof(real_path), "%s/ghostty.real", dir);
48
+
49
+ char config_arg[4096];
50
+ snprintf(config_arg, sizeof(config_arg), "--config-file=%s", CONFIG_PATH);
51
+
52
+ char **new_argv = malloc(sizeof(char *) * (argc + 2));
53
+ new_argv[0] = real_path;
54
+ new_argv[1] = config_arg;
55
+ for (int i = 1; i < argc; i++) new_argv[i + 1] = argv[i];
56
+ new_argv[argc + 1] = NULL;
57
+
58
+ execv(real_path, new_argv);
59
+ return 1;
60
+ }
61
+ `;
62
+ }
63
+ /** Absolute path to the built `.app` bundle. */
64
+ function appBundlePath(appsDir, app) {
65
+ return path.join(appsDir, `${app.name}.app`);
66
+ }
67
+ /** Bundle identifier for the clone (explicit, or derived from the box name). */
68
+ function bundleId(boxName, app) {
69
+ return app.bundleId ?? `com.ghostty.custom.${boxName.replace(/-/g, ".")}`;
70
+ }
71
+ //#endregion
72
+ export { bundleId as a, buildLauncherSource as i, buildCommand as n, buildGhosttyConfig as r, appBundlePath as t };
73
+
74
+ //# sourceMappingURL=ghostty-Ca0g9P9P.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ghostty-Ca0g9P9P.js","names":[],"sources":["../src/init/ghostty.ts"],"sourcesContent":["// Pure builders for the Ghostty-app artifacts emitted by `clabox init`.\n//\n// For a box that opts in via `app` (see AppConfig), `init` generates a Ghostty\n// config whose `command` launches `clabox -b <box>`, then clones Ghostty.app\n// with a tiny C launcher that bakes in `--config-file=<that config>`. Everything\n// here is text-only (no I/O) so it can be unit-tested without macOS; the actual\n// build lives in init/app.ts.\n\nimport path from 'node:path';\nimport type { AppConfig } from '../utils/config.js';\n\n/** Inputs for {@link buildGhosttyConfig} (all paths already absolute). */\nexport interface GhosttyConfigOptions {\n app: AppConfig;\n /** The `-b` box name this config launches. */\n boxName: string;\n /** Absolute project dir to `cd` into. null → don't `cd` (run in launch cwd). */\n projectDir: string | null;\n /** Absolute `CLABOX_CONFIGS_DIR` so `-b` resolves the box from any cwd. */\n configsDir: string;\n /** Absolute path to the `clabox` binary. */\n claboxBin: string;\n /** Absolute path to a base Ghostty config, emitted as a leading `config-file`. */\n baseGhosttyConfig?: string | null;\n}\n\n/** The `command = bash -c '…'` line that boots clabox for the box. */\nexport function buildCommand(opts: GhosttyConfigOptions): string {\n const cd = opts.projectDir ? `cd ${opts.projectDir} && ` : '';\n const inner = `${cd}CLABOX_CONFIGS_DIR=${opts.configsDir} ${opts.claboxBin} -b ${opts.boxName}; exec zsh`;\n return `command = bash -c '${inner}'`;\n}\n\n/** Build the Ghostty config text for an app box. */\nexport function buildGhosttyConfig(opts: GhosttyConfigOptions): string {\n const { app } = opts;\n const lines: string[] = [\n '# Generated by `clabox init` — do not edit; rerun it after changing the box config.',\n ];\n if (opts.baseGhosttyConfig) lines.push(`config-file = ${opts.baseGhosttyConfig}`);\n lines.push('', `title = \"${app.title ?? app.name}\"`);\n if (app.macosIcon) lines.push(`macos-icon = ${app.macosIcon}`);\n if (app.ghostty && Object.keys(app.ghostty).length > 0) {\n lines.push('');\n for (const [key, value] of Object.entries(app.ghostty)) lines.push(`${key} = ${value}`);\n }\n lines.push('', buildCommand(opts));\n return `${lines.join('\\n')}\\n`;\n}\n\n/** Escape a string for embedding as a C double-quoted literal. */\nfunction cEscape(s: string): string {\n return s.replace(/\\\\/g, '\\\\\\\\').replace(/\"/g, '\\\\\"');\n}\n\n/**\n * Build the C launcher source. It finds itself, locates `ghostty.real` next to\n * it, and re-execs it with `--config-file=<configPath>` prepended — so the clone\n * always boots with its own config regardless of how it's launched.\n */\nexport function buildLauncherSource(configPath: string): string {\n return `// Generated by clabox init. Launches ghostty.real with a baked config.\n#include <stdio.h>\n#include <unistd.h>\n#include <stdlib.h>\n#include <libgen.h>\n#include <mach-o/dyld.h>\n\nstatic const char *CONFIG_PATH = \"${cEscape(configPath)}\";\n\nint main(int argc, char *argv[]) {\n char path[4096];\n uint32_t size = sizeof(path);\n _NSGetExecutablePath(path, &size);\n\n char *dir = dirname(path);\n char real_path[4096];\n snprintf(real_path, sizeof(real_path), \"%s/ghostty.real\", dir);\n\n char config_arg[4096];\n snprintf(config_arg, sizeof(config_arg), \"--config-file=%s\", CONFIG_PATH);\n\n char **new_argv = malloc(sizeof(char *) * (argc + 2));\n new_argv[0] = real_path;\n new_argv[1] = config_arg;\n for (int i = 1; i < argc; i++) new_argv[i + 1] = argv[i];\n new_argv[argc + 1] = NULL;\n\n execv(real_path, new_argv);\n return 1;\n}\n`;\n}\n\n/** Absolute path to the built `.app` bundle. */\nexport function appBundlePath(appsDir: string, app: AppConfig): string {\n return path.join(appsDir, `${app.name}.app`);\n}\n\n/** Bundle identifier for the clone (explicit, or derived from the box name). */\nexport function bundleId(boxName: string, app: AppConfig): string {\n return app.bundleId ?? `com.ghostty.custom.${boxName.replace(/-/g, '.')}`;\n}\n"],"mappings":";;;AA2BA,SAAgB,aAAa,MAAoC;CAG/D,OAAO,sBAAsB,GAFlB,KAAK,aAAa,MAAM,KAAK,WAAW,QAAQ,GACvC,qBAAqB,KAAK,WAAW,GAAG,KAAK,UAAU,MAAM,KAAK,QAAQ,YAC3D;AACrC;;AAGA,SAAgB,mBAAmB,MAAoC;CACrE,MAAM,EAAE,QAAQ;CAChB,MAAM,QAAkB,CACtB,qFACF;CACA,IAAI,KAAK,mBAAmB,MAAM,KAAK,iBAAiB,KAAK,mBAAmB;CAChF,MAAM,KAAK,IAAI,YAAY,IAAI,SAAS,IAAI,KAAK,EAAE;CACnD,IAAI,IAAI,WAAW,MAAM,KAAK,gBAAgB,IAAI,WAAW;CAC7D,IAAI,IAAI,WAAW,OAAO,KAAK,IAAI,OAAO,CAAC,CAAC,SAAS,GAAG;EACtD,MAAM,KAAK,EAAE;EACb,KAAK,MAAM,CAAC,KAAK,UAAU,OAAO,QAAQ,IAAI,OAAO,GAAG,MAAM,KAAK,GAAG,IAAI,KAAK,OAAO;CACxF;CACA,MAAM,KAAK,IAAI,aAAa,IAAI,CAAC;CACjC,OAAO,GAAG,MAAM,KAAK,IAAI,EAAE;AAC7B;;AAGA,SAAS,QAAQ,GAAmB;CAClC,OAAO,EAAE,QAAQ,OAAO,MAAM,CAAC,CAAC,QAAQ,MAAM,MAAK;AACrD;;;;;;AAOA,SAAgB,oBAAoB,YAA4B;CAC9D,OAAO;;;;;;;oCAO2B,QAAQ,UAAU,EAAE;;;;;;;;;;;;;;;;;;;;;;;;AAwBxD;;AAGA,SAAgB,cAAc,SAAiB,KAAwB;CACrE,OAAO,KAAK,KAAK,SAAS,GAAG,IAAI,KAAK,KAAK;AAC7C;;AAGA,SAAgB,SAAS,SAAiB,KAAwB;CAChE,OAAO,IAAI,YAAY,sBAAsB,QAAQ,QAAQ,MAAM,GAAG;AACxE"}
@@ -0,0 +1,34 @@
1
+ import { n as AppConfig } from "./config-DQWueb4a.js";
2
+
3
+ //#region src/init/ghostty.d.ts
4
+ /** Inputs for {@link buildGhosttyConfig} (all paths already absolute). */
5
+ interface GhosttyConfigOptions {
6
+ app: AppConfig;
7
+ /** The `-b` box name this config launches. */
8
+ boxName: string;
9
+ /** Absolute project dir to `cd` into. null → don't `cd` (run in launch cwd). */
10
+ projectDir: string | null;
11
+ /** Absolute `CLABOX_CONFIGS_DIR` so `-b` resolves the box from any cwd. */
12
+ configsDir: string;
13
+ /** Absolute path to the `clabox` binary. */
14
+ claboxBin: string;
15
+ /** Absolute path to a base Ghostty config, emitted as a leading `config-file`. */
16
+ baseGhosttyConfig?: string | null;
17
+ }
18
+ /** The `command = bash -c '…'` line that boots clabox for the box. */
19
+ declare function buildCommand(opts: GhosttyConfigOptions): string;
20
+ /** Build the Ghostty config text for an app box. */
21
+ declare function buildGhosttyConfig(opts: GhosttyConfigOptions): string;
22
+ /**
23
+ * Build the C launcher source. It finds itself, locates `ghostty.real` next to
24
+ * it, and re-execs it with `--config-file=<configPath>` prepended — so the clone
25
+ * always boots with its own config regardless of how it's launched.
26
+ */
27
+ declare function buildLauncherSource(configPath: string): string;
28
+ /** Absolute path to the built `.app` bundle. */
29
+ declare function appBundlePath(appsDir: string, app: AppConfig): string;
30
+ /** Bundle identifier for the clone (explicit, or derived from the box name). */
31
+ declare function bundleId(boxName: string, app: AppConfig): string;
32
+ //#endregion
33
+ export { buildLauncherSource as a, buildGhosttyConfig as i, appBundlePath as n, bundleId as o, buildCommand as r, GhosttyConfigOptions as t };
34
+ //# sourceMappingURL=ghostty-DemKkfqf.d.ts.map
package/lib/index.d.ts CHANGED
@@ -1,4 +1,9 @@
1
- import { a as PathRules, c as findConfigFile, i as LoadedConfig, l as loadConfig, n as Config, o as defaultConfig, r as HOME, s as expandHome, t as BotConfig, u as mergeConfig } from "./config-CUyriGxm.js";
2
- import { a as ipcName, c as regex, i as globalName, l as subpath, n as buildProfile, o as literal, r as detectPackagePaths, s as reEscape, t as ProfileContext } from "./profile-Bw6L1MiV.js";
3
- import { i as runClaude, n as generateProfile, r as profilePath, t as RunOptions } from "./run-BfF3Cwg7.js";
4
- export { type BotConfig, type Config, HOME, type LoadedConfig, type PathRules, type ProfileContext, type RunOptions, buildProfile, defaultConfig, detectPackagePaths, expandHome, findConfigFile, generateProfile, globalName, ipcName, literal, loadConfig, mergeConfig, profilePath, reEscape, regex, runClaude, subpath };
1
+ import { a as buildIndex, i as buildAliasFiles, n as InitFile, o as buildWrapper, r as aliasName, t as AliasPaths } from "./aliases-DXyz-ufw.js";
2
+ import { a as HOME, c as configsDir, d as findConfigFile, f as listBoxes, h as resolveBox, i as Config, l as defaultConfig, m as mergeConfig, n as AppConfig, o as LoadedConfig, p as loadConfig, r as BotConfig, s as PathRules, t as AppBuilderConfig, u as expandHome } from "./config-DQWueb4a.js";
3
+ import { i as canBuildApps, n as BuildAppResult, r as buildApp, t as BuildAppOptions } from "./app-CpuMtOoj.js";
4
+ import { a as buildLauncherSource, i as buildGhosttyConfig, n as appBundlePath, o as bundleId, r as buildCommand, t as GhosttyConfigOptions } from "./ghostty-DemKkfqf.js";
5
+ import { n as buildRaycastCommand, r as raycastIcon, t as RaycastCommandOptions } from "./raycast-DM7c559f.js";
6
+ import { a as runInit, i as discoverProfiles, n as InitOptions, r as InitResult, t as BuiltApp } from "./scaffold-ByIbYAeS.js";
7
+ import { a as ipcName, c as regex, i as globalName, l as subpath, n as buildProfile, o as literal, r as detectPackagePaths, s as reEscape, t as ProfileContext } from "./profile-BeM41NXc.js";
8
+ import { a as resolveProjectDir, i as profilePath, o as runClaude, r as generateProfile, t as RunOptions } from "./run-Cx8cuTh5.js";
9
+ export { type AliasPaths, type AppBuilderConfig, type AppConfig, type BotConfig, type BuildAppOptions, type BuildAppResult, type BuiltApp, type Config, type GhosttyConfigOptions, HOME, type InitFile, type InitOptions, type InitResult, type LoadedConfig, type PathRules, type ProfileContext, type RaycastCommandOptions, type RunOptions, aliasName, appBundlePath, buildAliasFiles, buildApp, buildCommand, buildGhosttyConfig, buildIndex, buildLauncherSource, buildProfile, buildRaycastCommand, buildWrapper, bundleId, canBuildApps, configsDir, defaultConfig, detectPackagePaths, discoverProfiles, expandHome, findConfigFile, generateProfile, globalName, ipcName, listBoxes, literal, loadConfig, mergeConfig, profilePath, raycastIcon, reEscape, regex, resolveBox, resolveProjectDir, runClaude, runInit, subpath };
package/lib/index.js CHANGED
@@ -1,4 +1,9 @@
1
- import { a as loadConfig, i as findConfigFile, n as defaultConfig, o as mergeConfig, r as expandHome, t as HOME } from "./config-DXTNeUhH.js";
2
- import { a as literal, c as subpath, i as ipcName, n as detectPackagePaths, o as reEscape, r as globalName, s as regex, t as buildProfile } from "./profile-CxqsgezL.js";
3
- import { n as profilePath, r as runClaude, t as generateProfile } from "./run-Dyp_hW97.js";
4
- export { HOME, buildProfile, defaultConfig, detectPackagePaths, expandHome, findConfigFile, generateProfile, globalName, ipcName, literal, loadConfig, mergeConfig, profilePath, reEscape, regex, runClaude, subpath };
1
+ import { a as findConfigFile, c as mergeConfig, i as expandHome, l as resolveBox, n as configsDir, o as listBoxes, r as defaultConfig, s as loadConfig, t as HOME } from "./config-BQ44iVWT.js";
2
+ import { i as buildWrapper, n as buildAliasFiles, r as buildIndex, t as aliasName } from "./aliases-DKGcMHHe.js";
3
+ import { a as bundleId, i as buildLauncherSource, n as buildCommand, r as buildGhosttyConfig, t as appBundlePath } from "./ghostty-Ca0g9P9P.js";
4
+ import { n as canBuildApps, t as buildApp } from "./app-CieBa29D.js";
5
+ import { n as raycastIcon, t as buildRaycastCommand } from "./raycast-BCdO2Se1.js";
6
+ import { n as runInit, t as discoverProfiles } from "./scaffold-CRzC5KYe.js";
7
+ import { a as literal, c as subpath, i as ipcName, n as detectPackagePaths, o as reEscape, r as globalName, s as regex, t as buildProfile } from "./profile-DM6NAgb-.js";
8
+ import { a as runClaude, i as resolveProjectDir, n as generateProfile, r as profilePath } from "./run-CNehSQ-S.js";
9
+ export { HOME, aliasName, appBundlePath, buildAliasFiles, buildApp, buildCommand, buildGhosttyConfig, buildIndex, buildLauncherSource, buildProfile, buildRaycastCommand, buildWrapper, bundleId, canBuildApps, configsDir, defaultConfig, detectPackagePaths, discoverProfiles, expandHome, findConfigFile, generateProfile, globalName, ipcName, listBoxes, literal, loadConfig, mergeConfig, profilePath, raycastIcon, reEscape, regex, resolveBox, resolveProjectDir, runClaude, runInit, subpath };
@@ -0,0 +1,2 @@
1
+ import { a as buildIndex, i as buildAliasFiles, n as InitFile, o as buildWrapper, r as aliasName, t as AliasPaths } from "../aliases-DXyz-ufw.js";
2
+ export { AliasPaths, InitFile, aliasName, buildAliasFiles, buildIndex, buildWrapper };
@@ -0,0 +1,2 @@
1
+ import { i as buildWrapper, n as buildAliasFiles, r as buildIndex, t as aliasName } from "../aliases-DKGcMHHe.js";
2
+ export { aliasName, buildAliasFiles, buildIndex, buildWrapper };
@@ -0,0 +1,2 @@
1
+ import { i as canBuildApps, n as BuildAppResult, r as buildApp, t as BuildAppOptions } from "../app-CpuMtOoj.js";
2
+ export { BuildAppOptions, BuildAppResult, buildApp, canBuildApps };
@@ -0,0 +1,2 @@
1
+ import { n as canBuildApps, t as buildApp } from "../app-CieBa29D.js";
2
+ export { buildApp, canBuildApps };
@@ -0,0 +1,2 @@
1
+ import { a as buildLauncherSource, i as buildGhosttyConfig, n as appBundlePath, o as bundleId, r as buildCommand, t as GhosttyConfigOptions } from "../ghostty-DemKkfqf.js";
2
+ export { GhosttyConfigOptions, appBundlePath, buildCommand, buildGhosttyConfig, buildLauncherSource, bundleId };
@@ -0,0 +1,2 @@
1
+ import { a as bundleId, i as buildLauncherSource, n as buildCommand, r as buildGhosttyConfig, t as appBundlePath } from "../ghostty-Ca0g9P9P.js";
2
+ export { appBundlePath, buildCommand, buildGhosttyConfig, buildLauncherSource, bundleId };
@@ -0,0 +1,2 @@
1
+ import { n as buildRaycastCommand, r as raycastIcon, t as RaycastCommandOptions } from "../raycast-DM7c559f.js";
2
+ export { RaycastCommandOptions, buildRaycastCommand, raycastIcon };
@@ -0,0 +1,2 @@
1
+ import { n as raycastIcon, t as buildRaycastCommand } from "../raycast-BCdO2Se1.js";
2
+ export { buildRaycastCommand, raycastIcon };
@@ -0,0 +1,2 @@
1
+ import { a as runInit, i as discoverProfiles, n as InitOptions, r as InitResult, t as BuiltApp } from "../scaffold-ByIbYAeS.js";
2
+ export { BuiltApp, InitOptions, InitResult, discoverProfiles, runInit };
@@ -0,0 +1,2 @@
1
+ import { n as runInit, t as discoverProfiles } from "../scaffold-CRzC5KYe.js";
2
+ export { discoverProfiles, runInit };
@@ -1,4 +1,4 @@
1
- import { n as Config } from "./config-CUyriGxm.js";
1
+ import { i as Config } from "./config-DQWueb4a.js";
2
2
 
3
3
  //#region src/sandbox/profile.d.ts
4
4
  declare const subpath: (p: string) => string;
@@ -26,4 +26,4 @@ declare function buildProfile(config: Config, {
26
26
  }: ProfileContext): string;
27
27
  //#endregion
28
28
  export { ipcName as a, regex as c, globalName as i, subpath as l, buildProfile as n, literal as o, detectPackagePaths as r, reEscape as s, ProfileContext as t };
29
- //# sourceMappingURL=profile-Bw6L1MiV.d.ts.map
29
+ //# sourceMappingURL=profile-BeM41NXc.d.ts.map