@candor.sh/cli 0.1.0 → 0.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/dist/index.cjs +37 -33
  2. package/package.json +1 -1
package/dist/index.cjs CHANGED
@@ -4513,7 +4513,7 @@ function getConfigPath() {
4513
4513
  }
4514
4514
 
4515
4515
  // src/skill-content.ts
4516
- var SKILL_CONTENT = '# Candor \u2014 AI-Moderated User Studies\n\nCandor lets you create and manage AI-moderated user studies directly from the terminal. An AI voice agent interviews real participants while they use your product, then delivers prioritized findings.\n\n## Available Commands\n\nRun these via the Bash tool. Always use `--json` for machine-readable output.\n\n- `candor create-study --url <url> --goal "<goal>" [--participants N] --json` \u2014 Create a study\n- `candor studies --json` \u2014 List all studies\n- `candor status <study-id> --json` \u2014 Check participant progress\n- `candor findings <study-id> --json` \u2014 Get prioritized feedback (P0\u2013P3)\n- `candor approve <study-id> --json` \u2014 Approve recruitment (human-in-the-loop gate)\n\n## Workflow\n\n### Creating a Study\n\n1. **Infer context** \u2014 If the user doesn\'t provide a URL, check:\n - `package.json` `homepage` field\n - README for a deployed URL\n - Ask the user if nothing is found\n2. **Run `candor create-study`** with the product URL and goal\n3. **Show the study summary** including:\n - Drafted study script (sections, questions, tasks)\n - Participant count and demographic filters\n - Estimated cost per session\n4. **Wait for explicit approval** \u2014 Do NOT run `candor approve` without the user saying "yes", "approve", "go ahead", or similar\n5. **On approval**, run `candor approve <study-id>` to begin recruiting\n\n### Checking Results\n\n- Use `candor status <id> --json` to show completion progress\n- Use `candor findings <id> --json` to show prioritized findings\n- Offer to create GitHub issues for P0/P1 items if the user wants\n\n## Important Rules\n\n- NEVER approve a study without explicit human confirmation\n- ALWAYS show cost estimate before approval\n- Studies are billed per participant session (~$14.50/session)\n- If Candor is not initialized, tell the user to run `candor init` first\n';
4516
+ var SKILL_CONTENT = '# Candor \u2014 AI-Moderated User Studies\n\nCandor lets you create and manage AI-moderated user studies directly from the terminal. An AI voice agent interviews real participants while they use your product, then delivers prioritized findings.\n\n## Available Commands\n\nRun these via the Bash tool. Always use `--json` for machine-readable output.\n\n- `candor study create --url <url> --goal "<goal>" [--participants N] --json` \u2014 Create a study\n- `candor study list --json` \u2014 List all studies (or `candor study --json`)\n- `candor study status <study-id> --json` \u2014 Check participant progress\n- `candor study findings <study-id> --json` \u2014 Get prioritized feedback (P0\u2013P3)\n- `candor study approve <study-id> --json` \u2014 Approve recruitment (human-in-the-loop gate)\n\n## Workflow\n\n### Creating a Study\n\n1. **Infer context** \u2014 If the user doesn\'t provide a URL, check:\n - `package.json` `homepage` field\n - README for a deployed URL\n - Ask the user if nothing is found\n2. **Run `candor study create`** with the product URL and goal\n3. **Show the study summary** including:\n - Drafted study script (sections, questions, tasks)\n - Participant count and demographic filters\n - Estimated cost per session\n4. **Wait for explicit approval** \u2014 Do NOT run `candor study approve` without the user saying "yes", "approve", "go ahead", or similar\n5. **On approval**, run `candor study approve <study-id>` to begin recruiting\n\n### Checking Results\n\n- Use `candor study status <id> --json` to show completion progress\n- Use `candor study findings <id> --json` to show prioritized findings\n- Offer to create GitHub issues for P0/P1 items if the user wants\n\n## Important Rules\n\n- NEVER approve a study without explicit human confirmation\n- ALWAYS show cost estimate before approval\n- Studies are billed per participant session (~$14.50/session)\n- If Candor is not initialized, tell the user to run `candor init` first\n';
4517
4517
 
4518
4518
  // src/commands/init.ts
4519
4519
  var CLAUDE_SKILLS_DIR = (0, import_path2.join)((0, import_os2.homedir)(), ".claude", "skills", "candor");
