@build-astron-co/nimbus 0.4.1 → 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 CHANGED
@@ -6,95 +6,274 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/),
6
6
  and this project adheres to
7
7
  [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
8
8
 
9
- ## [1.0.0] - 2025-06-15
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
10
124
 
11
125
  ### Added
12
126
 
13
- #### Core Platform
14
-
15
- - Microservices architecture with 18 services running on Bun runtime
16
- - Core Engine Service with task management, plan generation, and execution
17
- - LLM Service with multi-provider support (Anthropic, Google, Ollama)
18
- - Generator Service for IaC code generation with questionnaire-driven workflows
19
- - State Service for configuration, history, conversations, artifacts, and
20
- templates
21
- - WebSocket support for real-time streaming on core engine, LLM, and generator
22
- services
23
-
24
- #### CLI
25
-
26
- - Interactive AI chat with syntax-highlighted code output
27
- - Terraform commands: plan, apply, destroy, import, validate, fmt, state
28
- management
29
- - Kubernetes commands: get, apply, delete, logs, exec, scale, rollout,
30
- port-forward
31
- - Helm commands: install, upgrade, uninstall, list, rollback, template, lint
32
- - Git commands: status, clone, add, commit, push, pull, branch, merge, tag
33
- - File system commands: read, write, search, tree, diff, copy, move
34
- - GitHub integration: PRs, issues, releases, Actions workflows
35
- - AI-driven Terraform generation with conversational and questionnaire modes
36
- - Infrastructure cost estimation for Terraform plans
37
- - Doctor command for dependency verification
38
- - Login/logout with device code flow authentication
39
- - Telemetry integration (opt-in) via PostHog
40
-
41
- #### Cloud Provider Support
42
-
43
- - AWS Tools Service: infrastructure discovery across 10+ services, Terraform
44
- generation
45
- - GCP Tools Service: Compute Engine, Cloud Storage, GKE, IAM, Cloud Functions,
46
- VPC operations
47
- - Azure Tools Service: VMs, Storage, AKS, IAM, Functions, Virtual Network
48
- operations
49
- - Infrastructure discovery with real-time progress streaming for all three
50
- providers
51
- - Terraform code generation from discovered cloud resources
52
-
53
- #### DevOps Tools
54
-
55
- - Git Tools Service for local repository operations via simple-git
56
- - GitHub Tools Service for GitHub API operations via Octokit (PRs, issues,
57
- Actions, releases)
58
- - Terraform Tools Service for full Terraform CLI lifecycle management
59
- - Kubernetes Tools Service for kubectl operations and cluster management
60
- - Helm Tools Service for chart and release lifecycle management
61
- - File System Tools Service with sensitive file protection
62
-
63
- #### Team and Enterprise
64
-
65
- - Auth Service with device code flow and token validation
66
- - Team Service with CRUD operations, member invitations, and role management
67
- - Billing Service with Stripe integration, subscriptions, and usage tracking
68
- - Audit Service with compliance logging, filterable queries, and CSV/JSON export
69
- - RBAC-based access control for team operations
70
-
71
- ### Security
72
-
73
- - Service-to-service authentication middleware across all services
74
- - Rate limiting on all HTTP endpoints (configurable per service)
75
- - Sensitive file protection in file system operations
76
- - Input validation and sanitization on all API routes
77
- - Stripe webhook signature verification
78
- - Credential encryption for stored cloud provider credentials
79
- - No credentials logged or persisted in plain text
80
-
81
- ### Infrastructure
82
-
83
- - Bun monorepo with workspace-based dependency management
84
- - Docker Compose configuration for local development
85
- - Dockerfiles for all services including GCP and Azure tools
86
- - CI/CD pipeline via GitHub Actions with type checking, linting, and tests
87
- - Health check endpoints on every service
88
- - Shared packages: clients, types, and utils across all services
89
-
90
- ### Developer Experience
91
-
92
- - Swagger UI documentation on all tool services (`/swagger`)
93
- - OpenAPI 3.0 specs served at `/api/openapi.json` on each service
94
- - README documentation for every service
95
- - Distributed tracing support via shared tracing utility
96
- - Event bus for inter-service communication
97
- - Shared REST client with service discovery
98
- - Consistent error response format across all services
99
- (`{ success, data/error }`)
100
- - Start-all script for launching the full platform locally
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
@@ -6,605 +6,64 @@
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
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-1408%20passing-brightgreen.svg)](https://github.com/the-ai-project-co/nimbus/actions)
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 via Homebrew
87
- brew tap the-ai-project-co/tap
88
- brew install nimbus
89
-
90
- # Set up authentication
91
- nimbus login
92
-
93
- # Start the interactive AI agent
94
- nimbus
95
- ```
96
-
97
- On first run, Nimbus launches an onboarding flow that walks you through provider
98
- selection and API key configuration. After that, running `nimbus` drops you into
99
- the interactive chat.
100
-
101
- ---
102
-
103
- ## Installation
104
-
105
- ### npm (recommended)
17
+ ## Install
106
18
 
107
19
  ```bash
20
+ # npm
108
21
  npm install -g @build-astron-co/nimbus
109
- ```
110
22
 
111
- Works with Node.js >= 18. Uses `better-sqlite3` as the SQLite backend.
112
-
113
- ### Homebrew (macOS / Linux)
114
-
115
- ```bash
23
+ # Homebrew (use the fully-qualified tap name to avoid name conflicts)
116
24
  brew tap the-ai-project-co/tap
117
- brew install nimbus
118
- ```
119
-
120
- ### Shell script (auto-detects best method)
25
+ brew install the-ai-project-co/tap/nimbus
121
26
 
122
- ```bash
27
+ # Shell script (auto-detects best method)
123
28
  curl -fsSL https://raw.githubusercontent.com/the-ai-project-co/nimbus/main/scripts/install.sh | bash
124
29
  ```
125
30
 
126
- ### Compiled binary (direct download)
127
-
128
- Pre-built standalone binaries for macOS, Linux, and Windows are available on the
129
- [GitHub Releases](https://github.com/the-ai-project-co/nimbus/releases) page.
130
- Standalone binaries bundle the Bun runtime (~68 MB), so no extra dependencies
131
- are needed.
132
-
133
- > Note: compiled binaries use the readline chat interface. Install via Bun or
134
- > npm for the full Ink TUI.
135
-
136
- ---
137
-
138
- ## Getting Started
139
-
140
- ### First run / onboarding
141
-
142
- ```bash
143
- nimbus
144
- ```
145
-
146
- The first time you run Nimbus, it launches an interactive onboarding that helps
147
- you select an LLM provider and configure your API key. Credentials are stored in
148
- `~/.nimbus/auth.json`.
149
-
150
- ### Setting up providers
151
-
152
- You can configure providers through onboarding or by setting environment
153
- variables directly:
154
-
155
- ```bash
156
- export ANTHROPIC_API_KEY="sk-ant-..."
157
- ```
158
-
159
- Or log in interactively:
160
-
161
- ```bash
162
- nimbus login
163
- ```
164
-
165
- ### Initialize a project
166
-
167
- ```bash
168
- nimbus init
169
- ```
170
-
171
- This detects your project type (TypeScript, Go, Python, Rust, Java, JavaScript),
172
- infrastructure tooling (Terraform, Kubernetes, Helm, Docker, CI/CD), and cloud
173
- providers (AWS, GCP, Azure), then generates a `NIMBUS.md` file with project
174
- context that Nimbus uses to tailor its responses.
175
-
176
- ### Interactive chat
177
-
178
- ```bash
179
- nimbus chat
180
- ```
181
-
182
- Or just `nimbus` -- it launches the Ink TUI with the full agent loop, tool
183
- execution, and streaming responses.
184
-
185
- ### Non-interactive mode
186
-
187
- ```bash
188
- nimbus run "Create a Terraform module for an S3 bucket with versioning and encryption"
189
- nimbus run "Fix the failing test in src/__tests__/router.test.ts" --auto-approve
190
- nimbus run "Explain the architecture of this project" --format json
191
- ```
192
-
193
- ### One-off questions
194
-
195
- ```bash
196
- nimbus ask "How do I set up an S3 bucket with versioning?"
197
- ```
198
-
199
- ### Check your environment
200
-
201
- ```bash
202
- nimbus doctor
203
- ```
204
-
205
- Verifies that required tools (git, terraform, kubectl, helm, cloud CLIs) are
206
- available and that provider credentials are configured.
207
-
208
- ---
209
-
210
- ## Commands
211
-
212
- ### Chat and AI
213
-
214
- | Command | Description |
215
- | ----------------------- | ----------------------------------------- |
216
- | `nimbus` | Launch interactive chat (default) |
217
- | `nimbus chat` | Interactive AI chat session |
218
- | `nimbus run "prompt"` | Non-interactive mode with a single prompt |
219
- | `nimbus ask "question"` | Ask a one-off question |
220
- | `nimbus explain <file>` | Explain a file or code snippet |
221
- | `nimbus fix <file>` | Analyze and fix issues in a file |
222
- | `nimbus analyze` | Analyze the current project |
223
-
224
- ### Configuration
225
-
226
- | Command | Description |
227
- | ---------------- | ------------------------------------------------------ |
228
- | `nimbus init` | Initialize a project (detect type, generate NIMBUS.md) |
229
- | `nimbus config` | View or set configuration |
230
- | `nimbus login` | Authenticate with an LLM provider |
231
- | `nimbus logout` | Remove stored credentials |
232
- | `nimbus auth` | Manage authentication |
233
- | `nimbus doctor` | Check environment and provider status |
234
- | `nimbus upgrade` | Self-update to the latest version |
235
-
236
- ### Infrastructure Generation
237
-
238
- | Command | Description |
239
- | --------------------------- | ------------------------------------------------------- |
240
- | `nimbus generate terraform` | Generate Terraform configurations from natural language |
241
- | `nimbus generate k8s` | Generate Kubernetes manifests |
242
- | `nimbus generate helm` | Generate Helm charts |
243
-
244
- ### Cloud Providers
245
-
246
- | Command | Description |
247
- | ------------------------ | -------------------------------------- |
248
- | `nimbus aws <service>` | AWS operations (S3, EC2, Lambda, etc.) |
249
- | `nimbus gcp <service>` | Google Cloud operations |
250
- | `nimbus azure <service>` | Azure operations |
251
-
252
- ### Infrastructure Management
253
-
254
- | Command | Description |
255
- | ----------------------------------------------------- | -------------------------------------- |
256
- | `nimbus tf init/plan/apply/validate/destroy/fmt` | Terraform operations |
257
- | `nimbus k8s get/apply/delete/logs/scale/exec` | Kubernetes operations |
258
- | `nimbus helm list/install/upgrade/uninstall/rollback` | Helm operations |
259
- | `nimbus cost estimate/history` | Cost estimation and tracking |
260
- | `nimbus drift detect/fix` | Configuration drift detection |
261
- | `nimbus preview` | Deploy preview (blast radius analysis) |
262
-
263
- ### Git and Files
264
-
265
- | Command | Description |
266
- | ----------------------------------------------- | ---------------------- |
267
- | `nimbus git status/add/commit/push/merge/stash` | Git operations |
268
- | `nimbus fs read/write/list/search` | File system operations |
269
-
270
- ### GitHub
271
-
272
- | Command | Description |
273
- | ---------------------------------------- | ----------------------- |
274
- | `nimbus gh pr list/create/view/merge` | Pull request operations |
275
- | `nimbus gh issue list/create/view/close` | Issue operations |
276
- | `nimbus gh repo view/clone` | Repository operations |
277
-
278
- ### Enterprise
279
-
280
- | Command | Description |
281
- | ---------------- | ----------------------------------- |
282
- | `nimbus team` | Team management |
283
- | `nimbus billing` | Billing and subscription management |
284
- | `nimbus usage` | Usage statistics and token tracking |
285
- | `nimbus audit` | Audit logs and compliance reports |
286
-
287
- ### Server
288
-
289
- | Command | Description |
290
- | -------------- | -------------------------------------------------- |
291
- | `nimbus serve` | Start the HTTP API server (Elysia, SSE streaming) |
292
- | `nimbus web` | Start the API server and open the browser-based UI |
293
-
294
- ### Utilities
295
-
296
- | Command | Description |
297
- | ----------------------- | ----------------------------------- |
298
- | `nimbus version` | Print version and build date |
299
- | `nimbus help` | Show help for all commands |
300
- | `nimbus help <command>` | Show help for a specific command |
301
- | `nimbus doctor` | Verify environment and dependencies |
302
- | `nimbus upgrade` | Update Nimbus to the latest version |
303
-
304
- Run `nimbus help` for the full command list, or `nimbus help <command>` for
305
- details on any command.
306
-
307
- ---
308
-
309
- ## Modes
310
-
311
- Nimbus uses a three-mode system that controls which tools are available,
312
- enforcing a progressive trust model. Switching modes resets the permission
313
- session so that previously approved tools require re-approval.
314
-
315
- ### Plan mode
316
-
317
- Read-only exploration and analysis. The agent can read files, search codebases,
318
- estimate costs, detect drift, and propose changes -- but it cannot modify
319
- anything.
320
-
321
- **Available tools:** `read_file`, `glob`, `grep`, `list_dir`, `webfetch`,
322
- `cost_estimate`, `drift_detect`, `todo_read`, `todo_write`, `cloud_discover`
323
-
324
- ### Build mode (default)
325
-
326
- Everything in Plan, plus file editing, shell access, git operations, and
327
- non-destructive DevOps commands. The agent can generate Terraform configs, write
328
- Kubernetes manifests, and validate them, but it cannot apply changes to live
329
- infrastructure.
330
-
331
- **Additional tools:** `edit_file`, `multi_edit`, `write_file`, `bash`, `git`,
332
- `task`, `deploy_preview`, `terraform` (validate/fmt/plan only), `kubectl`
333
- (get/describe only), `helm` (list/status/template only)
334
-
335
- ### Deploy mode
336
-
337
- Full access to all 20 tools, including infrastructure-mutating operations.
338
- Destructive actions still go through the permission engine and require explicit
339
- user approval.
340
-
341
- **Additional tools:** All terraform subcommands (apply, destroy), all kubectl
342
- subcommands (apply, delete), all helm subcommands (install, upgrade, uninstall)
343
-
344
- Switch modes in the TUI by pressing **Tab**, or use the `/mode` slash command.
345
-
346
- ---
347
-
348
- ## LLM Providers
349
-
350
- Nimbus routes requests through an intelligent LLM router with automatic
351
- fallback, cost optimization, circuit breaking, and retry with exponential
352
- backoff.
353
-
354
- | Provider | Environment Variable(s) | Notes |
355
- | ------------ | ------------------------------ | ------------------------------------------------------ |
356
- | Anthropic | `ANTHROPIC_API_KEY` | Claude models (Sonnet, Opus, Haiku). Default provider. |
357
- | OpenAI | `OPENAI_API_KEY` | GPT-4o, GPT-4, GPT-3.5 |
358
- | Google | `GOOGLE_API_KEY` | Gemini models |
359
- | AWS Bedrock | `AWS_REGION` + IAM credentials | Claude, Llama, and others via AWS |
360
- | Ollama | `OLLAMA_BASE_URL` (optional) | Local models, no API key needed |
361
- | Groq | `GROQ_API_KEY` | Fast inference (Llama, Mixtral) |
362
- | DeepSeek | `DEEPSEEK_API_KEY` | DeepSeek models |
363
- | OpenRouter | `OPENROUTER_API_KEY` | Multi-model proxy, access 100+ models |
364
- | Together AI | `TOGETHER_API_KEY` | Llama, Mixtral, and more |
365
- | Fireworks AI | `FIREWORKS_API_KEY` | Fast open-source model inference |
366
- | Perplexity | `PERPLEXITY_API_KEY` | Online search-augmented models |
367
-
368
- Any OpenAI-compatible endpoint can be added via the `OpenAICompatibleProvider`
369
- class.
370
-
371
- You can also configure providers through `nimbus login`, which stores
372
- credentials in `~/.nimbus/auth.json`. The router checks `auth.json` first, then
373
- falls back to environment variables.
374
-
375
- ### Model aliases
376
-
377
- Nimbus supports short aliases for common models:
378
-
379
- ```bash
380
- nimbus chat --model sonnet # resolves to claude-sonnet-4-20250514
381
- nimbus chat --model opus # resolves to claude-opus-4-20250514
382
- nimbus chat --model gpt4o # resolves to gpt-4o
383
- nimbus chat --model gemini # resolves to gemini-pro
384
- ```
385
-
386
- ### Cost optimization
387
-
388
- When enabled (`ENABLE_COST_OPTIMIZATION=true`), the router automatically selects
389
- cheaper models for simple tasks (summarization, classification) and more capable
390
- models for complex tasks (code generation, planning).
391
-
392
- ---
393
-
394
- ## MCP Support
395
-
396
- Nimbus supports the [Model Context Protocol](https://modelcontextprotocol.io/)
397
- for extending the agent with external tools. Configure MCP servers in
398
- `.nimbus/mcp.json` (project-level) or `~/.nimbus/mcp.json` (global):
399
-
400
- ```json
401
- {
402
- "mcpServers": {
403
- "filesystem": {
404
- "command": "npx",
405
- "args": ["-y", "@modelcontextprotocol/server-filesystem", "/path/to/dir"]
406
- },
407
- "github": {
408
- "command": "npx",
409
- "args": ["-y", "@modelcontextprotocol/server-github"],
410
- "env": {
411
- "GITHUB_PERSONAL_ACCESS_TOKEN": "ghp_..."
412
- }
413
- },
414
- "remote-server": {
415
- "type": "http",
416
- "url": "https://mcp.example.com",
417
- "token": "your-auth-token"
418
- }
419
- }
420
- }
421
- ```
422
-
423
- MCP servers are discovered from three locations, searched in order:
424
-
425
- 1. `.nimbus/mcp.json` (project directory)
426
- 2. `nimbus.json` (project directory)
427
- 3. `~/.nimbus/mcp.json` (global)
428
-
429
- Servers support two transport modes: **command** (JSON-RPC over stdio) and
430
- **http** (JSON-RPC over HTTP). Tools from connected servers are automatically
431
- registered into the Nimbus tool registry and become available to the agent.
432
-
433
- ---
434
-
435
- ## Project Configuration (NIMBUS.md)
436
-
437
- Running `nimbus init` in your project directory generates a `NIMBUS.md` file
438
- that provides project-specific context to the AI agent. Nimbus auto-detects:
439
-
440
- - **Project type** -- TypeScript, JavaScript, Go, Python, Rust, Java
441
- - **Infrastructure tools** -- Terraform, Kubernetes, Helm, Docker, CI/CD
442
- pipelines
443
- - **Cloud providers** -- AWS, GCP, Azure (from config files and Terraform
444
- providers)
445
- - **Package manager** -- npm, yarn, pnpm, bun
446
- - **Test framework** -- jest, vitest, mocha, pytest, go test, cargo test
447
- - **Git repository status**
448
-
449
- The generated `NIMBUS.md` file is included in the system prompt so the agent
450
- understands your project's technology stack, conventions, and infrastructure
451
- setup.
452
-
453
- ```bash
454
- nimbus init # auto-detect and generate
455
- nimbus init --force # overwrite existing NIMBUS.md
456
- nimbus init --quiet # suppress console output
457
- ```
458
-
459
- ---
460
-
461
- ## Keyboard Shortcuts (TUI)
462
-
463
- | Shortcut | Action |
464
- | ------------- | --------------------------------------------- |
465
- | **Tab** | Cycle modes (Plan -> Build -> Deploy -> Plan) |
466
- | **Ctrl+C** | Interrupt current operation or exit |
467
- | **Escape** | Cancel current operation |
468
- | **Up / Down** | Browse input history |
469
- | **Enter** | Send message |
470
- | `/mode` | Switch mode via slash command |
471
- | `/clear` | Clear the conversation |
472
- | `/compact` | Manually trigger context compaction |
473
- | `/help` | Show available slash commands |
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.
474
32
 
475
33
  ---
476
34
 
477
- ## Development
478
-
479
- ### Prerequisites
480
-
481
- - Node.js >= 18
482
- - Git
483
-
484
- ### Setup
485
-
486
- ```bash
487
- git clone https://github.com/the-ai-project-co/nimbus.git
488
- cd nimbus
489
- npm install
490
- ```
491
-
492
- ### Run from source
493
-
494
- ```bash
495
- # Run directly
496
- npm run nimbus
497
-
498
- # Run with arguments
499
- npm run nimbus -- --help
500
- npm run nimbus -- chat
501
- npm run nimbus -- ask "explain this project"
502
- ```
503
-
504
- ### Test
35
+ ## Quick Start
505
36
 
506
37
  ```bash
507
- # Run all tests (1408 tests)
508
- npm test
509
-
510
- # Run with coverage
511
- npm run test:coverage
512
-
513
- # Watch mode
514
- npm run test:watch
38
+ nimbus # launches onboarding on first run, TUI on subsequent runs
515
39
  ```
516
40
 
517
- ### 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
518
44
 
519
- ```bash
520
- npm run lint
521
- npm run format
522
- npm run type-check
523
45
  ```
524
-
525
- ### Build
526
-
527
- ```bash
528
- # Build standalone binary for current platform
529
- ./scripts/build-binary.sh
530
-
531
- # Or
532
- npm run build
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?"
533
49
  ```
534
50
 
535
- 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.
536
52
 
537
53
  ---
538
54
 
539
- ## Architecture
540
-
541
- Nimbus runs on Node.js >= 18 (with optional Bun support for compiled binaries).
542
- All functionality runs in-process -- there are no HTTP microservices, no Docker
543
- containers, and no external orchestrators. The entire application is a single
544
- TypeScript process that manages LLM routing, tool execution, state persistence,
545
- and the TUI.
55
+ ## Learn More
546
56
 
547
- ```
548
- src/
549
- nimbus.ts Entry point (shebang: #!/usr/bin/env node via tsx)
550
- cli.ts CLI command router
551
- app.ts App lifecycle (lazy DB + LLM router init)
552
- version.ts Version and build date constants
553
-
554
- agent/ Agent loop, system prompt, permissions, modes, subagents
555
- llm/ LLM router, 11+ providers, model aliases, cost calculator
556
- tools/ Tool implementations and schemas (11 standard + 9 DevOps)
557
- state/ SQLite WAL database (16 tables at ~/.nimbus/nimbus.db)
558
- ui/ Ink/React TUI components (8 components)
559
- commands/ CLI command implementations
560
-
561
- engine/ Planner, executor, orchestrator, verifier, safety, drift, cost
562
- generator/ Terraform, Kubernetes, Helm generators with best practices
563
- enterprise/ Auth, teams, billing, audit
564
- auth/ Authentication (OAuth, SSO, credential store)
565
- hooks/ Pre/post tool-use hooks (YAML config)
566
- snapshots/ Git write-tree undo/redo
567
- audit/ Security scanner, compliance checker, cost tracker, activity log
568
- lsp/ Language server protocol (6 languages: TS, Go, Python, HCL, YAML, Docker)
569
- sessions/ Multi-session management with conflict detection
570
- sharing/ Session sharing (URL-safe IDs, 30-day TTL)
571
- mcp/ MCP client (JSON-RPC over stdio/HTTP)
572
- cli/ Non-interactive run, serve, web, init commands
573
- compat/ Runtime compatibility layer (Bun / Node.js)
574
- context/ Context database for long-term memory
575
- watcher/ Filesystem watcher for live file tracking
576
-
577
- build.ts Binary build script
578
- __tests__/ 1408 tests
579
- ```
580
-
581
- ### Key design decisions
582
-
583
- - **Single process** -- No IPC overhead. LLM calls, tool execution, and state
584
- writes all happen in the same event loop.
585
- - **SQLite with WAL** -- All state (sessions, usage, audit, config, sharing) is
586
- stored in a single SQLite database at `~/.nimbus/nimbus.db` using WAL mode for
587
- concurrent read/write.
588
- - **Streaming-first** -- The agent loop streams LLM responses token-by-token
589
- through the TUI. Tool calls appear inline as they execute.
590
- - **Progressive trust** -- The three-mode system (Plan/Build/Deploy) combined
591
- with the 4-tier permission engine ensures that destructive operations always
592
- require explicit approval.
593
- - **Provider fallback** -- The LLM router tries providers in order with circuit
594
- 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 |
595
64
 
596
65
  ---
597
66
 
598
67
  ## License
599
68
 
600
69
  [MIT](LICENSE)
601
-
602
- ---
603
-
604
- ## Links
605
-
606
- - [npm Package](https://www.npmjs.com/package/@build-astron-co/nimbus)
607
- - [GitHub](https://github.com/the-ai-project-co/nimbus)
608
- - [Issues](https://github.com/the-ai-project-co/nimbus/issues)
609
- - [Releases](https://github.com/the-ai-project-co/nimbus/releases)
610
- - [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.1';
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.1",
3
+ "version": "0.4.2",
4
4
  "description": "AI-Powered DevOps Engineering Agent",
5
5
  "main": "dist/src/nimbus.js",
6
6
  "bin": {
@@ -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.1';
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;