@thejeetsingh/kalcode 2.2.0 → 2.2.1
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 +89 -89
- package/dist/src/constants.d.ts +1 -1
- package/dist/src/constants.js +1 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -1,138 +1,138 @@
|
|
|
1
|
-
#
|
|
1
|
+
# Kalcode
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
Kalcode is a terminal-native coding assistant powered by NVIDIA NIM.
|
|
4
4
|
|
|
5
|
-
|
|
5
|
+
It supports both Node.js and Bun runtimes, includes a Claude-style TUI, and can run with:
|
|
6
|
+
- your own NVIDIA API key, or
|
|
7
|
+
- the hosted proxy endpoint (`https://kalcode.vercel.app`) with zero client setup.
|
|
6
8
|
|
|
7
|
-
|
|
9
|
+
## Installation
|
|
8
10
|
|
|
9
|
-
|
|
10
|
-
npm i -g @thejeetsingh/kalcode
|
|
11
|
-
```
|
|
11
|
+
### npm (recommended)
|
|
12
12
|
|
|
13
|
-
Run
|
|
13
|
+
Run directly:
|
|
14
14
|
|
|
15
15
|
```bash
|
|
16
|
-
npx @thejeetsingh/kalcode
|
|
16
|
+
npx @thejeetsingh/kalcode
|
|
17
17
|
```
|
|
18
18
|
|
|
19
|
-
|
|
19
|
+
Install globally:
|
|
20
20
|
|
|
21
21
|
```bash
|
|
22
|
-
|
|
22
|
+
npm install -g @thejeetsingh/kalcode
|
|
23
|
+
kalcode
|
|
23
24
|
```
|
|
24
25
|
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
1. Login:
|
|
26
|
+
### Bun
|
|
28
27
|
|
|
29
28
|
```bash
|
|
30
|
-
|
|
29
|
+
bunx @thejeetsingh/kalcode
|
|
31
30
|
```
|
|
32
31
|
|
|
33
|
-
|
|
32
|
+
## Quick Start
|
|
34
33
|
|
|
35
34
|
```bash
|
|
36
|
-
|
|
35
|
+
kalcode "review the repository and suggest improvements"
|
|
37
36
|
```
|
|
38
37
|
|
|
39
|
-
|
|
38
|
+
By default, Kalcode can use the hosted proxy.
|
|
39
|
+
If you want to use your own provider key locally:
|
|
40
40
|
|
|
41
41
|
```bash
|
|
42
|
-
|
|
42
|
+
kalcode --set-key
|
|
43
43
|
```
|
|
44
44
|
|
|
45
|
-
|
|
45
|
+
## Configuration
|
|
46
46
|
|
|
47
|
-
|
|
48
|
-
npm view @thejeetsingh/kalcode version
|
|
49
|
-
```
|
|
50
|
-
|
|
51
|
-
## Deployment and Secrets
|
|
47
|
+
### Environment Variables
|
|
52
48
|
|
|
53
|
-
-
|
|
54
|
-
-
|
|
55
|
-
-
|
|
56
|
-
- TLS verification is on by default. Do not disable it in production.
|
|
57
|
-
- `KALCODE_INSECURE_TLS=1` is available only as a local debugging escape hatch.
|
|
49
|
+
- `NVIDIA_NIM_KEY`: NVIDIA NIM API key (server-side for proxy deployments, optional on clients if proxy is used)
|
|
50
|
+
- `KALCODE_PROXY_URL`: Optional override for custom proxy URL
|
|
51
|
+
- `KALCODE_INSECURE_TLS=1`: Local debugging only; never use in production
|
|
58
52
|
|
|
59
|
-
##
|
|
53
|
+
## Deployment (Vercel Serverless Proxy)
|
|
60
54
|
|
|
61
|
-
|
|
55
|
+
This repository provides:
|
|
56
|
+
- `POST /v1/chat/completions` -> `/api/v1/chat/completions`
|
|
57
|
+
- `GET /health` -> `/api/health`
|
|
62
58
|
|
|
63
|
-
|
|
64
|
-
export NVIDIA_NIM_KEY="your-real-provider-key"
|
|
65
|
-
export PORT=8787
|
|
66
|
-
bun run proxy
|
|
67
|
-
```
|
|
59
|
+
### Steps
|
|
68
60
|
|
|
69
|
-
|
|
61
|
+
1. Import the `kalcode` directory as a Vercel project.
|
|
62
|
+
2. Ensure project settings match:
|
|
63
|
+
- Framework Preset: `Other`
|
|
64
|
+
- Build Command: `npm run build`
|
|
65
|
+
- Output Directory: `dist`
|
|
66
|
+
3. Add environment variable:
|
|
67
|
+
- `NVIDIA_NIM_KEY=your_real_key`
|
|
68
|
+
4. Deploy and verify:
|
|
70
69
|
|
|
71
70
|
```bash
|
|
72
|
-
|
|
73
|
-
kalcode
|
|
71
|
+
curl https://kalcode.vercel.app/health
|
|
74
72
|
```
|
|
75
73
|
|
|
76
|
-
|
|
74
|
+
Expected response:
|
|
77
75
|
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
76
|
+
```json
|
|
77
|
+
{"ok":true}
|
|
78
|
+
```
|
|
81
79
|
|
|
82
|
-
|
|
80
|
+
## CLI Options
|
|
81
|
+
|
|
82
|
+
- `-h, --help` Show help
|
|
83
|
+
- `-v, --version` Show version
|
|
84
|
+
- `-m, --model <id>` Use a specific model
|
|
85
|
+
- `--set-key` Save NVIDIA NIM API key to local config
|
|
86
|
+
- `--compact` Toggle compact output
|
|
87
|
+
- `--auto-accept` Skip permission prompts
|
|
88
|
+
- `--ask` Read-only mode
|
|
89
|
+
|
|
90
|
+
## REPL Slash Commands
|
|
91
|
+
|
|
92
|
+
- `/` Show command menu
|
|
93
|
+
- `/help` Show help
|
|
94
|
+
- `/model` Show or switch model
|
|
95
|
+
- `/clear` Clear conversation and context
|
|
96
|
+
- `/retry` Retry last message
|
|
97
|
+
- `/compact` Toggle compact output
|
|
98
|
+
- `/ask` Toggle read-only mode
|
|
99
|
+
- `/auto` Toggle auto-accept permissions
|
|
100
|
+
- `/skills` List available skills
|
|
101
|
+
- `/add <file>` Add file to context
|
|
102
|
+
- `/drop <file>` Remove file from context
|
|
103
|
+
- `/files` List context files
|
|
104
|
+
- `/diff` Show uncommitted changes
|
|
105
|
+
- `/status` Show git status
|
|
106
|
+
- `/log` Show recent commits
|
|
107
|
+
- `/undo` Undo last commit
|
|
108
|
+
- `/commit [message]` Commit all changes
|
|
109
|
+
- `/init` Create `KALCODE.md`
|
|
110
|
+
- `/exit`, `/quit`, `/q` Quit
|
|
111
|
+
|
|
112
|
+
## Development
|
|
113
|
+
|
|
114
|
+
Install dependencies:
|
|
83
115
|
|
|
84
116
|
```bash
|
|
85
|
-
|
|
117
|
+
npm install
|
|
86
118
|
```
|
|
87
119
|
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
This repo now includes Vercel serverless endpoints:
|
|
91
|
-
|
|
92
|
-
- `POST /v1/chat/completions` (rewritten to `/api/v1/chat/completions`)
|
|
93
|
-
- `GET /health` (rewritten to `/api/health`)
|
|
94
|
-
|
|
95
|
-
### 1) Deploy
|
|
96
|
-
|
|
97
|
-
- Import the `kalcode` folder as a Vercel project.
|
|
98
|
-
- Framework preset: **Other**.
|
|
99
|
-
- Build command: leave default/empty.
|
|
100
|
-
|
|
101
|
-
### 2) Set Vercel environment variables
|
|
102
|
-
|
|
103
|
-
- `NVIDIA_NIM_KEY` = your provider key (server-only)
|
|
104
|
-
|
|
105
|
-
### 3) Configure clients
|
|
120
|
+
Build:
|
|
106
121
|
|
|
107
122
|
```bash
|
|
108
|
-
|
|
109
|
-
kalcode
|
|
123
|
+
npm run build
|
|
110
124
|
```
|
|
111
125
|
|
|
112
|
-
|
|
126
|
+
Run locally:
|
|
113
127
|
|
|
114
128
|
```bash
|
|
115
|
-
|
|
129
|
+
npm run start
|
|
116
130
|
```
|
|
117
131
|
|
|
118
|
-
##
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
- `--auto-accept` - Skip permission prompts
|
|
126
|
-
- `--ask` - Read-only mode
|
|
127
|
-
|
|
128
|
-
## REPL Commands
|
|
129
|
-
|
|
130
|
-
- `/help` - Show help
|
|
131
|
-
- `/model` - Show or switch model
|
|
132
|
-
- `/clear` - Clear conversation
|
|
133
|
-
- `/retry` - Retry last message
|
|
134
|
-
- `/compact` - Toggle compact output
|
|
135
|
-
- `/ask` - Toggle read-only mode
|
|
136
|
-
- `/skills` - List skills
|
|
137
|
-
- `/` - Show slash commands
|
|
138
|
-
- `/exit` - Quit
|
|
132
|
+
## Publishing
|
|
133
|
+
|
|
134
|
+
```bash
|
|
135
|
+
npm login
|
|
136
|
+
npm run build
|
|
137
|
+
npm publish --access public
|
|
138
|
+
```
|
package/dist/src/constants.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export declare const VERSION = "2.2.
|
|
1
|
+
export declare const VERSION = "2.2.1";
|
|
2
2
|
export declare const API_URL = "https://integrate.api.nvidia.com/v1/chat/completions";
|
|
3
3
|
/** Public proxy — used automatically when no API key is set */
|
|
4
4
|
export declare const DEFAULT_PROXY_URL = "https://kalcode.vercel.app";
|
package/dist/src/constants.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export const VERSION = "2.2.
|
|
1
|
+
export const VERSION = "2.2.1";
|
|
2
2
|
export const API_URL = "https://integrate.api.nvidia.com/v1/chat/completions";
|
|
3
3
|
/** Public proxy — used automatically when no API key is set */
|
|
4
4
|
export const DEFAULT_PROXY_URL = "https://kalcode.vercel.app";
|