@rely-ai/caliber 0.2.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/bin.js +32 -15
  2. package/package.json +1 -1
package/dist/bin.js CHANGED
@@ -3374,10 +3374,10 @@ async function initCommand(options) {
3374
3374
  console.log(chalk3.dim(" against your actual codebase \u2014 keeping what works, fixing"));
3375
3375
  console.log(chalk3.dim(" what's stale, and adding what's missing.\n"));
3376
3376
  console.log(chalk3.bold(" How it works:\n"));
3377
- console.log(chalk3.dim(" 1. Scan Analyze your code, dependencies, and file structure"));
3378
- console.log(chalk3.dim(" 2. Generate AI creates config files tailored to your project"));
3379
- console.log(chalk3.dim(" 3. Review You accept, refine, or decline the generated setup"));
3380
- console.log(chalk3.dim(" 4. Apply Config files are written to your project\n"));
3377
+ console.log(chalk3.dim(" 1. Scan Analyze your code, dependencies, and existing configs"));
3378
+ console.log(chalk3.dim(" 2. Generate AI creates or improves config files for your project"));
3379
+ console.log(chalk3.dim(" 3. Review You accept, refine, or decline the proposed changes"));
3380
+ console.log(chalk3.dim(" 4. Apply Config files are written with backups\n"));
3381
3381
  console.log(chalk3.hex("#6366f1").bold(" Step 1/4 \u2014 Check LLM provider\n"));
3382
3382
  const config = loadConfig();
3383
3383
  if (!config) {
@@ -3392,7 +3392,7 @@ async function initCommand(options) {
3392
3392
  console.log(chalk3.dim(` Provider: ${config.provider} | Model: ${config.model}
3393
3393
  `));
3394
3394
  console.log(chalk3.hex("#6366f1").bold(" Step 2/4 \u2014 Scan project\n"));
3395
- console.log(chalk3.dim(" Detecting languages, frameworks, file structure, and existing configs.\n"));
3395
+ console.log(chalk3.dim(" Detecting languages, dependencies, file structure, and existing configs.\n"));
3396
3396
  const spinner = ora("Analyzing project...").start();
3397
3397
  const fingerprint = collectFingerprint(process.cwd());
3398
3398
  await enrichFingerprintWithLLM(fingerprint, process.cwd());
@@ -3406,11 +3406,16 @@ async function initCommand(options) {
3406
3406
  if (isEmpty) {
3407
3407
  fingerprint.description = await promptInput("What will you build in this project?");
3408
3408
  }
3409
- console.log(chalk3.hex("#6366f1").bold(" Step 3/4 \u2014 Auditing your configs\n"));
3410
- console.log(chalk3.dim(" AI is auditing your CLAUDE.md, skills, and rules against your"));
3411
- console.log(chalk3.dim(" project's actual codebase and conventions.\n"));
3412
- console.log(chalk3.dim(" This usually takes 1\u20133 minutes on first run.\n"));
3413
3409
  const hasExistingConfig = !!(fingerprint.existingConfigs.claudeMd || fingerprint.existingConfigs.claudeSettings || fingerprint.existingConfigs.claudeSkills?.length || fingerprint.existingConfigs.cursorrules || fingerprint.existingConfigs.cursorRules?.length);
3410
+ if (hasExistingConfig) {
3411
+ console.log(chalk3.hex("#6366f1").bold(" Step 3/4 \u2014 Auditing your configs\n"));
3412
+ console.log(chalk3.dim(" AI is reviewing your existing configs against your codebase"));
3413
+ console.log(chalk3.dim(" and suggesting improvements.\n"));
3414
+ } else {
3415
+ console.log(chalk3.hex("#6366f1").bold(" Step 3/4 \u2014 Generating configs\n"));
3416
+ console.log(chalk3.dim(" AI is creating agent config files tailored to your project.\n"));
3417
+ }
3418
+ console.log(chalk3.dim(" This usually takes 1\u20133 minutes.\n"));
3414
3419
  const genStartTime = Date.now();
3415
3420
  const genSpinner = ora("Generating setup...").start();
3416
3421
  const genMessages = new SpinnerMessages(genSpinner, GENERATION_MESSAGES, { showElapsedTime: true });
@@ -3931,9 +3936,10 @@ async function regenerateCommand(options) {
3931
3936
  genMessages.start();
3932
3937
  let generatedSetup = null;
3933
3938
  try {
3939
+ const targetAgent = readState()?.targetAgent ?? "both";
3934
3940
  const result2 = await generateSetup(
3935
3941
  fingerprint,
3936
- "both",
3942
+ targetAgent,
3937
3943
  void 0,
3938
3944
  {
3939
3945
  onStatus: (status) => {
@@ -3983,7 +3989,7 @@ async function regenerateCommand(options) {
3983
3989
  // src/commands/recommend.ts
3984
3990
  import chalk7 from "chalk";
3985
3991
  import ora4 from "ora";
3986
- import { mkdirSync, writeFileSync } from "fs";
3992
+ import { mkdirSync, readFileSync as readFileSync7, existsSync as existsSync9, writeFileSync } from "fs";
3987
3993
  import { join as join8, dirname as dirname2 } from "path";
3988
3994
 
3989
3995
  // src/scanner/index.ts
@@ -4145,15 +4151,26 @@ async function searchSkills(technologies) {
4145
4151
  }
4146
4152
  return results;
4147
4153
  }
4154
+ function extractTopDeps() {
4155
+ const pkgPath = join8(process.cwd(), "package.json");
4156
+ if (!existsSync9(pkgPath)) return [];
4157
+ try {
4158
+ const pkg3 = JSON.parse(readFileSync7(pkgPath, "utf-8"));
4159
+ return Object.keys(pkg3.dependencies ?? {});
4160
+ } catch {
4161
+ return [];
4162
+ }
4163
+ }
4148
4164
  async function recommendCommand(options) {
4149
4165
  const fingerprint = collectFingerprint(process.cwd());
4150
4166
  const platforms = detectLocalPlatforms();
4151
- const technologies = [
4167
+ const technologies = [...new Set([
4152
4168
  ...fingerprint.languages,
4153
- ...fingerprint.frameworks
4154
- ].filter(Boolean);
4169
+ ...fingerprint.frameworks,
4170
+ ...extractTopDeps()
4171
+ ].filter(Boolean))];
4155
4172
  if (technologies.length === 0) {
4156
- console.log(chalk7.yellow("Could not detect any languages or frameworks. Try running from a project root."));
4173
+ console.log(chalk7.yellow("Could not detect any languages or dependencies. Try running from a project root."));
4157
4174
  throw new Error("__exit__");
4158
4175
  }
4159
4176
  const spinner = ora4("Searching for skills...").start();
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@rely-ai/caliber",
3
- "version": "0.2.0",
3
+ "version": "0.2.1",
4
4
  "description": "Open-source CLI for configuring coding agent environments (CLAUDE.md, .cursorrules, skills). Bring your own LLM.",
5
5
  "type": "module",
6
6
  "bin": {