bitfab-cli 0.2.203 → 0.2.205

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 (3) hide show
  1. package/README.md +2 -0
  2. package/dist/index.js +36 -21
  3. package/package.json +1 -1
package/README.md CHANGED
@@ -9,6 +9,8 @@ npx bitfab-cli init # Detect editors, prompt if multiple
9
9
  npx bitfab-cli init --editor claude # Install for Claude Code
10
10
  npx bitfab-cli init --editor codex # Install for Codex
11
11
  npx bitfab-cli init --editor cursor # Install for Cursor
12
+ npx bitfab-cli init --prompt "instrument the chat workflow"
13
+ npx bitfab-cli setup --prompt "modify the billing trace"
12
14
  npx bitfab-cli session-logs enable # Enable session log collection
13
15
  npx bitfab-cli session-logs disable # Disable session log collection
14
16
  npx bitfab-cli session-logs status # Show the saved session log setting
package/dist/index.js CHANGED
@@ -31174,6 +31174,10 @@ function buildAnalyzeRepoCommand(base, opts = {}) {
31174
31174
  }
31175
31175
  return parts.join(" ");
31176
31176
  }
31177
+ function buildSetupCommand(base, prompt) {
31178
+ const trimmedPrompt = prompt?.trim();
31179
+ return trimmedPrompt ? `${base} ${trimmedPrompt}` : base;
31180
+ }
31177
31181
  function makeCliAuthCheck({
31178
31182
  cli,
31179
31183
  args,
@@ -31210,14 +31214,12 @@ function ensureCliAuthenticated(cfg) {
31210
31214
  throw new Error(result.message);
31211
31215
  }
31212
31216
  }
31213
- function cliSetup(cfg, skipPermissions) {
31217
+ function cliSetup(cfg, skipPermissions, prompt) {
31214
31218
  ensureCliAuthenticated(cfg);
31215
- p2.log.info(`Launching ${cfg.setupCommand}...
31219
+ const command = buildSetupCommand(cfg.setupCommand, prompt);
31220
+ p2.log.info(`Launching ${command}...
31216
31221
  `);
31217
- launchCli(cfg.cli, [
31218
- ...skipFlags(skipPermissions, cfg.skipFlag),
31219
- cfg.setupCommand
31220
- ]);
31222
+ launchCli(cfg.cli, [...skipFlags(skipPermissions, cfg.skipFlag), command]);
31221
31223
  }
31222
31224
  function cliAssistant(cfg, args, skipPermissions) {
31223
31225
  ensureCliAuthenticated(cfg);
@@ -32200,7 +32202,7 @@ var claudeAdapter = {
32200
32202
  label: "Claude Code",
32201
32203
  install: runClaudeInstall,
32202
32204
  ensureLatest: ensureLatestClaudePlugin,
32203
- setup: (skipPermissions) => cliSetup(config2, skipPermissions),
32205
+ setup: (skipPermissions, prompt) => cliSetup(config2, skipPermissions, prompt),
32204
32206
  analyzeRepo: runClaudeAnalyzeRepo,
32205
32207
  assistant: (args, skipPermissions) => cliAssistant(config2, args, skipPermissions),
32206
32208
  update: (args, skipPermissions) => cliUpdate(config2, args, skipPermissions)
@@ -32563,7 +32565,7 @@ var codexAdapter = {
32563
32565
  label: "Codex",
32564
32566
  install: runCodexInstall,
32565
32567
  ensureLatest: ensureLatestCodexPlugin,
32566
- setup: (skipPermissions) => cliSetup(config3, skipPermissions),
32568
+ setup: (skipPermissions, prompt) => cliSetup(config3, skipPermissions, prompt),
32567
32569
  analyzeRepo: runCodexAnalyzeRepo,
32568
32570
  assistant: (args, skipPermissions) => cliAssistant(config3, args, skipPermissions),
32569
32571
  update: (args, skipPermissions) => cliUpdate(config3, args, skipPermissions)
@@ -32630,12 +32632,13 @@ function runCursorInstall() {
32630
32632
  }
32631
32633
  function ensureLatestCursorPlugin() {
32632
32634
  }
32633
- function runCursorSetup(skipPermissions) {
32635
+ function runCursorSetup(skipPermissions, prompt) {
32634
32636
  ensureCursorAuthenticated();
32635
32637
  if (skipPermissions) {
32636
32638
  p5.log.warn("--skip-permissions is not supported for Cursor");
32637
32639
  }
32638
- p5.log.info(`To complete setup, run ${SETUP_COMMAND3} in Cursor.`);
32640
+ const command = buildSetupCommand(SETUP_COMMAND3, prompt);
32641
+ p5.log.info(`To complete setup, run ${command} in Cursor.`);
32639
32642
  }
32640
32643
  async function runCursorAnalyzeRepo(captureOverride, limit, prompt) {
32641
32644
  ensureCursorAuthenticated();
@@ -33088,7 +33091,7 @@ async function runSetup(opts) {
33088
33091
  const chosen = await resolveEditor(opts);
33089
33092
  ADAPTERS[chosen].ensureLatest();
33090
33093
  const skip = await resolveSkipPermissions(opts.skipPermissions);
33091
- ADAPTERS[chosen].setup(skip);
33094
+ ADAPTERS[chosen].setup(skip, opts.prompt);
33092
33095
  }
33093
33096
  async function runAssistant(opts, args) {
33094
33097
  const chosen = await resolveEditor(opts);
@@ -33114,7 +33117,7 @@ async function runInit(opts) {
33114
33117
  await runLoginCommand({ exitOnComplete: false });
33115
33118
  }
33116
33119
  const skip = await resolveSkipPermissions(opts.skipPermissions);
33117
- ADAPTERS[chosen].setup(skip);
33120
+ ADAPTERS[chosen].setup(skip, opts.prompt);
33118
33121
  const detected = detectInstalledEditors();
33119
33122
  const others = detected.filter((e) => e !== chosen);
33120
33123
  if (others.length > 0) {
@@ -33290,12 +33293,12 @@ function startUpdateCheck() {
33290
33293
  var GLOBAL_HELP_TEXT = `Usage: bitfab <command> [options]
33291
33294
 
33292
33295
  Commands:
33293
- init [--editor <name>] Full onboarding: plugin-install, login, and setup
33296
+ init [--editor <name>] [--prompt <text>] Full onboarding: plugin-install, login, and setup
33294
33297
  plugin-install [--editor <name>] Install the Bitfab plugin in one editor
33295
33298
  login [--force] Authenticate with Bitfab (opens browser)
33296
33299
  logout Remove stored credentials
33297
33300
  session-logs [status|enable|disable] Read or update session log collection
33298
- setup [--editor <name>] Launch /bitfab:setup in the editor
33301
+ setup [--editor <name>] [--prompt <text>] Launch /bitfab:setup in the editor
33299
33302
  analyze-repo [--editor <name>] [prompt] Headless scan: draft + upload trace plans (no prompts, no code edits)
33300
33303
  assistant [--editor <name>] [args] Launch /bitfab:assistant in the editor
33301
33304
  update [--editor <name>] [mode] Update plugin, then launch SDK update (mode: all|plugin|sdk)
@@ -33308,12 +33311,13 @@ Options:
33308
33311
  --upload-logs analyze-repo: upload the run's session logs to Bitfab (skips the prompt)
33309
33312
  --no-upload-logs analyze-repo: keep session logs local (skips the prompt)
33310
33313
  --limit <n> analyze-repo: cap how many draft trace plans to upload (default 5)
33311
- --prompt, -p <text> analyze-repo: free-text guidance steering what to focus on
33314
+ --prompt, -p <text> Initial prompt for init/setup, or guidance for analyze-repo
33312
33315
  --force login: re-authenticate and clear any stale Studio session first
33313
33316
 
33314
33317
  Examples:
33315
33318
  bitfab init Full setup (detect editor, install, login, setup)
33316
33319
  bitfab init --editor claude Full setup for Claude Code
33320
+ bitfab init --prompt "instrument the chat workflow"
33317
33321
  bitfab analyze-repo Scan the repo and upload draft trace plans (headless)
33318
33322
  bitfab analyze-repo --limit 3 Scan the repo and upload at most 3 draft trace plans
33319
33323
  bitfab analyze-repo "focus on billing" Scan with free-text guidance on what to prioritize
@@ -33322,21 +33326,24 @@ Examples:
33322
33326
  bitfab session-logs disable Disable session log collection
33323
33327
  bitfab assistant investigate Investigate traces
33324
33328
  bitfab setup --skip-permissions Setup without permission prompts
33329
+ bitfab setup --prompt "instrument the billing agent"
33325
33330
  bitfab assistant --skip-permissions Run assistant autonomously
33326
33331
  `;
33327
33332
  var COMMAND_HELP_TEXT = {
33328
- init: `Usage: bitfab init [--editor <name>] [--skip-permissions | --no-skip-permissions]
33333
+ init: `Usage: bitfab init [--editor <name>] [--prompt <text>] [--skip-permissions | --no-skip-permissions]
33329
33334
 
33330
33335
  Full onboarding: install the Bitfab plugin, authenticate with Bitfab, and launch setup in the selected editor.
33331
33336
 
33332
33337
  Options:
33333
33338
  --editor, -e <name> Target editor: claude, codex, cursor
33339
+ --prompt, -p <text> Initial prompt passed to the setup agent
33334
33340
  --skip-permissions Skip permission prompts when launching the setup agent
33335
33341
  --no-skip-permissions Keep permission prompts without being asked
33336
33342
 
33337
33343
  Examples:
33338
33344
  bitfab init
33339
33345
  bitfab init --editor claude
33346
+ bitfab init --prompt "instrument the chat workflow"
33340
33347
  bitfab init --editor codex --no-skip-permissions
33341
33348
  `,
33342
33349
  "plugin-install": `Usage: bitfab plugin-install [--editor <name>]
@@ -33387,18 +33394,20 @@ Examples:
33387
33394
  bitfab session-logs enable
33388
33395
  bitfab session-logs disable
33389
33396
  `,
33390
- setup: `Usage: bitfab setup [--editor <name>] [--skip-permissions | --no-skip-permissions]
33397
+ setup: `Usage: bitfab setup [--editor <name>] [--prompt <text>] [--skip-permissions | --no-skip-permissions]
33391
33398
 
33392
33399
  Launch the Bitfab setup command in the selected editor without reinstalling the plugin.
33393
33400
 
33394
33401
  Options:
33395
33402
  --editor, -e <name> Target editor: claude, codex, cursor
33403
+ --prompt, -p <text> Initial prompt passed to the setup agent
33396
33404
  --skip-permissions Skip permission prompts when launching the setup agent
33397
33405
  --no-skip-permissions Keep permission prompts without being asked
33398
33406
 
33399
33407
  Examples:
33400
33408
  bitfab setup
33401
33409
  bitfab setup --editor codex
33410
+ bitfab setup --prompt "instrument the billing agent"
33402
33411
  bitfab setup --skip-permissions
33403
33412
  `,
33404
33413
  "analyze-repo": `Usage: bitfab analyze-repo [--editor <name>] [--limit <n>] [--prompt <text>] [--upload-logs | --no-upload-logs] [prompt]
@@ -33519,12 +33528,18 @@ function wantsHelp(argv) {
33519
33528
  return getHelpTopic(argv) !== null;
33520
33529
  }
33521
33530
  var COMMAND_SPECS = {
33522
- init: { flags: ["editor", "skipPermissions"], unknownOption: "error" },
33531
+ init: {
33532
+ flags: ["editor", "skipPermissions", "prompt"],
33533
+ unknownOption: "error"
33534
+ },
33523
33535
  "plugin-install": { flags: ["editor"], unknownOption: "error" },
33524
33536
  login: { flags: ["force"], unknownOption: "error" },
33525
33537
  logout: { flags: [], unknownOption: "error" },
33526
33538
  "session-logs": { flags: [], unknownOption: "error" },
33527
- setup: { flags: ["editor", "skipPermissions"], unknownOption: "error" },
33539
+ setup: {
33540
+ flags: ["editor", "skipPermissions", "prompt"],
33541
+ unknownOption: "error"
33542
+ },
33528
33543
  "analyze-repo": {
33529
33544
  flags: ["editor", "uploadLogs", "limit", "prompt"],
33530
33545
  unknownOption: "error"
@@ -33679,7 +33694,7 @@ ${GLOBAL_HELP_TEXT}`
33679
33694
  } = parseArgs2(argv);
33680
33695
  const abortUpdateCheck = startUpdateCheck();
33681
33696
  if (command === "init") {
33682
- await runInit({ editor, skipPermissions });
33697
+ await runInit({ editor, skipPermissions, prompt });
33683
33698
  abortUpdateCheck();
33684
33699
  return;
33685
33700
  }
@@ -33704,7 +33719,7 @@ ${GLOBAL_HELP_TEXT}`
33704
33719
  return;
33705
33720
  }
33706
33721
  if (command === "setup") {
33707
- await runSetup({ editor, skipPermissions });
33722
+ await runSetup({ editor, skipPermissions, prompt });
33708
33723
  abortUpdateCheck();
33709
33724
  return;
33710
33725
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "bitfab-cli",
3
- "version": "0.2.203",
3
+ "version": "0.2.205",
4
4
  "description": "Install and configure the Bitfab plugin in Claude Code, Codex, or Cursor.",
5
5
  "type": "module",
6
6
  "main": "dist/index.js",