nvicode 0.1.2 → 0.1.6
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/README.md +37 -19
- package/dist/cli.js +393 -55
- package/dist/config.js +64 -12
- package/dist/models.js +30 -5
- package/dist/proxy.js +255 -116
- package/dist/usage.js +146 -0
- package/package.json +2 -2
package/README.md
CHANGED
|
@@ -1,6 +1,13 @@
|
|
|
1
|
-
#
|
|
1
|
+
# Navicode - one click Nvidia NIM to Claude code connection
|
|
2
2
|
|
|
3
|
-
Run Claude Code through NVIDIA-hosted models using a
|
|
3
|
+
Run Claude Code through NVIDIA-hosted models or OpenRouter using a simple CLI wrapper.
|
|
4
|
+
Use top open-source model APIs on NVIDIA Build for free, with `nvicode` paced to `40 RPM` by default.
|
|
5
|
+
|
|
6
|
+
Supported environments:
|
|
7
|
+
- macOS
|
|
8
|
+
- Ubuntu/Linux
|
|
9
|
+
- WSL
|
|
10
|
+
- Native Windows with Claude Code installed and working from PowerShell, CMD, or Git Bash
|
|
4
11
|
|
|
5
12
|
## Quickstart
|
|
6
13
|
|
|
@@ -10,19 +17,16 @@ Install the published package:
|
|
|
10
17
|
npm install -g nvicode
|
|
11
18
|
```
|
|
12
19
|
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
```sh
|
|
16
|
-
nvicode auth
|
|
17
|
-
```
|
|
20
|
+
Set up provider, key, and model:
|
|
18
21
|
|
|
19
|
-
|
|
22
|
+
- NVIDIA: get a free key from [NVIDIA Build API Keys](https://build.nvidia.com/settings/api-keys)
|
|
23
|
+
- OpenRouter: use your OpenRouter API key
|
|
20
24
|
|
|
21
25
|
```sh
|
|
22
26
|
nvicode select model
|
|
23
27
|
```
|
|
24
28
|
|
|
25
|
-
Launch Claude Code through
|
|
29
|
+
Launch Claude Code through your selected provider:
|
|
26
30
|
|
|
27
31
|
```sh
|
|
28
32
|
nvicode launch claude
|
|
@@ -30,37 +34,50 @@ nvicode launch claude
|
|
|
30
34
|
|
|
31
35
|
## Screenshots
|
|
32
36
|
|
|
33
|
-
###
|
|
37
|
+
### Save your API key
|
|
34
38
|
|
|
35
|
-

|
|
36
40
|
|
|
37
|
-
###
|
|
41
|
+
### Choose a model
|
|
38
42
|
|
|
39
|
-

|
|
40
44
|
|
|
41
|
-
###
|
|
45
|
+
### Launch Claude Code through your selected provider
|
|
42
46
|
|
|
43
|
-

|
|
44
48
|
|
|
45
49
|
## Commands
|
|
46
50
|
|
|
47
51
|
Useful commands:
|
|
48
52
|
|
|
49
53
|
```sh
|
|
54
|
+
nvicode dashboard
|
|
55
|
+
nvicode usage
|
|
56
|
+
nvicode activity
|
|
50
57
|
nvicode models
|
|
51
58
|
nvicode config
|
|
52
59
|
nvicode auth
|
|
53
60
|
nvicode launch claude -p "Reply with exactly OK"
|
|
54
61
|
```
|
|
55
62
|
|
|
56
|
-
|
|
63
|
+
Provider behavior:
|
|
64
|
+
- NVIDIA: starts a local proxy on `127.0.0.1:8788`, points Claude Code at it with `ANTHROPIC_BASE_URL`, and forwards requests to NVIDIA `chat/completions`.
|
|
65
|
+
- OpenRouter: points Claude Code directly at `https://openrouter.ai/api` using OpenRouter credentials and Anthropic-compatible model ids.
|
|
66
|
+
|
|
67
|
+
In an interactive terminal, `nvicode usage` refreshes live every 2 seconds. When piped or redirected, it prints a single snapshot.
|
|
57
68
|
|
|
58
|
-
|
|
69
|
+
`nvicode select model` now asks for provider, optional API key update, and model choice in one guided flow.
|
|
70
|
+
If no API key is saved for the active provider yet, `nvicode` prompts for one on first use.
|
|
71
|
+
By default, the proxy paces upstream NVIDIA requests at `40 RPM`. Override that with `NVICODE_MAX_RPM` if your account has a different limit.
|
|
72
|
+
The usage dashboard compares your local NVIDIA run cost against Claude Opus 4.6 at `$5 / MTok input` and `$25 / MTok output`, based on Anthropic pricing as of `2026-03-30`.
|
|
73
|
+
If your NVIDIA endpoint is not free, override local cost estimates with `NVICODE_INPUT_USD_PER_MTOK` and `NVICODE_OUTPUT_USD_PER_MTOK`.
|
|
74
|
+
Local `usage`, `activity`, and `dashboard` commands are available for NVIDIA proxy sessions. OpenRouter sessions use OpenRouter's direct connection path instead.
|
|
59
75
|
|
|
60
76
|
## Requirements
|
|
61
77
|
|
|
62
78
|
- Claude Code must already be installed on the machine.
|
|
63
79
|
- Node.js 20 or newer is required to install `nvicode`.
|
|
80
|
+
- On native Windows, Claude Code itself requires Git for Windows. See the [Claude Code setup docs](https://code.claude.com/docs/en/setup).
|
|
64
81
|
|
|
65
82
|
## Local Development
|
|
66
83
|
|
|
@@ -69,11 +86,12 @@ These steps are only for contributors working from a git checkout. End users do
|
|
|
69
86
|
```sh
|
|
70
87
|
npm install
|
|
71
88
|
npm run build
|
|
72
|
-
|
|
89
|
+
npm link
|
|
73
90
|
```
|
|
74
91
|
|
|
75
92
|
## Notes
|
|
76
93
|
|
|
77
94
|
- `thinking` is disabled by default because some NVIDIA reasoning models can consume the entire output budget and return no visible answer to Claude Code.
|
|
78
95
|
- The proxy supports basic text, tool calls, tool results, and token count estimation.
|
|
79
|
-
-
|
|
96
|
+
- The proxy includes upstream request pacing and retries on NVIDIA `429` responses.
|
|
97
|
+
- Claude Code remains the frontend; the selected provider/model becomes the backend.
|