@rely-ai/caliber 0.2.2 → 0.3.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 (3) hide show
  1. package/README.md +23 -12
  2. package/dist/bin.js +637 -318
  3. package/package.json +1 -1
package/README.md CHANGED
@@ -1,6 +1,6 @@
1
1
  # Caliber
2
2
 
3
- Open-source CLI that analyzes your project and generates optimized configuration files for AI coding agents (Claude Code, Cursor). Bring your own LLM — supports Anthropic, OpenAI, Google Vertex AI, and any OpenAI-compatible endpoint.
3
+ Open-source CLI that analyzes your project and generates optimized configuration files for AI coding agents (Claude Code, Cursor). Use your **current seat** (Claude Code Pro/Max/Team or Cursor subscription, no API key) or bring your own API key — supports Claude Code CLI (`claude -p`), Cursor (ACP), Anthropic, OpenAI, Google Vertex AI, and any OpenAI-compatible endpoint.
4
4
 
5
5
  ## Installation
6
6
 
@@ -11,13 +11,14 @@ npm install -g @rely-ai/caliber
11
11
  ## Quick Start
12
12
 
13
13
  ```bash
14
- # Option 1: Set your API key as an environment variable
15
- export ANTHROPIC_API_KEY=sk-ant-...
14
+ # Option 1: Use your current seat no API key
15
+ caliber config # choose "Claude Code" (Pro/Max/Team) or "Cursor"
16
+ # Or: export CALIBER_USE_CLAUDE_CLI=1 or CALIBER_USE_CURSOR_SEAT=1
16
17
 
17
- # Option 2: Interactive setup
18
- caliber config
18
+ # Option 2: Set an API key
19
+ export ANTHROPIC_API_KEY=sk-ant-...
19
20
 
20
- # Analyze your project and generate agent configs
21
+ # Then run
21
22
  caliber init
22
23
  ```
23
24
 
@@ -37,7 +38,7 @@ If you already have these files, Caliber audits them against your actual codebas
37
38
  |---------|-------------|
38
39
  | `caliber init` | Scan project and generate agent config |
39
40
  | `caliber update` | Re-analyze and regenerate (alias: `regenerate`, `regen`) |
40
- | `caliber config` | Configure LLM provider, API key, and model |
41
+ | `caliber config` | Configure LLM: Cursor (your seat), API key, and model |
41
42
  | `caliber refresh` | Update docs based on recent git changes |
42
43
  | `caliber score` | Score your config quality (deterministic, no LLM). Supports `--agent claude\|cursor\|both` |
43
44
  | `caliber recommend` | Discover skills from [skills.sh](https://skills.sh) |
@@ -56,10 +57,12 @@ If you already have these files, Caliber audits them against your actual codebas
56
57
 
57
58
  ## Supported LLM Providers
58
59
 
59
- | Provider | Environment Variable | Notes |
60
- |----------|---------------------|-------|
61
- | **Anthropic** | `ANTHROPIC_API_KEY` | Recommended. Claude Sonnet 4.6 default. |
62
- | **Google Vertex AI** | `VERTEX_PROJECT_ID` or `GCP_PROJECT_ID` | Uses Application Default Credentials (ADC) by default. Region defaults to `us-east5`. Set `VERTEX_REGION` to override, `VERTEX_SA_CREDENTIALS` for service account JSON. |
60
+ | Provider | How to use | Notes |
61
+ |----------|------------|-------|
62
+ | **Claude Code (current seat)** | `caliber config` → "Claude Code", or `CALIBER_USE_CLAUDE_CLI=1` | Uses your Pro/Max/Team login via `claude -p`. No API key; install [Claude Code CLI](https://claude.ai/install) and run `claude` once to log in. |
63
+ | **Cursor (current seat)** | `caliber config` → "Cursor", or `CALIBER_USE_CURSOR_SEAT=1` | Uses your Cursor subscription via [Cursor Agent (ACP)](https://cursor.com/docs/cli/acp). No API key; run `agent login` once if needed. |
64
+ | **Anthropic (Claude)** | `ANTHROPIC_API_KEY` | Claude Sonnet 4.6 default. Get an API key at [console.anthropic.com](https://console.anthropic.com) (same company as Claude Pro/Team/Max; API is separate billing). |
65
+ | **Google Vertex AI** | `VERTEX_PROJECT_ID` or `GCP_PROJECT_ID` | Uses ADC by default. Region `us-east5`. Set `VERTEX_REGION`, `VERTEX_SA_CREDENTIALS` as needed. |
63
66
  | **OpenAI** | `OPENAI_API_KEY` | GPT-4.1 default. |
64
67
  | **Custom endpoint** | `OPENAI_API_KEY` + `OPENAI_BASE_URL` | Any OpenAI-compatible API (Ollama, vLLM, Together, etc.) |
65
68
 
@@ -88,6 +91,14 @@ export GOOGLE_APPLICATION_CREDENTIALS=/path/to/service-account.json
88
91
  caliber init
89
92
  ```
90
93
 
94
+ ## Flow: install and init
95
+
96
+ - **Install:** `npm install -g @caliber-ai/caliber` runs the postinstall script and prints the "Get started" message. With **npx** (`npx @caliber-ai/caliber init`), there is no install step; the binary runs from cache.
97
+ - **Config:** User runs `caliber config` (or sets env vars). Config is stored in `~/.caliber/config.json` or taken from `ANTHROPIC_API_KEY` / `OPENAI_API_KEY` / `VERTEX_PROJECT_ID` / `CALIBER_USE_CLAUDE_CLI` / `CALIBER_USE_CURSOR_SEAT`.
98
+ - **Init:** `caliber init` calls `loadConfig()`: env vars override; if none, it reads `~/.caliber/config.json`. If no config, init prints the options and exits. Otherwise it scans the project, generates config with the chosen LLM (**Claude Code CLI**, Cursor ACP, Anthropic, OpenAI, or Vertex), then review and apply.
99
+
100
+ See [docs/FLOW.md](docs/FLOW.md) for the full step-by-step.
101
+
91
102
  ## How It Works
92
103
 
93
104
  1. **Scan** — Analyzes your code, dependencies, file structure, and existing agent configs
@@ -138,7 +149,7 @@ caliber learn status # Check what's been captured
138
149
  ## Requirements
139
150
 
140
151
  - Node.js >= 20
141
- - An API key for a supported LLM provider
152
+ - An LLM: use your **Claude Code** or **Cursor** subscription (run `caliber config` → Claude Code or Cursor; for Claude Code run `claude` once to log in), or set an API key for Anthropic, OpenAI, or Vertex
142
153
 
143
154
  ## Contributing
144
155