@rely-ai/caliber 0.5.3 → 0.7.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 (2) hide show
  1. package/dist/bin.js +24 -16
  2. package/package.json +1 -1
package/dist/bin.js CHANGED
@@ -1011,11 +1011,13 @@ var ClaudeCliProvider = class {
1011
1011
  }
1012
1012
  async call(options) {
1013
1013
  const combined = this.buildCombinedPrompt(options);
1014
- return this.runClaudePrint(combined);
1014
+ return this.runClaudePrint(combined, options.model);
1015
1015
  }
1016
1016
  async stream(options, callbacks) {
1017
1017
  const combined = this.buildCombinedPrompt(options);
1018
- const child = spawn2(CLAUDE_CLI_BIN, ["-p", combined], {
1018
+ const args = ["-p", combined];
1019
+ if (options.model) args.push("--model", options.model);
1020
+ const child = spawn2(CLAUDE_CLI_BIN, args, {
1019
1021
  cwd: process.cwd(),
1020
1022
  stdio: ["ignore", "pipe", "inherit"],
1021
1023
  env: process.env
@@ -1073,9 +1075,11 @@ ${msg.content}
1073
1075
  combined += "[[User]]\n" + options.prompt;
1074
1076
  return combined;
1075
1077
  }
1076
- runClaudePrint(combinedPrompt) {
1078
+ runClaudePrint(combinedPrompt, model) {
1077
1079
  return new Promise((resolve2, reject) => {
1078
- const child = spawn2(CLAUDE_CLI_BIN, ["-p", combinedPrompt], {
1080
+ const args = ["-p", combinedPrompt];
1081
+ if (model) args.push("--model", model);
1082
+ const child = spawn2(CLAUDE_CLI_BIN, args, {
1079
1083
  cwd: process.cwd(),
1080
1084
  stdio: ["ignore", "pipe", "inherit"],
1081
1085
  env: process.env
@@ -1494,9 +1498,11 @@ async function detectFrameworks(fileTree, fileContents) {
1494
1498
  parts.push(content);
1495
1499
  }
1496
1500
  }
1501
+ const fastModel = process.env.ANTHROPIC_SMALL_FAST_MODEL;
1497
1502
  const result = await llmJsonCall({
1498
1503
  system: FINGERPRINT_SYSTEM_PROMPT,
1499
- prompt: parts.join("\n")
1504
+ prompt: parts.join("\n"),
1505
+ ...fastModel ? { model: fastModel } : {}
1500
1506
  });
1501
1507
  return {
1502
1508
  languages: Array.isArray(result.languages) ? result.languages : [],
@@ -3796,7 +3802,9 @@ function displayScoreDelta(before, after) {
3796
3802
 
3797
3803
  // src/commands/init.ts
3798
3804
  async function initCommand(options) {
3799
- console.log(chalk4.bold.hex("#6366f1")(`
3805
+ const brand = chalk4.hex("#EB9D83");
3806
+ const title = chalk4.hex("#83D1EB");
3807
+ console.log(brand.bold(`
3800
3808
  \u2588\u2588\u2588\u2588\u2588\u2588\u2557 \u2588\u2588\u2588\u2588\u2588\u2557 \u2588\u2588\u2557 \u2588\u2588\u2557\u2588\u2588\u2588\u2588\u2588\u2588\u2557 \u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2557\u2588\u2588\u2588\u2588\u2588\u2588\u2557
3801
3809
  \u2588\u2588\u2554\u2550\u2550\u2550\u2550\u255D\u2588\u2588\u2554\u2550\u2550\u2588\u2588\u2557\u2588\u2588\u2551 \u2588\u2588\u2551\u2588\u2588\u2554\u2550\u2550\u2588\u2588\u2557\u2588\u2588\u2554\u2550\u2550\u2550\u2550\u255D\u2588\u2588\u2554\u2550\u2550\u2588\u2588\u2557
3802
3810
  \u2588\u2588\u2551 \u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2551\u2588\u2588\u2551 \u2588\u2588\u2551\u2588\u2588\u2588\u2588\u2588\u2588\u2554\u255D\u2588\u2588\u2588\u2588\u2588\u2557 \u2588\u2588\u2588\u2588\u2588\u2588\u2554\u255D
@@ -3805,17 +3813,17 @@ async function initCommand(options) {
3805
3813
  \u255A\u2550\u2550\u2550\u2550\u2550\u255D\u255A\u2550\u255D \u255A\u2550\u255D\u255A\u2550\u2550\u2550\u2550\u2550\u2550\u255D\u255A\u2550\u255D\u255A\u2550\u2550\u2550\u2550\u2550\u255D \u255A\u2550\u2550\u2550\u2550\u2550\u2550\u255D\u255A\u2550\u255D \u255A\u2550\u255D
3806
3814
  `));
3807
3815
  console.log(chalk4.dim(" Configure your coding agent environment\n"));
3808
- console.log(chalk4.bold(" What is Caliber?\n"));
3816
+ console.log(title.bold(" What is Caliber?\n"));
3809
3817
  console.log(chalk4.dim(" Caliber audits your AI agent configurations and suggests targeted"));
3810
3818
  console.log(chalk4.dim(" improvements. It analyzes CLAUDE.md, .cursorrules, and skills"));
3811
3819
  console.log(chalk4.dim(" against your actual codebase \u2014 keeping what works, fixing"));
3812
3820
  console.log(chalk4.dim(" what's stale, and adding what's missing.\n"));
3813
- console.log(chalk4.bold(" How it works:\n"));
3821
+ console.log(title.bold(" How it works:\n"));
3814
3822
  console.log(chalk4.dim(" 1. Scan Analyze your code, dependencies, and existing configs"));
3815
3823
  console.log(chalk4.dim(" 2. Generate AI creates or improves config files for your project"));
3816
3824
  console.log(chalk4.dim(" 3. Review You accept, refine, or decline the proposed changes"));
3817
3825
  console.log(chalk4.dim(" 4. Apply Config files are written with backups\n"));
3818
- console.log(chalk4.hex("#6366f1").bold(" Step 1/4 \u2014 How do you want to use Caliber?\n"));
3826
+ console.log(title.bold(" Step 1/4 \u2014 How do you want to use Caliber?\n"));
3819
3827
  let config = loadConfig();
3820
3828
  if (!config) {
3821
3829
  console.log(chalk4.dim(" No LLM provider set yet. Choose how to run Caliber:\n"));
@@ -3837,7 +3845,7 @@ async function initCommand(options) {
3837
3845
  const displayModel = config.model === "default" && config.provider === "claude-cli" ? process.env.ANTHROPIC_MODEL || "default (inherited from Claude Code)" : config.model;
3838
3846
  console.log(chalk4.dim(` Provider: ${config.provider} | Model: ${displayModel}
3839
3847
  `));
3840
- console.log(chalk4.hex("#6366f1").bold(" Step 2/4 \u2014 Scan project\n"));
3848
+ console.log(title.bold(" Step 2/4 \u2014 Scan project\n"));
3841
3849
  console.log(chalk4.dim(" Detecting languages, dependencies, file structure, and existing configs.\n"));
3842
3850
  const spinner = ora("Analyzing project...").start();
3843
3851
  const fingerprint = collectFingerprint(process.cwd());
@@ -3848,7 +3856,7 @@ async function initCommand(options) {
3848
3856
  `));
3849
3857
  const targetAgent = options.agent || await promptAgent();
3850
3858
  const baselineScore = computeLocalScore(process.cwd(), targetAgent);
3851
- console.log(chalk4.hex("#6366f1").bold(" Current project score\n"));
3859
+ console.log(title.bold(" Current project score\n"));
3852
3860
  displayScore(baselineScore);
3853
3861
  const hasExistingConfig = !!(fingerprint.existingConfigs.claudeMd || fingerprint.existingConfigs.claudeSettings || fingerprint.existingConfigs.claudeSkills?.length || fingerprint.existingConfigs.cursorrules || fingerprint.existingConfigs.cursorRules?.length);
3854
3862
  if (hasExistingConfig && baselineScore.score === 100) {
@@ -3868,7 +3876,7 @@ async function initCommand(options) {
3868
3876
  passingChecks = baselineScore.checks.filter((c) => c.passed).map((c) => ({ name: c.name }));
3869
3877
  currentScore = baselineScore.score;
3870
3878
  if (failingChecks.length > 0) {
3871
- console.log(chalk4.hex("#6366f1").bold(" Step 3/4 \u2014 Targeted fixes\n"));
3879
+ console.log(title.bold(" Step 3/4 \u2014 Targeted fixes\n"));
3872
3880
  console.log(chalk4.dim(` Score is ${baselineScore.score}/100 \u2014 only fixing ${failingChecks.length} remaining issue${failingChecks.length === 1 ? "" : "s"}:
3873
3881
  `));
3874
3882
  for (const check of failingChecks) {
@@ -3877,11 +3885,11 @@ async function initCommand(options) {
3877
3885
  console.log("");
3878
3886
  }
3879
3887
  } else if (hasExistingConfig) {
3880
- console.log(chalk4.hex("#6366f1").bold(" Step 3/4 \u2014 Auditing your configs\n"));
3888
+ console.log(title.bold(" Step 3/4 \u2014 Auditing your configs\n"));
3881
3889
  console.log(chalk4.dim(" AI is reviewing your existing configs against your codebase"));
3882
3890
  console.log(chalk4.dim(" and suggesting improvements.\n"));
3883
3891
  } else {
3884
- console.log(chalk4.hex("#6366f1").bold(" Step 3/4 \u2014 Generating configs\n"));
3892
+ console.log(title.bold(" Step 3/4 \u2014 Generating configs\n"));
3885
3893
  console.log(chalk4.dim(" AI is creating agent config files tailored to your project.\n"));
3886
3894
  }
3887
3895
  console.log(chalk4.dim(" This can take a couple of minutes depending on your model and provider.\n"));
@@ -3937,7 +3945,7 @@ async function initCommand(options) {
3937
3945
  const timeStr = mins > 0 ? `${mins}m ${secs}s` : `${secs}s`;
3938
3946
  genSpinner.succeed(`Setup generated ${chalk4.dim(`in ${timeStr}`)}`);
3939
3947
  printSetupSummary(generatedSetup);
3940
- console.log(chalk4.hex("#6366f1").bold(" Step 4/4 \u2014 Review\n"));
3948
+ console.log(title.bold(" Step 4/4 \u2014 Review\n"));
3941
3949
  const setupFiles = collectSetupFiles(generatedSetup);
3942
3950
  const staged = stageFiles(setupFiles, process.cwd());
3943
3951
  console.log(chalk4.dim(` ${chalk4.green(`${staged.newFiles} new`)} / ${chalk4.yellow(`${staged.modifiedFiles} modified`)} file${staged.newFiles + staged.modifiedFiles !== 1 ? "s" : ""}
@@ -4061,7 +4069,7 @@ async function initCommand(options) {
4061
4069
  console.log(chalk4.bold.green(" Setup complete! Your coding agent is now configured."));
4062
4070
  console.log(chalk4.dim(" Run `caliber undo` to revert changes.\n"));
4063
4071
  console.log(chalk4.bold(" Next steps:\n"));
4064
- console.log(` ${chalk4.hex("#6366f1")("caliber undo")} Revert all changes from this run`);
4072
+ console.log(` ${title("caliber undo")} Revert all changes from this run`);
4065
4073
  console.log("");
4066
4074
  }
4067
4075
  async function refineLoop(currentSetup, _targetAgent) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@rely-ai/caliber",
3
- "version": "0.5.3",
3
+ "version": "0.7.0",
4
4
  "description": "Analyze your codebase and generate optimized AI agent configs (CLAUDE.md, .cursorrules, skills) — no API key needed",
5
5
  "type": "module",
6
6
  "bin": {