@build-astron-co/nimbus 0.4.0 → 0.4.2

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.
package/CHANGELOG.md ADDED
@@ -0,0 +1,279 @@
1
+ # Changelog
2
+
3
+ All notable changes to this project will be documented in this file.
4
+
5
+ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/),
6
+ and this project adheres to
7
+ [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
8
+
9
+ ---
10
+
11
+ ## [0.4.2] - 2026-03-06
12
+
13
+ ### Added
14
+
15
+ - **Categorized HelpModal** — `/help` now shows 5 categories (DevOps Commands,
16
+ Session, Navigation, Settings, Keyboard Shortcuts) with 33+ commands listed,
17
+ including `/plan`, `/apply`, `/drift`, `/rollback`, `/incident`, `/runbook`,
18
+ `/plugin`, `/tools`, `/remember`, `/share`, `/deploy`, `/logs`,
19
+ `/auth-refresh`, `/search`, `/watch`, and more.
20
+ - **Help hint in InputBox** — Placeholder text updated to
21
+ "Ask me anything DevOps... (? for help, /help for commands)" so new users
22
+ immediately discover the help system.
23
+ - **Additional slash command completions** — `/deploy`, `/rollback`, `/incident`,
24
+ `/runbook`, `/plugin`, `/share`, `/status`, `/remember`, `/logs` added to
25
+ Tab-autocomplete in the InputBox.
26
+ - **Onboarding transition message** — After the setup wizard completes, a clear
27
+ "Setup complete! Launching Nimbus DevOps Agent..." message is shown before
28
+ the TUI opens, with keyboard hints (?, Tab, Ctrl+C).
29
+ - **sql.js SQLite fallback** — When `better-sqlite3` native bindings cannot be
30
+ compiled (ARM Linux, Windows, some CI environments), Nimbus automatically
31
+ falls back to `sql.js` (pure JavaScript) with full file persistence. No
32
+ in-memory-only limitation.
33
+ - **Auto-update badge** — Background version check against npm registry; new
34
+ version available shows `[update: vX.Y.Z] run: nimbus upgrade` in the
35
+ StatusBar without blocking startup.
36
+ - **Human-readable session names** — Sessions are auto-renamed from the first
37
+ user message (e.g. "check-failing-pods") instead of showing UUID strings.
38
+ - **Auto-init on fresh session** — When no `NIMBUS.md` exists and infrastructure
39
+ files are detected (`*.tf`, `Chart.yaml`, etc.), Nimbus auto-generates
40
+ `NIMBUS.md` silently at session start.
41
+ - **Auto-doctor on first session** — First-ever session checks for missing
42
+ DevOps CLIs (terraform, kubectl, helm, docker) and surfaces warnings in the
43
+ TUI as a system message.
44
+ - **OpenCode parity test suite** — `src/__tests__/opencode-parity-v2.test.ts`
45
+ with 51 assertions covering HelpModal categories, InputBox hints, onboarding
46
+ transition, doctor --fix wiring, and welcome-screen infra context.
47
+
48
+ ### Fixed
49
+
50
+ - Removed stale `"prepare"` script from `package.json` — `tsc` no longer runs
51
+ on `npm install`, eliminating the 5–15 second delay for global installs.
52
+ - `compat-sqlite.test.ts` updated to check for `persist` instead of `in-memory`
53
+ (sql.js fallback now writes to disk, not memory-only).
54
+ - `devops-terminal-gaps.test.ts` placeholder assertion updated to match the new
55
+ DevOps-focused placeholder text.
56
+
57
+ ---
58
+
59
+ ## [0.4.1] - 2026-02-28
60
+
61
+ ### Added
62
+
63
+ - **Full 29-gap DevOps fix plan** — All gaps from the C1–C4, H1–H7, M1–M10,
64
+ L1–L8 plan implemented (1408 → 1484 tests):
65
+ - **C1** — Per-tool Ctrl+C: cancels the running tool only; agent loop
66
+ continues with a synthetic "cancelled" result. Press Ctrl+C again to abort
67
+ the session.
68
+ - **C2** — Ansible tool with 10 actions: `playbook`, `syntax-check`,
69
+ `dry-run`, `inventory-list`, `vault-encrypt`, `vault-decrypt`, `vault-view`,
70
+ `galaxy-install`, `galaxy-search`, `facts`.
71
+ - **C3** — Terraform workspace auto-applied across turns: session workspace
72
+ stored in `ToolExecuteContext.infraContext.terraformWorkspace`; each
73
+ stateful terraform action auto-selects the session workspace.
74
+ - **C4** — ArgoCD/Flux GitOps `watch` action: streams
75
+ `kubectl get applications --watch` via `spawnExec` with `onChunk`.
76
+ - **H1** — Inline diff approval: `edit_file`/`multi_edit` in build/deploy
77
+ mode triggers a diff preview modal; user approves or rejects before the
78
+ write applies.
79
+ - **H2** — Async context compaction: `runCompaction()` fires in the
80
+ background; the result is awaited at the start of the next turn, shifting
81
+ the 1–2s wait to the user's thinking pause.
82
+ - **H3** — kubectl `events` and `watch` actions with streaming output.
83
+ - **H4** — `policy_check` tool: runs Checkov, tfsec, Trivy-config, Conftest,
84
+ or Kyverno; groups violations by severity; `auto_allow` permission tier.
85
+ - **H5** — `rollout_control` tool: Argo Rollouts and Flagger support
86
+ (status, promote, abort, pause, resume, set-weight, analyze).
87
+ - **H6** — Extended `secrets` tool: HashiCorp Vault (`vault-read`,
88
+ `vault-write`, `vault-rotate`, `vault-lease-renew`, `vault-list`) and
89
+ AWS Secrets Manager (`aws-get-secret`, `aws-put-secret`, `aws-rotate-secret`,
90
+ `aws-list-secrets`). Secret values masked as `[REDACTED]` in output.
91
+ - **H7** — Runbook step-by-step progress: `[STEP_START:N]` /
92
+ `[STEP_COMPLETE:N]` sentinels parsed from the agent stream; current step
93
+ shown in StatusBar.
94
+ - **M1** — Docker `scan` action: runs `trivy image` or `trivy fs`, groups
95
+ results by severity (CRITICAL/HIGH/MEDIUM/LOW).
96
+ - **M3** — `db_migrate` tool: Flyway, Liquibase, golang-migrate, Sqitch
97
+ (info/migrate/rollback/validate/clean/baseline). `always_ask` permission.
98
+ - **M5** — Pre-apply cost alert: after `terraform plan`, estimates monthly
99
+ cost delta; warns if > $100/month before proceeding.
100
+ - **M6** — Terraform plan truncation threshold increased to 1500 lines with
101
+ smarter summary (first 30 + resource list + last 20 lines).
102
+ - **M7** — `env_diff` tool: compares terraform workspaces, K8s namespaces,
103
+ or Helm releases side-by-side.
104
+ - **M9** — Doctor platform-aware install instructions: `brew install` on
105
+ macOS, `apt-get` / `dnf` on Linux with distro detection.
106
+ - **M10** — `notify` tool: Slack, PagerDuty, Microsoft Teams, or generic
107
+ webhook. Auto-fires after successful terraform apply if `## Notifications`
108
+ in NIMBUS.md has `slack_webhook:`.
109
+ - **L1** — README Bun binary mention corrected.
110
+ - **L3** — `/watch` defaults to DevOps files (`*.tf`, `*.yaml`, `*.yml`,
111
+ `Dockerfile`).
112
+ - **L4** — NIMBUS.md validation on load: checks for unclosed code fences,
113
+ invalid headers, and size > 50KB.
114
+ - **L5** — Live session sharing: `/ws/share/:id` WebSocket endpoint; all
115
+ connected viewers receive new messages in real time.
116
+ - **L7** — `nimbus status --watch`: refreshes every 30s, clears terminal with
117
+ ANSI escape.
118
+ - **L8** — Terraform module registry browser: `terraform_registry` tool with
119
+ `search` and `show` actions against the Terraform Registry API.
120
+
121
+ ---
122
+
123
+ ## [0.4.0] - 2026-02-10
124
+
125
+ ### Added
126
+
127
+ - **Full OpenCode parity** — 30 DevOps UX gaps resolved; Nimbus now matches
128
+ OpenCode's terminal experience end-to-end, specialized for DevOps.
129
+ - **Ctrl+C per-tool cancel** — Cancels the running subprocess only (not the
130
+ whole TUI). Agent loop continues. Press Ctrl+C again to exit.
131
+ - **Scroll lock** — Message list pins to bottom while the agent is responding;
132
+ Up/Down arrows unlock scroll. `G` snaps back to the bottom.
133
+ - **Streaming tool output window** — `ToolCallDisplay` shows the last 10 lines
134
+ of live output while a tool is running, with elapsed timer and a `LIVE`
135
+ indicator for log-streaming tools.
136
+ - **Mode persistence** — Active mode (plan/build/deploy) is saved per working
137
+ directory to `~/.nimbus/mode-config.json` and restored on next session.
138
+ - **Conversation search** — `/search <query>` filters the message list in real
139
+ time; result count shown in StatusBar.
140
+ - **Per-turn token/cost stats** — After each LLM response, a compact
141
+ `[N in / N out — $X.XXXX]` line is emitted so you can track spend per turn.
142
+ - **API-key setup banner** — If no LLM key is configured, a dismissable banner
143
+ explains how to set up credentials. Auto-dismisses after 8 seconds or on
144
+ first message.
145
+ - **Auto-show TerminalPane** — For long-running DevOps tools (terraform, helm,
146
+ kubectl, docker), the terminal output pane opens automatically and closes 2
147
+ seconds after the tool completes.
148
+ - **Shell completion auto-install** — `nimbus completions install` detects the
149
+ shell (bash/zsh/fish) and writes the completion script to the right location.
150
+ - **Config profiles** — `nimbus profile <name>` loads a named config set
151
+ (model, mode, tool permissions) from `~/.nimbus/profiles/`.
152
+ - **Session infra context** — Each session stores its Terraform workspace and
153
+ kubectl context in SQLite; infra context is restored on session resume and
154
+ shown in the Header.
155
+ - **Token usage warning** — At 70% context window usage, a yellow warning
156
+ appears: "Context at 70% — consider /compact".
157
+
158
+ ### Changed
159
+
160
+ - Empty state simplified: instead of generic tips, shows "Starting Nimbus..."
161
+ while the agent initializes.
162
+ - Copy-to-clipboard (`pbcopy`/`xclip`/`clip`) available from MessageList code
163
+ blocks; success shown as a toast in StatusBar.
164
+ - Deploy mode confirmation: Tab to deploy now shows a "Switch to DEPLOY mode?
165
+ [y/N]" prompt instead of switching immediately.
166
+
167
+ ---
168
+
169
+ ## [0.3.0] - 2026-01-20
170
+
171
+ ### Added
172
+
173
+ - **Terminal Gap Fix Plan v2** — C1–C6, H1–H5, M1–M3, L1–L2 (1259 tests):
174
+ - Multi-cluster context display in Header with environment color coding.
175
+ - LSP diagnostics surfaced inline (TypeScript, Go, Python, HCL, YAML, Docker).
176
+ - Smarter context compaction: haiku model for summarization, preserves tool
177
+ state and last 5 messages.
178
+ - `nimbus rollout` command for canary/progressive delivery (Argo Rollouts).
179
+ - JSON output for `nimbus run --format json` includes `planSummary` field.
180
+ - Custom error hints for terraform/kubectl/helm/cloud errors (20+ patterns).
181
+ - FileDiffModal for inline diff approval before file edits apply.
182
+ - Compaction runs async (non-blocking) — result awaited at next turn start.
183
+
184
+ - **Standalone Binary Migration** — C1–C8, H1–H3, M1–M3, L1 (1293 tests):
185
+ - Migrated from Bun to Node.js + npm for the npm distribution path.
186
+ - Tests use vitest@2 (`npm test`) instead of `bun:test`.
187
+ - `tsconfig.json` uses `moduleResolution: "bundler"` and `types: ["node"]`.
188
+ - `Timer` global replaced with `ReturnType<typeof setTimeout>` in 3 files.
189
+ - BrowserOAuthServer uses `node:http` instead of `Bun.serve()`.
190
+ - `better-sqlite3` as primary SQLite backend (native Node.js bindings).
191
+
192
+ ---
193
+
194
+ ## [0.2.0] - 2025-12-15
195
+
196
+ ### Added
197
+
198
+ - **DevOps Identity Gap Fix** — Help/onboarding/header/welcome overhaul (1342
199
+ tests):
200
+ - Header shows terraform workspace and kubectl context with [PROD] warnings.
201
+ - Welcome screen shows detected infra context (tf/k8s/aws/gcp) with
202
+ context-aware suggestions.
203
+ - Onboarding wizard (11 providers): Anthropic, OpenAI, Google, Bedrock, Azure
204
+ OpenAI, Ollama, Groq, DeepSeek, OpenRouter, Together AI, Fireworks AI.
205
+ - Infrastructure auto-detection in onboarding (Terraform, K8s, Helm, Docker).
206
+ - `nimbus doctor` replaces stale localhost port checks with: SQLite DB check,
207
+ LLM auth check, DevOps CLI version checks (terraform, kubectl, helm, aws,
208
+ gcloud, az).
209
+
210
+ - **DevOps Terminal Gap Fix** — C1–C3, H1–H5, M1–M5, L1–L3 (1328 tests):
211
+ - Logs tool with streaming via `spawnExec` + `onChunk`; StatusBar shows
212
+ "Esc:stop stream".
213
+ - Infra context (`SessionInfraContext`) stored per session in SQLite; wired
214
+ into `ToolExecuteContext` so tools receive live workspace/context.
215
+ - Terraform plan smart truncation (500 → 1500 lines) with summary line.
216
+ - ToolCallDisplay LIVE indicator for streaming tools.
217
+ - Parallel cloud discovery for AWS/GCP/Azure in `cloud_discover`.
218
+ - Compaction preserves `infraContext` across sessions.
219
+ - `generate_infra` tool for natural-language infrastructure generation.
220
+ - Docker build progress display in `ToolCallDisplay`.
221
+ - `nimbus rollout` command.
222
+ - `planSummary` field in `nimbus run --format json` output.
223
+ - Custom DevOps error hints injected into tool results.
224
+
225
+ - **DevOps Polish Plan** — H1–H5, M1–M7, L1–L5 (1384 tests):
226
+ - `TerminalPane` and `TreePane` side panels toggled by `/terminal` and `/tree`.
227
+ - MCP plugin manager (`nimbus plugin install/uninstall/list`).
228
+ - Team-context NIMBUS.md sharing (`nimbus team-context`).
229
+ - NIMBUS.md diff shown on `nimbus init` re-run.
230
+ - Session cost/token summary on session close.
231
+
232
+ ---
233
+
234
+ ## [0.1.0] - 2025-10-01
235
+
236
+ ### Added
237
+
238
+ - **5-Phase transformation complete** — 18 microservices consolidated into a
239
+ single embedded binary.
240
+ - **Phase 1** — Core infrastructure: entry point, CLI router, app lifecycle,
241
+ LLM router (7 providers), tool schemas, SQLite state (16 tables), enterprise
242
+ layer. 188 tests, ~62 MB binary.
243
+ - **Phase 2** — Tool system: Zod-based tool schemas, `ToolRegistry`, 4-tier
244
+ permission engine, MCP client (JSON-RPC over stdio/HTTP), subagent system,
245
+ agent loop with streaming. 173 new tests (361 total).
246
+ - **Phase 3** — TUI: Ink v6 + React 19, 8 components (App, Header,
247
+ MessageList, ToolCallDisplay, InputBox, StatusBar, PermissionPrompt,
248
+ DeployPreview). Three-mode system (plan/build/deploy). Hooks (YAML config),
249
+ snapshots (git write-tree), audit (14 security rules, 25 compliance
250
+ controls). `nimbus init` with 6-language + 5-infra + 3-cloud detection.
251
+ 177 new tests (538 total).
252
+ - **Phase 4** — Distribution: npm packaging, Homebrew tap, shell script
253
+ installer, pre-built binaries for macOS/Linux/Windows, GitHub Actions CI.
254
+ - **Phase 5** — Production features: LSP (6 languages, lazy-loaded), context
255
+ manager (auto-compact at 85%), session manager (SQLite-backed, conflict
256
+ detection), HTTP API server (Elysia, SSE streaming), session sharing
257
+ (URL-safe IDs, 30-day TTL), web UI integration. 109 new tests (647 total).
258
+ - **DevOps Gaps v1** — 21 gaps resolved: DEVOPS_DOMAIN_KNOWLEDGE in system
259
+ prompt, terraform destroy guard, real DevOps CLI checks in doctor, infra
260
+ context discovery, terraform plan analyzer, DevOps error classification,
261
+ session infra context, auth-refresh command, kubectl_context tool,
262
+ helm_values tool, TerraformPlanCache, cloud_discover structured output,
263
+ stdin piping, DevOps-only file watcher, workspace-aware system prompt.
264
+ - **DevOps Gaps v2** — 29 more gaps resolved: docker tool, secrets tool (helm-
265
+ secrets), cicd tool, auth keychain, monitor tool, gitops tool, syntax
266
+ highlighting (YAML/JSON/Bash/SQL/Dockerfile), elapsed timer in
267
+ ToolCallDisplay, 70% context warning, TerminalPane, cloudActionTool,
268
+ logsTool, certsTool, meshTool, cfnTool, k8sRbacTool, NIMBUS.md live reload,
269
+ TreePane sidebar, plugin manager, team-context, shell completions, session
270
+ cost summary, enhanced doctor.
271
+
272
+ ### Architecture
273
+
274
+ - Runtime: Node.js >= 18 (npm distribution) with Bun support for compiled
275
+ binaries.
276
+ - Single-process design: no HTTP microservices, no Docker required.
277
+ - SQLite with WAL mode at `~/.nimbus/nimbus.db`.
278
+ - Streaming-first: LLM responses and tool output stream token-by-token.
279
+ - 4-tier permission engine: auto_allow → ask_once → always_ask → blocked.
package/README.md CHANGED
@@ -5,624 +5,65 @@
5
5
  [![GitHub release](https://img.shields.io/github/v/release/the-ai-project-co/nimbus)](https://github.com/the-ai-project-co/nimbus/releases)
6
6
  [![CI](https://github.com/the-ai-project-co/nimbus/actions/workflows/ci.yml/badge.svg)](https://github.com/the-ai-project-co/nimbus/actions)
7
7
  [![TypeScript](https://img.shields.io/badge/TypeScript-5.3-blue.svg)](https://www.typescriptlang.org/)
8
- [![Bun](https://img.shields.io/badge/Bun-%E2%89%A51.0-f472b6.svg)](https://bun.sh/)
9
- [![Tests](https://img.shields.io/badge/tests-693%20passing-brightgreen.svg)](https://github.com/the-ai-project-co/nimbus/actions)
8
+ [![Node.js](https://img.shields.io/badge/Node.js-%E2%89%A518-brightgreen.svg)](https://nodejs.org/)
9
+ [![Tests](https://img.shields.io/badge/tests-1529%20passing-brightgreen.svg)](https://github.com/the-ai-project-co/nimbus/actions)
10
10
 
11
- > AI-powered cloud engineering agent for your terminal
11
+ > AI-powered DevOps terminal agent type `nimbus`, get a live infrastructure operator
12
12
 
13
- Nimbus is an intelligent command-line agent that brings the power of large
14
- language models to DevOps and cloud engineering workflows. Think of it as an AI
15
- pair-programmer that understands Terraform, Kubernetes, Helm, and cloud
16
- providers natively. It ships as a single self-contained binary with an
17
- interactive terminal UI, 20 built-in tools, support for 11+ LLM providers, and a
18
- three-mode safety system that separates reading, building, and deploying.
13
+ Nimbus is an intelligent command-line agent purpose-built for DevOps and cloud engineering. Type `nimbus`, describe what you want, and Nimbus plans, validates, and executes across Terraform, Kubernetes, Helm, AWS, GCP, and Azure — all from a single terminal session.
19
14
 
20
15
  ---
21
16
 
22
- ## Table of Contents
23
-
24
- - [Features](#features)
25
- - [Quick Start](#quick-start)
26
- - [Installation](#installation)
27
- - [Getting Started](#getting-started)
28
- - [Commands](#commands)
29
- - [Modes](#modes)
30
- - [LLM Providers](#llm-providers)
31
- - [MCP Support](#mcp-support)
32
- - [Project Configuration (NIMBUS.md)](#project-configuration-nimbusmd)
33
- - [Keyboard Shortcuts (TUI)](#keyboard-shortcuts-tui)
34
- - [Development](#development)
35
- - [Architecture](#architecture)
36
- - [License](#license)
37
-
38
- ---
39
-
40
- ## Features
41
-
42
- - **Interactive TUI** -- Rich terminal interface built with Ink and React,
43
- featuring syntax highlighting, markdown rendering, code blocks, and a status
44
- bar with mode indicators.
45
- - **20 Built-in Tools** -- File operations (read, write, edit, glob, grep), git,
46
- bash, terraform, kubectl, helm, AWS/GCP/Azure cloud discovery, web search,
47
- cost estimation, drift detection, deploy preview, and subagent task spawning.
48
- - **11+ LLM Providers** -- Anthropic, OpenAI, Google, AWS Bedrock, Azure OpenAI,
49
- Ollama, Groq, DeepSeek, OpenRouter, Together AI, Fireworks AI, and Perplexity.
50
- Any OpenAI-compatible endpoint can be added.
51
- - **Three Modes** -- Plan (read-only), Build (edit/create), and Deploy (full
52
- infra access). Each mode progressively expands tool availability and resets
53
- permissions on switch.
54
- - **Session Persistence** -- Conversations are stored in SQLite and can be
55
- resumed, branched, or shared. Multi-session support with file conflict
56
- detection.
57
- - **MCP Server Support** -- Connect to Model Context Protocol servers to extend
58
- Nimbus with external tools via JSON-RPC over stdio or HTTP.
59
- - **Subagent System** -- Spawn parallel sub-tasks (explore, infra, security,
60
- cost, general) with isolated context and independent model selection.
61
- - **Context Management** -- Auto-compaction at 85% context window usage.
62
- Preserves first message, last 5 messages, summaries, and active tool state.
63
- - **Snapshot / Undo / Redo** -- Uses `git write-tree` for git projects (or
64
- filesystem copy for non-git) to checkpoint and roll back changes.
65
- - **Infrastructure Generation** -- Generate Terraform configurations, Kubernetes
66
- manifests, and Helm charts from natural language descriptions with
67
- best-practice templates.
68
- - **Cost Estimation and Drift Detection** -- Estimate infrastructure costs
69
- before deploying and detect configuration drift across your environments.
70
- - **Enterprise Features** -- Teams, billing, audit logs, usage tracking,
71
- security scanning, and compliance checking (SOC2, HIPAA, PCI-DSS, GDPR, ISO
72
- 27001).
73
- - **Web UI** -- Browser-based interface via `nimbus web`, backed by an Elysia
74
- HTTP API with SSE streaming.
75
- - **Human-in-the-Loop Safety** -- 4-tier permission engine (auto_allow,
76
- ask_once, always_ask, blocked) with action-specific escalation for destructive
77
- operations.
78
-
79
- ---
80
-
81
- ## Quick Start
82
-
83
- ```bash
84
- # Install
85
- npm install -g @build-astron-co/nimbus
86
- # or
87
- bun install -g @build-astron-co/nimbus
88
- # or via Homebrew
89
- brew tap the-ai-project-co/tap
90
- brew install nimbus
91
-
92
- # Set up authentication
93
- nimbus login
94
-
95
- # Start the interactive AI agent
96
- nimbus
97
- ```
98
-
99
- On first run, Nimbus launches an onboarding flow that walks you through provider
100
- selection and API key configuration. After that, running `nimbus` drops you into
101
- the interactive chat.
102
-
103
- ---
104
-
105
- ## Installation
106
-
107
- ### Bun (recommended -- fastest, native SQLite)
108
-
109
- ```bash
110
- bun install -g @build-astron-co/nimbus
111
- ```
112
-
113
- Bun provides the best experience: native `bun:sqlite` for state management,
114
- faster startup, and the full Ink TUI out of the box.
115
-
116
- ### npm
17
+ ## Install
117
18
 
118
19
  ```bash
20
+ # npm
119
21
  npm install -g @build-astron-co/nimbus
120
- ```
121
-
122
- Works with Node.js >= 18. Uses `better-sqlite3` as the SQLite backend when
123
- running under Node.
124
-
125
- ### Homebrew (macOS / Linux)
126
22
 
127
- ```bash
23
+ # Homebrew (use the fully-qualified tap name to avoid name conflicts)
128
24
  brew tap the-ai-project-co/tap
129
- brew install nimbus
130
- ```
131
-
132
- ### Shell script (auto-detects best method)
25
+ brew install the-ai-project-co/tap/nimbus
133
26
 
134
- ```bash
27
+ # Shell script (auto-detects best method)
135
28
  curl -fsSL https://raw.githubusercontent.com/the-ai-project-co/nimbus/main/scripts/install.sh | bash
136
29
  ```
137
30
 
138
- ### Compiled binary (direct download)
139
-
140
- Pre-built standalone binaries for macOS, Linux, and Windows are available on the
141
- [GitHub Releases](https://github.com/the-ai-project-co/nimbus/releases) page.
142
- Standalone binaries bundle the Bun runtime (~68 MB), so no extra dependencies
143
- are needed.
144
-
145
- > Note: compiled binaries use the readline chat interface. Install via Bun or
146
- > npm for the full Ink TUI.
147
-
148
- ---
149
-
150
- ## Getting Started
151
-
152
- ### First run / onboarding
153
-
154
- ```bash
155
- nimbus
156
- ```
157
-
158
- The first time you run Nimbus, it launches an interactive onboarding that helps
159
- you select an LLM provider and configure your API key. Credentials are stored in
160
- `~/.nimbus/auth.json`.
161
-
162
- ### Setting up providers
163
-
164
- You can configure providers through onboarding or by setting environment
165
- variables directly:
166
-
167
- ```bash
168
- export ANTHROPIC_API_KEY="sk-ant-..."
169
- ```
170
-
171
- Or log in interactively:
172
-
173
- ```bash
174
- nimbus login
175
- ```
176
-
177
- ### Initialize a project
178
-
179
- ```bash
180
- nimbus init
181
- ```
182
-
183
- This detects your project type (TypeScript, Go, Python, Rust, Java, JavaScript),
184
- infrastructure tooling (Terraform, Kubernetes, Helm, Docker, CI/CD), and cloud
185
- providers (AWS, GCP, Azure), then generates a `NIMBUS.md` file with project
186
- context that Nimbus uses to tailor its responses.
187
-
188
- ### Interactive chat
189
-
190
- ```bash
191
- nimbus chat
192
- ```
193
-
194
- Or just `nimbus` -- it launches the Ink TUI with the full agent loop, tool
195
- execution, and streaming responses.
196
-
197
- ### Non-interactive mode
198
-
199
- ```bash
200
- nimbus run "Create a Terraform module for an S3 bucket with versioning and encryption"
201
- nimbus run "Fix the failing test in src/__tests__/router.test.ts" --auto-approve
202
- nimbus run "Explain the architecture of this project" --format json
203
- ```
204
-
205
- ### One-off questions
206
-
207
- ```bash
208
- nimbus ask "How do I set up an S3 bucket with versioning?"
209
- ```
210
-
211
- ### Check your environment
212
-
213
- ```bash
214
- nimbus doctor
215
- ```
216
-
217
- Verifies that required tools (git, terraform, kubectl, helm, cloud CLIs) are
218
- available and that provider credentials are configured.
31
+ Pre-built standalone binaries (~68 MB, no Node.js required) are on the [Releases](https://github.com/the-ai-project-co/nimbus/releases) page.
219
32
 
220
33
  ---
221
34
 
222
- ## Commands
223
-
224
- ### Chat and AI
225
-
226
- | Command | Description |
227
- | ----------------------- | ----------------------------------------- |
228
- | `nimbus` | Launch interactive chat (default) |
229
- | `nimbus chat` | Interactive AI chat session |
230
- | `nimbus run "prompt"` | Non-interactive mode with a single prompt |
231
- | `nimbus ask "question"` | Ask a one-off question |
232
- | `nimbus explain <file>` | Explain a file or code snippet |
233
- | `nimbus fix <file>` | Analyze and fix issues in a file |
234
- | `nimbus analyze` | Analyze the current project |
235
-
236
- ### Configuration
237
-
238
- | Command | Description |
239
- | ---------------- | ------------------------------------------------------ |
240
- | `nimbus init` | Initialize a project (detect type, generate NIMBUS.md) |
241
- | `nimbus config` | View or set configuration |
242
- | `nimbus login` | Authenticate with an LLM provider |
243
- | `nimbus logout` | Remove stored credentials |
244
- | `nimbus auth` | Manage authentication |
245
- | `nimbus doctor` | Check environment and provider status |
246
- | `nimbus upgrade` | Self-update to the latest version |
247
-
248
- ### Infrastructure Generation
249
-
250
- | Command | Description |
251
- | --------------------------- | ------------------------------------------------------- |
252
- | `nimbus generate terraform` | Generate Terraform configurations from natural language |
253
- | `nimbus generate k8s` | Generate Kubernetes manifests |
254
- | `nimbus generate helm` | Generate Helm charts |
255
-
256
- ### Cloud Providers
257
-
258
- | Command | Description |
259
- | ------------------------ | -------------------------------------- |
260
- | `nimbus aws <service>` | AWS operations (S3, EC2, Lambda, etc.) |
261
- | `nimbus gcp <service>` | Google Cloud operations |
262
- | `nimbus azure <service>` | Azure operations |
263
-
264
- ### Infrastructure Management
265
-
266
- | Command | Description |
267
- | ----------------------------------------------------- | -------------------------------------- |
268
- | `nimbus tf init/plan/apply/validate/destroy/fmt` | Terraform operations |
269
- | `nimbus k8s get/apply/delete/logs/scale/exec` | Kubernetes operations |
270
- | `nimbus helm list/install/upgrade/uninstall/rollback` | Helm operations |
271
- | `nimbus cost estimate/history` | Cost estimation and tracking |
272
- | `nimbus drift detect/fix` | Configuration drift detection |
273
- | `nimbus preview` | Deploy preview (blast radius analysis) |
274
-
275
- ### Git and Files
276
-
277
- | Command | Description |
278
- | ----------------------------------------------- | ---------------------- |
279
- | `nimbus git status/add/commit/push/merge/stash` | Git operations |
280
- | `nimbus fs read/write/list/search` | File system operations |
281
-
282
- ### GitHub
283
-
284
- | Command | Description |
285
- | ---------------------------------------- | ----------------------- |
286
- | `nimbus gh pr list/create/view/merge` | Pull request operations |
287
- | `nimbus gh issue list/create/view/close` | Issue operations |
288
- | `nimbus gh repo view/clone` | Repository operations |
289
-
290
- ### Enterprise
291
-
292
- | Command | Description |
293
- | ---------------- | ----------------------------------- |
294
- | `nimbus team` | Team management |
295
- | `nimbus billing` | Billing and subscription management |
296
- | `nimbus usage` | Usage statistics and token tracking |
297
- | `nimbus audit` | Audit logs and compliance reports |
298
-
299
- ### Server
300
-
301
- | Command | Description |
302
- | -------------- | -------------------------------------------------- |
303
- | `nimbus serve` | Start the HTTP API server (Elysia, SSE streaming) |
304
- | `nimbus web` | Start the API server and open the browser-based UI |
305
-
306
- ### Utilities
307
-
308
- | Command | Description |
309
- | ----------------------- | ----------------------------------- |
310
- | `nimbus version` | Print version and build date |
311
- | `nimbus help` | Show help for all commands |
312
- | `nimbus help <command>` | Show help for a specific command |
313
- | `nimbus doctor` | Verify environment and dependencies |
314
- | `nimbus upgrade` | Update Nimbus to the latest version |
315
-
316
- Run `nimbus help` for the full command list, or `nimbus help <command>` for
317
- details on any command.
318
-
319
- ---
320
-
321
- ## Modes
322
-
323
- Nimbus uses a three-mode system that controls which tools are available,
324
- enforcing a progressive trust model. Switching modes resets the permission
325
- session so that previously approved tools require re-approval.
326
-
327
- ### Plan mode
328
-
329
- Read-only exploration and analysis. The agent can read files, search codebases,
330
- estimate costs, detect drift, and propose changes -- but it cannot modify
331
- anything.
332
-
333
- **Available tools:** `read_file`, `glob`, `grep`, `list_dir`, `webfetch`,
334
- `cost_estimate`, `drift_detect`, `todo_read`, `todo_write`, `cloud_discover`
335
-
336
- ### Build mode (default)
337
-
338
- Everything in Plan, plus file editing, shell access, git operations, and
339
- non-destructive DevOps commands. The agent can generate Terraform configs, write
340
- Kubernetes manifests, and validate them, but it cannot apply changes to live
341
- infrastructure.
342
-
343
- **Additional tools:** `edit_file`, `multi_edit`, `write_file`, `bash`, `git`,
344
- `task`, `deploy_preview`, `terraform` (validate/fmt/plan only), `kubectl`
345
- (get/describe only), `helm` (list/status/template only)
346
-
347
- ### Deploy mode
348
-
349
- Full access to all 20 tools, including infrastructure-mutating operations.
350
- Destructive actions still go through the permission engine and require explicit
351
- user approval.
352
-
353
- **Additional tools:** All terraform subcommands (apply, destroy), all kubectl
354
- subcommands (apply, delete), all helm subcommands (install, upgrade, uninstall)
355
-
356
- Switch modes in the TUI by pressing **Tab**, or use the `/mode` slash command.
357
-
358
- ---
359
-
360
- ## LLM Providers
361
-
362
- Nimbus routes requests through an intelligent LLM router with automatic
363
- fallback, cost optimization, circuit breaking, and retry with exponential
364
- backoff.
365
-
366
- | Provider | Environment Variable(s) | Notes |
367
- | ------------ | ------------------------------ | ------------------------------------------------------ |
368
- | Anthropic | `ANTHROPIC_API_KEY` | Claude models (Sonnet, Opus, Haiku). Default provider. |
369
- | OpenAI | `OPENAI_API_KEY` | GPT-4o, GPT-4, GPT-3.5 |
370
- | Google | `GOOGLE_API_KEY` | Gemini models |
371
- | AWS Bedrock | `AWS_REGION` + IAM credentials | Claude, Llama, and others via AWS |
372
- | Ollama | `OLLAMA_BASE_URL` (optional) | Local models, no API key needed |
373
- | Groq | `GROQ_API_KEY` | Fast inference (Llama, Mixtral) |
374
- | DeepSeek | `DEEPSEEK_API_KEY` | DeepSeek models |
375
- | OpenRouter | `OPENROUTER_API_KEY` | Multi-model proxy, access 100+ models |
376
- | Together AI | `TOGETHER_API_KEY` | Llama, Mixtral, and more |
377
- | Fireworks AI | `FIREWORKS_API_KEY` | Fast open-source model inference |
378
- | Perplexity | `PERPLEXITY_API_KEY` | Online search-augmented models |
379
-
380
- Any OpenAI-compatible endpoint can be added via the `OpenAICompatibleProvider`
381
- class.
382
-
383
- You can also configure providers through `nimbus login`, which stores
384
- credentials in `~/.nimbus/auth.json`. The router checks `auth.json` first, then
385
- falls back to environment variables.
386
-
387
- ### Model aliases
388
-
389
- Nimbus supports short aliases for common models:
390
-
391
- ```bash
392
- nimbus chat --model sonnet # resolves to claude-sonnet-4-20250514
393
- nimbus chat --model opus # resolves to claude-opus-4-20250514
394
- nimbus chat --model gpt4o # resolves to gpt-4o
395
- nimbus chat --model gemini # resolves to gemini-pro
396
- ```
397
-
398
- ### Cost optimization
399
-
400
- When enabled (`ENABLE_COST_OPTIMIZATION=true`), the router automatically selects
401
- cheaper models for simple tasks (summarization, classification) and more capable
402
- models for complex tasks (code generation, planning).
403
-
404
- ---
405
-
406
- ## MCP Support
407
-
408
- Nimbus supports the [Model Context Protocol](https://modelcontextprotocol.io/)
409
- for extending the agent with external tools. Configure MCP servers in
410
- `.nimbus/mcp.json` (project-level) or `~/.nimbus/mcp.json` (global):
411
-
412
- ```json
413
- {
414
- "mcpServers": {
415
- "filesystem": {
416
- "command": "npx",
417
- "args": ["-y", "@modelcontextprotocol/server-filesystem", "/path/to/dir"]
418
- },
419
- "github": {
420
- "command": "npx",
421
- "args": ["-y", "@modelcontextprotocol/server-github"],
422
- "env": {
423
- "GITHUB_PERSONAL_ACCESS_TOKEN": "ghp_..."
424
- }
425
- },
426
- "remote-server": {
427
- "type": "http",
428
- "url": "https://mcp.example.com",
429
- "token": "your-auth-token"
430
- }
431
- }
432
- }
433
- ```
434
-
435
- MCP servers are discovered from three locations, searched in order:
436
-
437
- 1. `.nimbus/mcp.json` (project directory)
438
- 2. `nimbus.json` (project directory)
439
- 3. `~/.nimbus/mcp.json` (global)
440
-
441
- Servers support two transport modes: **command** (JSON-RPC over stdio) and
442
- **http** (JSON-RPC over HTTP). Tools from connected servers are automatically
443
- registered into the Nimbus tool registry and become available to the agent.
444
-
445
- ---
446
-
447
- ## Project Configuration (NIMBUS.md)
448
-
449
- Running `nimbus init` in your project directory generates a `NIMBUS.md` file
450
- that provides project-specific context to the AI agent. Nimbus auto-detects:
451
-
452
- - **Project type** -- TypeScript, JavaScript, Go, Python, Rust, Java
453
- - **Infrastructure tools** -- Terraform, Kubernetes, Helm, Docker, CI/CD
454
- pipelines
455
- - **Cloud providers** -- AWS, GCP, Azure (from config files and Terraform
456
- providers)
457
- - **Package manager** -- npm, yarn, pnpm, bun
458
- - **Test framework** -- jest, vitest, mocha, pytest, go test, cargo test
459
- - **Git repository status**
460
-
461
- The generated `NIMBUS.md` file is included in the system prompt so the agent
462
- understands your project's technology stack, conventions, and infrastructure
463
- setup.
464
-
465
- ```bash
466
- nimbus init # auto-detect and generate
467
- nimbus init --force # overwrite existing NIMBUS.md
468
- nimbus init --quiet # suppress console output
469
- ```
470
-
471
- ---
472
-
473
- ## Keyboard Shortcuts (TUI)
474
-
475
- | Shortcut | Action |
476
- | ------------- | --------------------------------------------- |
477
- | **Tab** | Cycle modes (Plan -> Build -> Deploy -> Plan) |
478
- | **Ctrl+C** | Interrupt current operation or exit |
479
- | **Escape** | Cancel current operation |
480
- | **Up / Down** | Browse input history |
481
- | **Enter** | Send message |
482
- | `/mode` | Switch mode via slash command |
483
- | `/clear` | Clear the conversation |
484
- | `/compact` | Manually trigger context compaction |
485
- | `/help` | Show available slash commands |
486
-
487
- ---
488
-
489
- ## Development
490
-
491
- ### Prerequisites
492
-
493
- - [Bun](https://bun.sh/) v1.0 or higher
494
- - Git
495
-
496
- ### Setup
497
-
498
- ```bash
499
- git clone https://github.com/the-ai-project-co/nimbus.git
500
- cd nimbus
501
- bun install
502
- ```
503
-
504
- ### Run from source
505
-
506
- ```bash
507
- # Run directly
508
- bun src/nimbus.ts
509
-
510
- # Run with arguments
511
- bun src/nimbus.ts --help
512
- bun src/nimbus.ts chat
513
- bun src/nimbus.ts ask "explain this project"
514
-
515
- # Or use the npm script
516
- bun run nimbus -- --help
517
- ```
518
-
519
- ### Test
35
+ ## Quick Start
520
36
 
521
37
  ```bash
522
- # Run all tests (693 tests)
523
- bun test src/__tests__/
524
-
525
- # Run with coverage
526
- bun test src/__tests__/ --coverage
527
-
528
- # Watch mode
529
- bun test src/__tests__/ --watch
38
+ nimbus # launches onboarding on first run, TUI on subsequent runs
530
39
  ```
531
40
 
532
- ### Lint and format
41
+ 1. **First run** — onboarding wizard walks you through provider + API key setup
42
+ 2. **Initialize your project** — `nimbus init` detects your stack and generates `NIMBUS.md`
43
+ 3. **Start asking** — describe what you want in natural language
533
44
 
534
- ```bash
535
- bun run lint
536
- bun run format
537
- bun run type-check
538
45
  ```
539
-
540
- ### Build
541
-
542
- ```bash
543
- # Build standalone binary for current platform
544
- bun src/build.ts
545
-
546
- # Build for all platforms
547
- bun src/build.ts --all
548
-
549
- # Or use the shell script
550
- ./scripts/build-binary.sh
46
+ "Run terraform plan and show me what will change"
47
+ "Check for pod restarts in the production namespace"
48
+ "Is there any infrastructure drift in my staging workspace?"
551
49
  ```
552
50
 
553
- The binary is output to `dist/nimbus` (~68 MB, bundles the Bun runtime).
51
+ If `ANTHROPIC_API_KEY` (or any [supported provider key](docs/guides/configuration.md#llm-providers)) is already set, onboarding is skipped and you go straight to the agent.
554
52
 
555
53
  ---
556
54
 
557
- ## Architecture
558
-
559
- Nimbus is a single embedded binary built with [Bun](https://bun.sh/). All
560
- functionality runs in-process -- there are no HTTP microservices, no Docker
561
- containers, and no external orchestrators. The entire application is a single
562
- TypeScript process that manages LLM routing, tool execution, state persistence,
563
- and the TUI.
55
+ ## Learn More
564
56
 
565
- ```
566
- src/
567
- nimbus.ts Entry point (shebang: #!/usr/bin/env bun)
568
- cli.ts CLI command router
569
- app.ts App lifecycle (lazy DB + LLM router init)
570
- version.ts Version and build date constants
571
-
572
- agent/ Agent loop, system prompt, permissions, modes, subagents
573
- llm/ LLM router, 11+ providers, model aliases, cost calculator
574
- tools/ Tool implementations and schemas (11 standard + 9 DevOps)
575
- state/ SQLite WAL database (16 tables at ~/.nimbus/nimbus.db)
576
- ui/ Ink/React TUI components (8 components)
577
- commands/ CLI command implementations
578
-
579
- engine/ Planner, executor, orchestrator, verifier, safety, drift, cost
580
- generator/ Terraform, Kubernetes, Helm generators with best practices
581
- enterprise/ Auth, teams, billing, audit
582
- auth/ Authentication (OAuth, SSO, credential store)
583
- hooks/ Pre/post tool-use hooks (YAML config)
584
- snapshots/ Git write-tree undo/redo
585
- audit/ Security scanner, compliance checker, cost tracker, activity log
586
- lsp/ Language server protocol (6 languages: TS, Go, Python, HCL, YAML, Docker)
587
- sessions/ Multi-session management with conflict detection
588
- sharing/ Session sharing (URL-safe IDs, 30-day TTL)
589
- mcp/ MCP client (JSON-RPC over stdio/HTTP)
590
- cli/ Non-interactive run, serve, web, init commands
591
- compat/ Runtime compatibility layer (Bun / Node.js)
592
- context/ Context database for long-term memory
593
- watcher/ Filesystem watcher for live file tracking
594
-
595
- build.ts Binary build script
596
- __tests__/ 693 tests
597
- ```
598
-
599
- ### Key design decisions
600
-
601
- - **Single process** -- No IPC overhead. LLM calls, tool execution, and state
602
- writes all happen in the same event loop.
603
- - **SQLite with WAL** -- All state (sessions, usage, audit, config, sharing) is
604
- stored in a single SQLite database at `~/.nimbus/nimbus.db` using WAL mode for
605
- concurrent read/write.
606
- - **Streaming-first** -- The agent loop streams LLM responses token-by-token
607
- through the TUI. Tool calls appear inline as they execute.
608
- - **Progressive trust** -- The three-mode system (Plan/Build/Deploy) combined
609
- with the 4-tier permission engine ensures that destructive operations always
610
- require explicit approval.
611
- - **Provider fallback** -- The LLM router tries providers in order with circuit
612
- breakers, exponential backoff, and automatic failover.
57
+ | Topic | Description |
58
+ |---|---|
59
+ | [Configuration & Providers](docs/guides/configuration.md) | LLM providers, API keys, config profiles, MCP servers |
60
+ | [Hooks & Extensibility](docs/guides/hooks.md) | Hook system, NIMBUS.md format, MCP plugins |
61
+ | [CLI Commands](docs/reference/commands.md) | Full CLI command reference with examples |
62
+ | [Tools Reference](docs/reference/tools.md) | All 33+ built-in tools with parameters |
63
+ | [Architecture](docs/architecture.md) | How Nimbus works internally, component flow, design decisions |
613
64
 
614
65
  ---
615
66
 
616
67
  ## License
617
68
 
618
69
  [MIT](LICENSE)
619
-
620
- ---
621
-
622
- ## Links
623
-
624
- - [npm Package](https://www.npmjs.com/package/@build-astron-co/nimbus)
625
- - [GitHub](https://github.com/the-ai-project-co/nimbus)
626
- - [Issues](https://github.com/the-ai-project-co/nimbus/issues)
627
- - [Releases](https://github.com/the-ai-project-co/nimbus/releases)
628
- - [Homebrew Tap](https://github.com/the-ai-project-co/homebrew-tap)
@@ -74,7 +74,7 @@ async function checkLLMProvider(options) {
74
74
  }
75
75
  }
76
76
  // Check credentials file
77
- const credentialsFile = path.join(os.homedir(), '.nimbus', 'credentials.json');
77
+ const credentialsFile = path.join(os.homedir(), '.nimbus', 'auth.json');
78
78
  let hasStoredCredentials = false;
79
79
  try {
80
80
  await fs.access(credentialsFile);
@@ -342,7 +342,7 @@ async function checkCoreServices(options) {
342
342
  });
343
343
  }
344
344
  // Check LLM credentials
345
- const credFile = path.join(os.homedir(), '.nimbus', 'credentials.json');
345
+ const credFile = path.join(os.homedir(), '.nimbus', 'auth.json');
346
346
  let llmStatus = 'not configured';
347
347
  let llmDetails;
348
348
  try {
@@ -1103,7 +1103,7 @@ export async function runStartupChecks() {
1103
1103
  const { join } = await import('node:path');
1104
1104
  const { homedir } = await import('node:os');
1105
1105
  const { readFileSync, existsSync } = await import('node:fs');
1106
- const credsFile = join(homedir(), '.nimbus', 'credentials.json');
1106
+ const credsFile = join(homedir(), '.nimbus', 'auth.json');
1107
1107
  if (existsSync(credsFile)) {
1108
1108
  const creds = JSON.parse(readFileSync(credsFile, 'utf-8'));
1109
1109
  if (Object.keys(creds.providers ?? {}).length === 0) {
@@ -265,9 +265,11 @@ async function upgradeViaHomebrew(spinner) {
265
265
  await runShellCommand(`brew upgrade ${HOMEBREW_TAP} 2>&1`);
266
266
  }
267
267
  catch {
268
- // If the tap formula isn't found, try the short name
269
- spinner.update('Trying brew upgrade nimbus...');
270
- await runShellCommand('brew upgrade nimbus 2>&1');
268
+ // If the tap formula isn't found, tap it first then retry.
269
+ // Never fall back to bare `brew upgrade nimbus` — Homebrew core has an
270
+ // unrelated deprecated cask with the same name.
271
+ spinner.update('Adding tap and retrying...');
272
+ await runShellCommand(`brew tap the-ai-project-co/tap && brew upgrade ${HOMEBREW_TAP} 2>&1`);
271
273
  }
272
274
  }
273
275
  /**
@@ -156,6 +156,7 @@ async function main() {
156
156
  'version',
157
157
  'doctor',
158
158
  'onboarding',
159
+ 'login',
159
160
  'upgrade',
160
161
  'update',
161
162
  ]);
@@ -1,3 +1,3 @@
1
- export const VERSION = '0.4.0';
1
+ export const VERSION = '0.4.2';
2
2
  const _RAW_BUILD_DATE = '__BUILD_DATE__';
3
3
  export const BUILD_DATE = _RAW_BUILD_DATE.startsWith('__') ? 'dev' : _RAW_BUILD_DATE;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@build-astron-co/nimbus",
3
- "version": "0.4.0",
3
+ "version": "0.4.2",
4
4
  "description": "AI-Powered DevOps Engineering Agent",
5
5
  "main": "dist/src/nimbus.js",
6
6
  "bin": {
@@ -11,6 +11,8 @@
11
11
  "src/",
12
12
  "dist/",
13
13
  "completions/",
14
+ "README.md",
15
+ "CHANGELOG.md",
14
16
  "package.json",
15
17
  "tsconfig.json"
16
18
  ],
@@ -702,7 +702,7 @@ describe('L8 — monorepo-aware nimbus init', () => {
702
702
  });
703
703
 
704
704
  describe('H5 — Homebrew formula version', () => {
705
- it('Homebrew formula is updated to 0.3.0 (in sibling repo)', () => {
705
+ it('Homebrew formula is updated to 0.4.1 (in sibling repo)', () => {
706
706
  const { readFileSync: rfs, existsSync: exists } = require('node:fs');
707
707
  const { join: j } = require('node:path');
708
708
  // The Homebrew tap lives in a sibling repository
@@ -712,7 +712,7 @@ describe('H5 — Homebrew formula version', () => {
712
712
  return;
713
713
  }
714
714
  const formula = rfs(formulaPath, 'utf-8') as string;
715
- expect(formula).toContain('0.4.0');
715
+ expect(formula).toContain('0.4.1');
716
716
  expect(formula).not.toContain("version \"0.2.0\"");
717
717
  });
718
718
  });
@@ -110,7 +110,7 @@ async function checkLLMProvider(options: DoctorOptions): Promise<CheckResult> {
110
110
  }
111
111
 
112
112
  // Check credentials file
113
- const credentialsFile = path.join(os.homedir(), '.nimbus', 'credentials.json');
113
+ const credentialsFile = path.join(os.homedir(), '.nimbus', 'auth.json');
114
114
  let hasStoredCredentials = false;
115
115
 
116
116
  try {
@@ -384,7 +384,7 @@ async function checkCoreServices(options: DoctorOptions): Promise<CheckResult> {
384
384
  }
385
385
 
386
386
  // Check LLM credentials
387
- const credFile = path.join(os.homedir(), '.nimbus', 'credentials.json');
387
+ const credFile = path.join(os.homedir(), '.nimbus', 'auth.json');
388
388
  let llmStatus = 'not configured';
389
389
  let llmDetails: string | undefined;
390
390
  try {
@@ -1186,7 +1186,7 @@ export async function runStartupChecks(): Promise<StartupCheckResult> {
1186
1186
  const { join } = await import('node:path');
1187
1187
  const { homedir } = await import('node:os');
1188
1188
  const { readFileSync, existsSync } = await import('node:fs');
1189
- const credsFile = join(homedir(), '.nimbus', 'credentials.json');
1189
+ const credsFile = join(homedir(), '.nimbus', 'auth.json');
1190
1190
  if (existsSync(credsFile)) {
1191
1191
  const creds = JSON.parse(readFileSync(credsFile, 'utf-8'));
1192
1192
  if (Object.keys(creds.providers ?? {}).length === 0) {
@@ -316,9 +316,11 @@ async function upgradeViaHomebrew(spinner: Spinner): Promise<void> {
316
316
  try {
317
317
  await runShellCommand(`brew upgrade ${HOMEBREW_TAP} 2>&1`);
318
318
  } catch {
319
- // If the tap formula isn't found, try the short name
320
- spinner.update('Trying brew upgrade nimbus...');
321
- await runShellCommand('brew upgrade nimbus 2>&1');
319
+ // If the tap formula isn't found, tap it first then retry.
320
+ // Never fall back to bare `brew upgrade nimbus` — Homebrew core has an
321
+ // unrelated deprecated cask with the same name.
322
+ spinner.update('Adding tap and retrying...');
323
+ await runShellCommand(`brew tap the-ai-project-co/tap && brew upgrade ${HOMEBREW_TAP} 2>&1`);
322
324
  }
323
325
  }
324
326
 
package/src/nimbus.ts CHANGED
@@ -177,6 +177,7 @@ async function main() {
177
177
  'version',
178
178
  'doctor',
179
179
  'onboarding',
180
+ 'login',
180
181
  'upgrade',
181
182
  'update',
182
183
  ]);
package/src/version.ts CHANGED
@@ -1,4 +1,4 @@
1
- export const VERSION = '0.4.0';
1
+ export const VERSION = '0.4.2';
2
2
 
3
3
  const _RAW_BUILD_DATE = '__BUILD_DATE__';
4
4
  export const BUILD_DATE = _RAW_BUILD_DATE.startsWith('__') ? 'dev' : _RAW_BUILD_DATE;