@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 CHANGED
@@ -1,138 +1,138 @@
1
- # kalcode
1
+ # Kalcode
2
2
 
3
- CLI coding agent powered by NVIDIA NIM.
3
+ Kalcode is a terminal-native coding assistant powered by NVIDIA NIM.
4
4
 
5
- ## Install
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
- Global install:
9
+ ## Installation
8
10
 
9
- ```bash
10
- npm i -g @thejeetsingh/kalcode
11
- ```
11
+ ### npm (recommended)
12
12
 
13
- Run without global install:
13
+ Run directly:
14
14
 
15
15
  ```bash
16
- npx @thejeetsingh/kalcode --version
16
+ npx @thejeetsingh/kalcode
17
17
  ```
18
18
 
19
- ## Usage
19
+ Install globally:
20
20
 
21
21
  ```bash
22
- kalcode "your prompt here"
22
+ npm install -g @thejeetsingh/kalcode
23
+ kalcode
23
24
  ```
24
25
 
25
- ## Publish to npm
26
-
27
- 1. Login:
26
+ ### Bun
28
27
 
29
28
  ```bash
30
- npm login
29
+ bunx @thejeetsingh/kalcode
31
30
  ```
32
31
 
33
- 2. Check what will be published:
32
+ ## Quick Start
34
33
 
35
34
  ```bash
36
- npm pack --dry-run
35
+ kalcode "review the repository and suggest improvements"
37
36
  ```
38
37
 
39
- 3. Publish:
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
- npm publish --access public
42
+ kalcode --set-key
43
43
  ```
44
44
 
45
- 4. Verify:
45
+ ## Configuration
46
46
 
47
- ```bash
48
- npm view @thejeetsingh/kalcode version
49
- ```
50
-
51
- ## Deployment and Secrets
47
+ ### Environment Variables
52
48
 
53
- - Do not hardcode API keys in source files.
54
- - Set `NVIDIA_NIM_KEY` in your shell or deployment environment.
55
- - Use `kalcode --set-key` to store the key in `~/.kalcode/config.json` for local development.
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
- ## Secure Proxy Mode (share access without sharing your NVIDIA key)
53
+ ## Deployment (Vercel Serverless Proxy)
60
54
 
61
- Run the backend proxy with your NVIDIA key on a server you control:
55
+ This repository provides:
56
+ - `POST /v1/chat/completions` -> `/api/v1/chat/completions`
57
+ - `GET /health` -> `/api/health`
62
58
 
63
- ```bash
64
- export NVIDIA_NIM_KEY="your-real-provider-key"
65
- export PORT=8787
66
- bun run proxy
67
- ```
59
+ ### Steps
68
60
 
69
- Client users run `kalcode` with proxy settings (no NVIDIA key needed on client):
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
- export KALCODE_PROXY_URL="https://your-proxy-domain"
73
- kalcode
71
+ curl https://kalcode.vercel.app/health
74
72
  ```
75
73
 
76
- Optional server hardening vars:
74
+ Expected response:
77
75
 
78
- - `KALCODE_PROXY_RATE_LIMIT_PER_MIN` - per-client request cap (default `120`)
79
- - `HOST` - bind host (default `0.0.0.0`)
80
- - `PORT` - bind port (default `8787`)
76
+ ```json
77
+ {"ok":true}
78
+ ```
81
79
 
82
- Health check endpoint:
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
- curl https://your-proxy-domain/health
117
+ npm install
86
118
  ```
87
119
 
88
- ## Vercel Deployment (serverless)
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
- export KALCODE_PROXY_URL="https://<your-vercel-project>.vercel.app"
109
- kalcode
123
+ npm run build
110
124
  ```
111
125
 
112
- ### 4) Verify
126
+ Run locally:
113
127
 
114
128
  ```bash
115
- curl https://<your-vercel-project>.vercel.app/health
129
+ npm run start
116
130
  ```
117
131
 
118
- ## Options
119
-
120
- - `-h, --help` - Show help
121
- - `-v, --version` - Show version
122
- - `-m, --model <id>` - Use a specific model
123
- - `--set-key` - Set NVIDIA NIM API key
124
- - `--compact` - Compact output
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
+ ```
@@ -1,4 +1,4 @@
1
- export declare const VERSION = "2.2.0";
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";
@@ -1,4 +1,4 @@
1
- export const VERSION = "2.2.0";
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";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@thejeetsingh/kalcode",
3
- "version": "2.2.0",
3
+ "version": "2.2.1",
4
4
  "description": "CLI coding agent powered by NVIDIA NIM — works with npm and bun",
5
5
  "author": "Jeet Singh",
6
6
  "license": "MIT",