Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
16 commits
Select commit Hold shift + click to select a range
a249b1c
feat: add `codevhub doctor` to check the environment before installing
quickbeard Jul 28, 2026
e423b51
docs: trim the Node-floor rationale and drop the doctor section from …
quickbeard Jul 28, 2026
7357333
fix: stop `doctor` reporting a healthy backend as unreachable
quickbeard Jul 28, 2026
9555a5b
fix: give `doctor`'s LLM checks the gateway URL instead of the instal…
quickbeard Jul 28, 2026
288c6ce
fix: reject a bare port at the proxy prompt instead of coercing it to…
quickbeard Jul 29, 2026
9af121c
feat: always offer the proxy prompt, and show examples of what to type
quickbeard Jul 29, 2026
f4c0e3c
test: pin the proxy examples on the already-configured variant too
quickbeard Jul 29, 2026
4a257c6
test: spell out the command the proxy retry actually runs
quickbeard Jul 29, 2026
7f5a661
test: inventory every command `codevhub doctor` spawns
quickbeard Jul 29, 2026
78b3dcd
feat: always write ~/.codev-hub/doctor-report.json
quickbeard Jul 29, 2026
cb5ba0d
feat: show the commands `codevhub doctor` actually ran
quickbeard Jul 29, 2026
8825b39
feat: show the endpoints doctor contacted, not just the npm commands
quickbeard Jul 29, 2026
c41d160
feat: show what each check ran, under that check
quickbeard Jul 29, 2026
215c008
feat: report every proxy/TLS variable that is set, and which proxy ea…
quickbeard Jul 29, 2026
4f09401
feat: always show the core proxy/TLS variables, set or not
quickbeard Jul 29, 2026
8c00b8d
fix: handle case-insensitive environment variables on Windows
quickbeard Jul 29, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
54 changes: 52 additions & 2 deletions AGENTS.md

Large diffs are not rendered by default.

64 changes: 63 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

CoDev — AI Coding Agent Hub. Install, configure, and manage multiple AI coding agents.

Requires Node.js ≥ 22.5 (Node 24+ recommended).
Requires Node.js ≥ 22.21 (Node 24+ recommended).

## Install

Expand All @@ -13,11 +13,73 @@ npm install -g codev-ai
Then run:

```bash
codevhub doctor # check your environment and network first
codevhub install
```

After install, go to your project and type `codev`, `claude`, `codex`, or `opencode` to launch.

## Check your setup first: `codevhub doctor`

On a corporate network — behind a proxy, a TLS-inspecting gateway, or an
internal npm mirror — run this before `codevhub install`:

```bash
codevhub doctor
codevhub doctor --force # also force a real sign-in instead of reusing the cached session
```

It is read-only (it installs and configures nothing) and checks, in order:

- **Environment** — Node version, npm, the global npm prefix (on `PATH` and
writable), the npm registry/proxy configuration, your proxy and TLS
environment variables, and whether the OS certificate store is readable.
- **Network** — the CoDev backend and the npm registry are actually reachable.
- **Account** — sign-in, gateway API key, CoDev configuration, and Supabase
(used by `codevhub upload`).
- **LLM access** — the key is valid, models are listable, and a real one-token
completion succeeds. Only the last of these proves inference is permitted;
`/key/info` and `/v1/models` both pass for a key that is then 403'd on every
completion.
- **This machine** — what is already installed, configured, and backed up.

Failures expand in place into what happened, the most likely cause given your
proxy and TLS settings, the fix, and the raw error chain — never a bare
`fetch failed`. If the network checks fail it offers to re-run everything
through a proxy you type in (nothing is written to disk), so you see the fix
work before it prints the exact `export` / `setx` commands to make it permanent.

Exit code is 0 when nothing failed — warnings do not fail it — and 1 otherwise.

Every run also writes a machine-readable report to
**`~/.codev-hub/doctor-report.json`**, replacing the previous one. It holds the
full results, diagnoses, your Node and proxy environment, and the suggested next
steps — attach it to a support ticket rather than pasting screenshots. Secrets
are scrubbed before it is written. The same results additionally land in the
diagnostic log, so `codevhub logs` can replay a whole run.

### Working behind a proxy

Node does **not** honor `HTTP_PROXY`/`HTTPS_PROXY` on its own — it needs
`NODE_USE_ENV_PROXY=1`, read at startup. CoDev applies that for you when it sees
a proxy configured, but it is worth setting permanently:

```bash
export HTTP_PROXY=http://<PROXY-IP>:<PROXY-PORT>
export HTTPS_PROXY=http://<PROXY-IP>:<PROXY-PORT>
export NODE_USE_ENV_PROXY=1
export NODE_USE_SYSTEM_CA=1
```

Two traps `codevhub doctor` will catch for you:

- **`NO_PROXY` covering the CoDev backend** (for example a blanket
`*.viettel.vn`) routes sign-in traffic *around* the proxy and straight into
the firewall. This is the usual cause of `Login failed`.
- **npm keeps its own proxy and TLS configuration**, separate from these
variables — `npm config set proxy`, `https-proxy`, `cafile`, `registry`. A
working `codevhub` says nothing about whether `npm i -g` will work.

## CodeGraph integration

When you run `codevhub install` or `codevhub config`, CoDev also installs [CodeGraph](https://github.com/colbymchenry/codegraph) — a local, MCP-based, pre-indexed code-knowledge-graph tool — and wires it into each agent you select (Claude Code, Codex, OpenCode, etc.). Because your codebase is pre-indexed, agents can look up symbols, references, and structure straight from the graph instead of repeatedly grepping and reading files to find their way around. That means **fewer tool calls and fewer tokens** per task — the agent spends its context on the work rather than on rediscovering the codebase.
Expand Down
3 changes: 2 additions & 1 deletion README.npm.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

CoDev — AI Coding Agent Hub. Install, configure, and manage multiple AI coding agents.

Requires Node.js ≥ 22.5 (Node 24+ recommended).
Requires Node.js ≥ 22.21 (Node 24+ recommended).

## Install

Expand All @@ -13,6 +13,7 @@ npm install -g codev-ai
Then run:

```bash
codevhub doctor # check your environment and network first
codevhub install
```

Expand Down
3 changes: 3 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,9 @@
"dist"
],
"packageManager": "pnpm@10.26.0",
"engines": {
"node": ">=22.21.0"
},
"scripts": {
"dev": "tsx src/index.tsx",
"build": "tsx build.ts",
Expand Down
Loading
Loading