@rely-ai/caliber 0.1.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 (4) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +134 -0
  3. package/dist/bin.js +5213 -0
  4. package/package.json +69 -0
package/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2025 Caliber AI
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
package/README.md ADDED
@@ -0,0 +1,134 @@
1
+ # Caliber
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.
4
+
5
+ ## Installation
6
+
7
+ ```bash
8
+ npm install -g @rely-ai/caliber
9
+ ```
10
+
11
+ ## Quick Start
12
+
13
+ ```bash
14
+ # Option 1: Set your API key as an environment variable
15
+ export ANTHROPIC_API_KEY=sk-ant-...
16
+
17
+ # Option 2: Interactive setup
18
+ caliber config
19
+
20
+ # Analyze your project and generate agent configs
21
+ caliber init
22
+ ```
23
+
24
+ ## What It Does
25
+
26
+ Caliber scans your codebase — languages, frameworks, file structure, existing configs — and generates tailored configuration files:
27
+
28
+ - **CLAUDE.md** — Project context for Claude Code (commands, architecture, conventions)
29
+ - **.cursorrules** / **.cursor/rules/** — Rules for Cursor
30
+ - **Skills** — Reusable skill files following the [OpenSkills](https://agentskills.io) standard
31
+
32
+ If you already have these files, Caliber audits them against your actual codebase and suggests targeted improvements — keeping what works, fixing what's stale, adding what's missing.
33
+
34
+ ## Commands
35
+
36
+ | Command | Description |
37
+ |---------|-------------|
38
+ | `caliber init` | Scan project and generate agent config |
39
+ | `caliber update` | Re-analyze and regenerate (alias: `regenerate`, `regen`) |
40
+ | `caliber config` | Configure LLM provider, API key, and model |
41
+ | `caliber refresh` | Update docs based on recent git changes |
42
+ | `caliber score` | Score your config quality (deterministic, no LLM) |
43
+ | `caliber recommend` | Discover skills from [skills.sh](https://skills.sh) |
44
+ | `caliber undo` | Revert all changes made by Caliber |
45
+ | `caliber status` | Show current setup status |
46
+ | `caliber hooks install` | Install auto-refresh hook for Claude Code |
47
+ | `caliber hooks remove` | Remove auto-refresh hook |
48
+ | `caliber hooks status` | Show installed hooks |
49
+ | `caliber learn install` | Install session learning hooks |
50
+ | `caliber learn status` | Show learned insights from sessions |
51
+ | `caliber learn observe` | Manually feed a tool event for analysis |
52
+ | `caliber learn finalize` | Analyze captured events and extract patterns |
53
+ | `caliber learn remove` | Remove learning hooks |
54
+
55
+ ## Supported LLM Providers
56
+
57
+ | Provider | Environment Variable | Notes |
58
+ |----------|---------------------|-------|
59
+ | **Anthropic** | `ANTHROPIC_API_KEY` | Recommended. Claude Sonnet 4.6 default. |
60
+ | **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. |
61
+ | **OpenAI** | `OPENAI_API_KEY` | GPT-4.1 default. |
62
+ | **Custom endpoint** | `OPENAI_API_KEY` + `OPENAI_BASE_URL` | Any OpenAI-compatible API (Ollama, vLLM, Together, etc.) |
63
+
64
+ Override the model with `CALIBER_MODEL=<model-name>` or via `caliber config`.
65
+
66
+ ### Vertex AI Setup
67
+
68
+ ```bash
69
+ # Minimal — uses gcloud ADC and defaults
70
+ export VERTEX_PROJECT_ID=my-gcp-project
71
+ caliber init
72
+
73
+ # With custom region
74
+ export VERTEX_PROJECT_ID=my-gcp-project
75
+ export VERTEX_REGION=europe-west1
76
+ caliber init
77
+
78
+ # With service account credentials (inline JSON)
79
+ export VERTEX_PROJECT_ID=my-gcp-project
80
+ export VERTEX_SA_CREDENTIALS='{"type":"service_account",...}'
81
+ caliber init
82
+
83
+ # With service account credentials (file path via GOOGLE_APPLICATION_CREDENTIALS)
84
+ export VERTEX_PROJECT_ID=my-gcp-project
85
+ export GOOGLE_APPLICATION_CREDENTIALS=/path/to/service-account.json
86
+ caliber init
87
+ ```
88
+
89
+ ## How It Works
90
+
91
+ 1. **Scan** — Analyzes your code, dependencies, file structure, and existing agent configs
92
+ 2. **Generate** — LLM creates config files tailored to your project
93
+ 3. **Review** — You accept, refine via chat, or decline the proposed changes
94
+ 4. **Apply** — Config files are written to your project with backups
95
+
96
+ ### Auto-refresh
97
+
98
+ After init, Caliber installs a Claude Code hook that automatically updates your docs when code changes:
99
+
100
+ ```bash
101
+ caliber hooks install # Install auto-refresh hook
102
+ caliber hooks remove # Remove it
103
+ ```
104
+
105
+ ### Session Learning
106
+
107
+ Caliber can observe your Claude Code sessions and extract reusable instructions:
108
+
109
+ ```bash
110
+ caliber learn install # Install learning hooks
111
+ caliber learn status # Check what's been captured
112
+ ```
113
+
114
+ ## Requirements
115
+
116
+ - Node.js >= 20
117
+ - An API key for a supported LLM provider
118
+
119
+ ## Contributing
120
+
121
+ ```bash
122
+ git clone https://github.com/rely-ai-org/caliber.git
123
+ cd caliber
124
+ npm install
125
+ npm run dev # Watch mode
126
+ npm run test # Run tests
127
+ npm run build # Compile
128
+ ```
129
+
130
+ This project uses [conventional commits](https://www.conventionalcommits.org/) — `feat:` for features, `fix:` for bug fixes. See the [CLAUDE.md](./CLAUDE.md) for architecture details.
131
+
132
+ ## License
133
+
134
+ MIT