@@ -4742,13 +4742,13 @@ async function studiesCommand(options) {
4742
4742
  console.log();
4743
4743
  console.log(chalk2.bold("Your Studies"));
4744
4744
  console.log();
4745
- for (const study of studies) {
4746
- const statusColor = study.status === "completed" ? chalk2.green : study.status === "active" ? chalk2.cyan : chalk2.dim;
4745
+ for (const study2 of studies) {
4746
+ const statusColor = study2.status === "completed" ? chalk2.green : study2.status === "active" ? chalk2.cyan : chalk2.dim;
4747
4747
  console.log(
4748
- ` ${chalk2.bold(study.name)} ${statusColor(`[${study.status}]`)} ${chalk2.dim(`id:${study.id}`)}`
4748
+ ` ${chalk2.bold(study2.name)} ${statusColor(`[${study2.status}]`)} ${chalk2.dim(`id:${study2.id}`)}`
4749
4749
  );
4750
4750
  console.log(
4751
- chalk2.dim(` ${study.targetProductUrl} | ${study.targetParticipants} participants`)
4751
+ chalk2.dim(` ${study2.targetProductUrl} | ${study2.targetParticipants} participants`)
4752
4752
  );
4753
4753
  }
4754
4754
  console.log();
@@ -4769,10 +4769,10 @@ async function studyCommand(id, options) {
4769
4769
  console.log(JSON.stringify(data, null, 2));
4770
4770
  return;
4771
4771
  }
4772
- const { study, findings } = data;
4772
+ const { study: study2, findings } = data;
4773
4773
  console.log();
4774
- console.log(chalk2.bold(study.name));
4775
- console.log(chalk2.dim(`Status: ${study.status} | URL: ${study.targetProductUrl}`));
4774
+ console.log(chalk2.bold(study2.name));
4775
+ console.log(chalk2.dim(`Status: ${study2.status} | URL: ${study2.targetProductUrl}`));
4776
4776
  console.log();
4777
4777
  if (!findings || findings.length === 0) {
4778
4778
  console.log(chalk2.dim("No findings yet."));
@@ -4819,17 +4819,17 @@ async function createStudyCommand(options) {
4819
4819
  console.log(JSON.stringify(data, null, 2));
4820
4820
  return;
4821
4821
  }
4822
- const { study } = data;
4822
+ const { study: study2 } = data;
4823
4823
  console.log();
4824
- console.log(chalk2.green(` + Study created: ${study.id}`));
4825
- console.log(chalk2.bold(` ${study.name}`));
4826
- console.log(chalk2.dim(` URL: ${study.targetProductUrl} | Participants: ${study.targetParticipants}`));
4827
- if (study.estimatedCostCents) {
4828
- console.log(chalk2.dim(` Estimated cost: $${(study.estimatedCostCents / 100).toFixed(2)}`));
4824
+ console.log(chalk2.green(` + Study created: ${study2.id}`));
4825
+ console.log(chalk2.bold(` ${study2.name}`));
4826
+ console.log(chalk2.dim(` URL: ${study2.targetProductUrl} | Participants: ${study2.targetParticipants}`));
4827
+ if (study2.estimatedCostCents) {
4828
+ console.log(chalk2.dim(` Estimated cost: $${(study2.estimatedCostCents / 100).toFixed(2)}`));
4829
4829
  }
4830
- console.log(chalk2.dim(` Status: ${study.status}`));
4830
+ console.log(chalk2.dim(` Status: ${study2.status}`));
4831
4831
  console.log();
4832
- console.log(chalk2.dim(` To approve: candor approve ${study.id}`));
4832
+ console.log(chalk2.dim(` To approve: candor study approve ${study2.id}`));
4833
4833
  console.log();
4834
4834
  } catch (err) {
4835
4835
  if (options.json) {
@@ -4850,9 +4850,9 @@ async function approveCommand(id, options) {
4850
4850
  console.log(JSON.stringify(data, null, 2));
4851
4851
  return;
4852
4852
  }
4853
- const { study } = data;
4853
+ const { study: study2 } = data;
4854
4854
  console.log();
4855
- console.log(chalk2.green(` + Study ${study.id} approved \u2014 now ${study.status}`));
4855
+ console.log(chalk2.green(` + Study ${study2.id} approved \u2014 now ${study2.status}`));
4856
4856
  console.log();
4857
4857
  } catch (err) {
4858
4858
  if (options.json) {
@@ -4913,13 +4913,13 @@ async function statusCommand(id, options) {
4913
4913
  console.log(JSON.stringify(data, null, 2));
4914
4914
  return;
4915
4915
  }
4916
- const { study } = data;
4916
+ const { study: study2 } = data;
4917
4917
  console.log();
4918
- console.log(chalk2.bold(study.name));
4919
- console.log(chalk2.dim(`Status: ${study.status} | URL: ${study.targetProductUrl}`));
4920
- console.log(chalk2.dim(`Participants: ${study.targetParticipants}`));
4921
- if (study.completedSessions !== void 0) {
4922
- console.log(chalk2.dim(`Completed: ${study.completedSessions} | Pending: ${study.pendingSessions ?? 0}`));
4918
+ console.log(chalk2.bold(study2.name));
4919
+ console.log(chalk2.dim(`Status: ${study2.status} | URL: ${study2.targetProductUrl}`));
4920
+ console.log(chalk2.dim(`Participants: ${study2.targetParticipants}`));
4921
+ if (study2.completedSessions !== void 0) {
4922
+ console.log(chalk2.dim(`Completed: ${study2.completedSessions} | Pending: ${study2.pendingSessions ?? 0}`));
4923
4923
  }
4924
4924
  console.log();
4925
4925
  } catch (err) {
@@ -4970,27 +4970,31 @@ async function updateCommand() {
4970
4970
  }
4971
4971
  }
4972
4972
  function getCurrentVersion() {
4973
+ if ("0.2.1") {
4974
+ return "0.2.1";
4975
+ }
4973
4976
  try {
4974
4977
  const pkgPath = (0, import_path4.join)((0, import_path4.dirname)(new URL(import_meta2.url).pathname), "..", "package.json");
4975
4978
  const pkg = JSON.parse((0, import_fs4.readFileSync)(pkgPath, "utf-8"));
4976
4979
  return pkg.version;
4977
4980
  } catch {
4978
- return "0.1.0";
4981
+ return "unknown";
4979
4982
  }
4980
4983
  }
4981
4984
 
4982
4985
  // src/index.ts
4983
4986
  var program2 = new Command();
4984
- program2.name("candor").description("AI-moderated user studies, wired into your dev workflow").version("0.1.0");
4987
+ program2.name("candor").description("AI-moderated user studies, wired into your dev workflow").version("0.2.1");
4985
4988
  program2.command("init").description("Set up Candor: authenticate and configure Claude Code integration").option("--skill-only", "Only reinstall the skill file").action(initCommand);
4986
4989
  program2.command("login").description("Re-authenticate with Candor").action(loginCommand);
4987
4990
  program2.command("logout").description("Log out and clear stored credentials").action(logoutCommand);
4988
- program2.command("doctor").description("Run diagnostic checks on your Candor installation").action(doctorCommand);
4989
- program2.command("studies").description("List all studies and their status").option("--json", "Output as JSON").action(studiesCommand);
4990
- program2.command("study <id>").description("View results and findings for a study").option("--json", "Output as JSON").action(studyCommand);
4991
- program2.command("create-study").description("Create a new AI-moderated user study").requiredOption("--url <url>", "Product URL to test").requiredOption("--goal <goal>", "What you want to learn").option("--participants <n>", "Number of participants", "5").option("--json", "Output as JSON").action(createStudyCommand);
4992
- program2.command("approve <id>").description("Approve a study to begin recruiting participants").option("--json", "Output as JSON").action(approveCommand);
4993
- program2.command("findings <id>").description("Get prioritized findings for a study").option("--json", "Output as JSON").action(findingsCommand);
4994
- program2.command("status <id>").description("Get current status of a study").option("--json", "Output as JSON").action(statusCommand);
4991
+ var study = program2.command("study").description("Create, view, and manage user studies").option("--json", "Output as JSON").action(studiesCommand);
4992
+ study.command("list").description("List all studies").option("--json", "Output as JSON").action(studiesCommand);
4993
+ study.command("show <id>").description("View study details and findings").option("--json", "Output as JSON").action(studyCommand);
4994
+ study.command("create").description("Create a new user study").requiredOption("--url <url>", "Product URL to test").requiredOption("--goal <goal>", "What you want to learn").option("--participants <n>", "Number of participants", "5").option("--json", "Output as JSON").action(createStudyCommand);
4995
+ study.command("status <id>").description("Check participant progress").option("--json", "Output as JSON").action(statusCommand);
4996
+ study.command("findings <id>").description("Get prioritized findings").option("--json", "Output as JSON").action(findingsCommand);
4997
+ study.command("approve <id>").description("Approve to begin recruiting").option("--json", "Output as JSON").action(approveCommand);
4995
4998
  program2.command("update").description("Update the Candor CLI to the latest version").action(updateCommand);
4999
+ program2.command("doctor", { hidden: true }).description("Run diagnostic checks on your Candor installation").action(doctorCommand);
4996
5000
  program2.parse();
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@candor.sh/cli",
3
- "version": "0.1.0",
3
+ "version": "0.2.1",
4
4
  "private": false,
5
5
  "type": "module",
6
6
  "bin": {