@iamharshil/aix-cli 2.0.3 → 2.0.4

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.
Files changed (2) hide show
  1. package/README.md +199 -156
  2. package/package.json +10 -6
package/README.md CHANGED
@@ -1,74 +1,78 @@
1
+ <div align="center">
2
+
1
3
  # AIX CLI
2
4
 
3
- > AI-powered CLI tool that integrates LM Studio with Claude Code or OpenCode for enhanced local development assistance
5
+ **Run Claude Code & OpenCode with local AI models. No API keys. No cloud. Complete privacy.**
4
6
 
5
- <div align="center">
7
+ [![npm version](https://img.shields.io/npm/v/@iamharshil/aix-cli.svg?style=flat-square&color=cb3837)](https://www.npmjs.com/package/@iamharshil/aix-cli)
8
+ [![Downloads](https://img.shields.io/npm/dm/@iamharshil/aix-cli?style=flat-square&color=blue)](https://www.npmjs.com/package/@iamharshil/aix-cli)
9
+ [![License](https://img.shields.io/badge/license-MIT-green?style=flat-square)](LICENSE)
10
+ [![CI](https://img.shields.io/github/actions/workflow/status/iamharshil/aix-cli/ci.yml?style=flat-square&label=CI)](https://github.com/iamharshil/aix-cli/actions)
11
+ [![Node](https://img.shields.io/badge/node-%E2%89%A518-417e38?style=flat-square)](https://nodejs.org/)
6
12
 
7
- [![npm version](https://img.shields.io/npm/v/@iamharshil/aix-cli.svg)](https://www.npmjs.com/package/@iamharshil/aix-cli)
8
- [![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)
9
- [![Node.js Version](https://img.shields.io/badge/node-%3E%3D18.0.0-brightgreen)](https://nodejs.org/)
10
- [![GitHub Release](https://img.shields.io/github/v/release/iamharshil/aix-cli)](https://github.com/iamharshil/aix-cli/releases)
11
- [![Build Status](https://img.shields.io/github/actions/workflow/status/iamharshil/aix-cli/ci)](https://github.com/iamharshil/aix-cli/actions)
12
- [![Total Downloads](https://img.shields.io/npm/dt/@iamharshil/aix-cli)](https://www.npmjs.com/package/@iamharshil/aix-cli)
13
+ [Getting Started](#getting-started) · [Documentation](#usage) · [Contributing](CONTRIBUTING.md) · [Changelog](CHANGELOG.md)
13
14
 
14
15
  </div>
15
16
 
16
17
  ---
17
18
 
18
- ## Overview
19
-
20
- **AIX CLI** enables you to use locally-running AI models from [LM Studio](https://lmstudio.ai) directly with [Claude Code](https://docs.anthropic.com/en/docs/claude-code) or [OpenCode](https://opencode.ai). No API keys, no cloud dependencies, complete privacy.
21
-
22
- ### Why AIX?
19
+ ## What is AIX?
23
20
 
24
- | Feature | Description |
25
- | -------------------- | ---------------------------------------------- |
26
- | 🔒 **Privacy-First** | All processing happens locally on your machine |
27
- | 🔑 **No API Keys** | No external services or subscriptions |
28
- | 🚀 **Fast** | Local inference with your GPU |
29
- | 🛡️ **Secure** | Your code never leaves your machine |
30
- | 🔧 **Simple** | Just run `aix-cli run` and start coding |
21
+ AIX CLI is a bridge between [LM Studio](https://lmstudio.ai) and AI coding assistants like [Claude Code](https://docs.anthropic.com/en/docs/claude-code) and [OpenCode](https://opencode.ai). It lets you use **locally-running language models** as the backend for your favorite AI dev tools — no API keys, no cloud calls, no data leaving your machine.
31
22
 
32
- ## Prerequisites
23
+ ```
24
+ ┌──────────────────────────────────────────────────┐
25
+ │ $ aix-cli run │
26
+ │ │
27
+ │ ✔ LM Studio running on http://localhost:1234 │
28
+ │ ✔ Model loaded: qwen2.5-coder-14b │
29
+ │ ✔ Launching Claude Code... │
30
+ │ │
31
+ │ Your code stays local. Always. │
32
+ └──────────────────────────────────────────────────┘
33
+ ```
33
34
 
34
- - [Node.js](https://nodejs.org/) 18.0.0 or higher
35
- - [LM Studio](https://lmstudio.ai) - Download and run local AI models
36
- - [Claude Code](https://docs.anthropic.com/en/docs/claude-code) **or** [OpenCode](https://opencode.ai) - AI coding assistant
35
+ ### Why AIX?
37
36
 
38
- ## Quick Start
37
+ - 🔒 **Privacy-first** — All inference runs locally on your hardware. Your code never leaves your machine.
38
+ - 🔑 **No API keys** — No subscriptions, no usage limits, no cloud dependencies.
39
+ - 🚀 **GPU-accelerated** — Take advantage of your local GPU for fast inference via LM Studio.
40
+ - 🔀 **Multi-provider** — Switch between Claude Code and OpenCode with a single flag.
41
+ - ⚡ **Zero config** — Just run `aix-cli run` and start coding.
39
42
 
40
- ```bash
41
- # Install
42
- npm install -g @iamharshil/aix-cli
43
+ ---
43
44
 
44
- # Verify setup
45
- aix-cli doctor
45
+ ## Getting Started
46
46
 
47
- # Run with interactive model selection
48
- aix-cli run
49
- ```
47
+ ### Prerequisites
50
48
 
51
- ## Installation
49
+ | Requirement | Description |
50
+ |---|---|
51
+ | [Node.js](https://nodejs.org/) ≥ 18 | JavaScript runtime |
52
+ | [LM Studio](https://lmstudio.ai) | Run local AI models and expose them via API |
53
+ | [Claude Code](https://docs.anthropic.com/en/docs/claude-code) **or** [OpenCode](https://opencode.ai) | AI coding assistant (at least one required) |
52
54
 
53
- ### Using npm (Recommended)
55
+ ### Install
54
56
 
55
57
  ```bash
56
58
  npm install -g @iamharshil/aix-cli
57
59
  ```
58
60
 
59
- ### Using Yarn
61
+ <details>
62
+ <summary>Other package managers</summary>
60
63
 
61
64
  ```bash
65
+ # Yarn
62
66
  yarn global add @iamharshil/aix-cli
63
- ```
64
-
65
- ### Using pnpm
66
67
 
67
- ```bash
68
+ # pnpm
68
69
  pnpm add -g @iamharshil/aix-cli
69
70
  ```
70
71
 
71
- ### From Source
72
+ </details>
73
+
74
+ <details>
75
+ <summary>Build from source</summary>
72
76
 
73
77
  ```bash
74
78
  git clone https://github.com/iamharshil/aix-cli.git
@@ -78,69 +82,94 @@ npm run build
78
82
  npm link
79
83
  ```
80
84
 
81
- ## Usage
82
-
83
- ### System Check
85
+ </details>
84
86
 
85
- Verify your environment is properly configured:
87
+ ### Verify
86
88
 
87
89
  ```bash
88
90
  aix-cli doctor
89
91
  ```
90
92
 
91
- ### Initialize Model
93
+ This checks that LM Studio, Claude Code / OpenCode, and your environment are properly configured.
94
+
95
+ ---
96
+
97
+ ## Usage
98
+
99
+ ### `aix-cli run` — Start a coding session
92
100
 
93
- Load a model from your local LM Studio models:
101
+ The primary command. Launches Claude Code or OpenCode backed by a local LM Studio model.
94
102
 
95
103
  ```bash
96
- # Interactive selection (prompts for provider)
97
- aix-cli init
104
+ # Interactive picks a running model automatically
105
+ aix-cli run
98
106
 
99
- # Specific model
100
- aix-cli init -m llama-3-8b
107
+ # Specify a model
108
+ aix-cli run -m qwen2.5-coder-14b
109
+
110
+ # Use OpenCode instead of Claude Code
111
+ aix-cli run --provider opencode
101
112
 
102
- # With provider
103
- aix-cli init -m llama-3-8b --provider opencode
113
+ # Pass a prompt directly
114
+ aix-cli run -m qwen2.5-coder-14b -- "Refactor auth middleware to use JWTs"
104
115
  ```
105
116
 
106
- ### Run with Provider
117
+ ### `aix-cli init` — Load a model
107
118
 
108
- Start coding with your local model using Claude Code or OpenCode:
119
+ Loads a model into LM Studio. If no model is specified, you'll get an interactive picker.
109
120
 
110
121
  ```bash
111
- # Interactive session (uses default provider)
112
- aix-cli run
122
+ aix-cli init # Interactive model selection
123
+ aix-cli init -m llama-3-8b # Load a specific model
124
+ aix-cli init -m llama-3-8b -p opencode # Set default provider at the same time
125
+ ```
113
126
 
114
- # With specific model
115
- aix-cli run -m llama-3-8b
127
+ ### `aix-cli status` — Check what's running
116
128
 
117
- # With OpenCode instead of Claude Code
118
- aix-cli run --provider opencode
119
- aix-cli run -p opencode -m llama-3-8b
129
+ Shows the current LM Studio server status and which models are loaded.
120
130
 
121
- # With arguments
122
- aix-cli run -m llama-3-8b -- "Write a hello world in Python"
131
+ ```bash
132
+ aix-cli status
123
133
  ```
124
134
 
125
- ### Check Status
135
+ ### `aix-cli doctor` — System diagnostics
126
136
 
127
- View LM Studio status and loaded models:
137
+ Verifies your environment is ready to go.
128
138
 
129
139
  ```bash
130
- aix-cli status
140
+ aix-cli doctor
131
141
  ```
132
142
 
133
- ## Configuration
143
+ ### Command Reference
144
+
145
+ | Command | Aliases | Description |
146
+ |---|---|---|
147
+ | `run` | `r` | Run Claude Code / OpenCode with a local model |
148
+ | `init` | `i`, `load` | Load a model into LM Studio |
149
+ | `status` | `s`, `stats` | Show LM Studio server status |
150
+ | `doctor` | `d`, `check` | Run system diagnostics |
134
151
 
135
- ### Config Location
152
+ ### Global Options
136
153
 
137
- AIX CLI stores configuration in your system's app data directory:
154
+ | Flag | Description |
155
+ |---|---|
156
+ | `-m, --model <name>` | Model name or ID to use |
157
+ | `-p, --provider <name>` | Provider: `claude` (default) or `opencode` |
158
+ | `-v, --verbose` | Show verbose output |
159
+ | `-h, --help` | Show help |
160
+ | `-V, --version` | Show version |
138
161
 
139
- | Platform | Path |
140
- | -------- | ---------------------------------------- |
141
- | macOS | `~/Library/Application Support/aix-cli/` |
142
- | Linux | `~/.config/aix-cli/` |
143
- | Windows | `%APPDATA%\aix-cli\` |
162
+ ---
163
+
164
+ ## Configuration
165
+
166
+ AIX stores its configuration in the OS-appropriate config directory:
167
+
168
+ | Platform | Path |
169
+ |---|---|
170
+ | macOS | `~/Library/Application Support/aix-cli/` |
171
+ | Linux | `~/.config/aix-cli/` |
172
+ | Windows | `%APPDATA%\aix-cli\` |
144
173
 
145
174
  ### Config File
146
175
 
@@ -149,130 +178,144 @@ AIX CLI stores configuration in your system's app data directory:
149
178
  "lmStudioUrl": "http://localhost",
150
179
  "lmStudioPort": 1234,
151
180
  "defaultTimeout": 30000,
152
- "model": "lmstudio/llama-3-8b",
181
+ "model": "lmstudio/qwen2.5-coder-14b",
153
182
  "defaultProvider": "claude"
154
183
  }
155
184
  ```
156
185
 
157
186
  ### Environment Variables
158
187
 
159
- | Variable | Description | Default |
160
- | ---------------- | --------------------- | ------- |
161
- | `LM_STUDIO_PORT` | LM Studio server port | `1234` |
188
+ | Variable | Description | Default |
189
+ |---|---|---|
190
+ | `LM_STUDIO_PORT` | Override the LM Studio server port | `1234` |
162
191
 
163
- ## Architecture
192
+ ---
193
+
194
+ ## How It Works
164
195
 
165
196
  ```
166
- ┌─────────────────────────────────────────────────────┐
167
- AIX Flow
168
- ├─────────────────────────────────────────────────────┤
169
-
170
- │ ┌──────────┐ ┌──────────────┐ │
171
- │ User │────▶│ LM Studio │ │
172
- │ └──────────┘ └──────────────┘ │
173
- │ │ │
174
- │ │ ▼ │
175
- ┌──────────────┐ │
176
- │ │ Local API
177
- │ │ (port 1234)
178
- │ │ └──────────────┘ │
179
- │ │
180
- │ ▼ ┌─────────┴─────────┐ │
181
- │ ┌─────────────┴─────────────┐ │
182
- │ │ │ │
183
- ▼ ▼ ▼
184
- ┌──────────┐ ┌──────────┐
185
- │ │Claude Code│ │OpenCode │ │
186
- │ │--model │ │--model │ │
187
- │ └──────────┘ └──────────┘ │
188
- │ │
189
- └─────────────────────────────────────────────────────┘
197
+ ┌───────────────────┐
198
+ LM Studio
199
+ │ (local server) │
200
+ port 1234
201
+ └────────┬──────────┘
202
+
203
+ REST API
204
+
205
+ ┌────────┴──────────┐
206
+ AIX CLI
207
+ model routing
208
+ config mgmt
209
+ └───┬──────────┬────┘
210
+
211
+ ┌────────┘ └────────┐
212
+ ▼ ▼
213
+ ┌──────────────┐ ┌──────────────┐
214
+ Claude Code │ │ OpenCode
215
+ --model X │ │ --model X
216
+ └──────────────┘ └──────────────┘
190
217
  ```
191
218
 
219
+ 1. **LM Studio** runs a local inference server exposing an OpenAI-compatible API.
220
+ 2. **AIX CLI** discovers available models, manages configuration, and orchestrates the connection.
221
+ 3. **Claude Code** or **OpenCode** receives the model endpoint and runs as it normally would — except fully local.
222
+
223
+ ---
224
+
192
225
  ## Troubleshooting
193
226
 
194
- ### LM Studio server not running
227
+ <details>
228
+ <summary><strong>LM Studio server not running</strong></summary>
229
+
230
+ 1. Open LM Studio
231
+ 2. Navigate to the **Server** tab (left sidebar)
232
+ 3. Click **Start Server**
233
+ 4. Confirm with `aix-cli status`
234
+
235
+ </details>
236
+
237
+ <details>
238
+ <summary><strong>No models found</strong></summary>
239
+
240
+ 1. Open LM Studio → **Search** tab
241
+ 2. Download a model (e.g., Qwen 2.5 Coder, Llama 3, Mistral)
242
+ 3. Wait for the download to complete
243
+ 4. Run `aix-cli init` to load it
244
+
245
+ </details>
246
+
247
+ <details>
248
+ <summary><strong>Connection refused on port 1234</strong></summary>
249
+
250
+ Check the LM Studio server tab for the actual port it's running on. If it differs from `1234`, update your config:
195
251
 
196
252
  ```bash
197
- # 1. Open LM Studio
198
- # 2. Go to Server tab (left sidebar)
199
- # 3. Click Start Server
200
- # 4. Run: aix-cli run
253
+ # The config file path is shown by `aix-cli doctor`
254
+ # Edit the config file and set "lmStudioPort" to the correct port
201
255
  ```
202
256
 
203
- ### No models found
257
+ </details>
258
+
259
+ <details>
260
+ <summary><strong>Claude Code / OpenCode not detected</strong></summary>
261
+
262
+ Install the missing provider globally:
204
263
 
205
264
  ```bash
206
- # 1. Open LM Studio
207
- # 2. Go to Search tab
208
- # 3. Download a model (e.g., Llama 3, Mistral)
209
- # 4. Wait for download to complete
210
- # 5. Run: aix-cli init
265
+ # Claude Code
266
+ npm install -g @anthropic-ai/claude-code
267
+
268
+ # OpenCode
269
+ npm install -g opencode
211
270
  ```
212
271
 
213
- ### Connection refused on port 1234
272
+ Then re-run `aix-cli doctor` to confirm.
273
+
274
+ </details>
214
275
 
215
- Check LM Studio's server tab for the correct port and update your config.
276
+ ---
216
277
 
217
278
  ## Security & Privacy
218
279
 
219
- - All AI processing happens locally
220
- - ✅ No data sent to external servers
221
- - ✅ No telemetry or analytics
222
- - ✅ No API keys required
223
- - ✅ Your code stays on your machine
280
+ AIX is designed around a simple principle: **your code never leaves your machine.**
224
281
 
225
- ## Contributing
282
+ - ✅ All AI inference runs locally via LM Studio
283
+ - ✅ No telemetry, analytics, or tracking of any kind
284
+ - ✅ No outbound network calls (except to `localhost`)
285
+ - ✅ No API keys or accounts required
286
+ - ✅ Fully open-source — audit the code yourself
287
+
288
+ Found a vulnerability? Please report it responsibly via our [Security Policy](SECURITY.md).
226
289
 
227
- Contributions are welcome! Please read our [Contributing Guide](CONTRIBUTING.md).
290
+ ---
291
+
292
+ ## Contributing
228
293
 
229
- ### Development
294
+ Contributions are welcome! See [CONTRIBUTING.md](CONTRIBUTING.md) for guidelines on how to get started.
230
295
 
231
296
  ```bash
232
- # Clone and setup
233
297
  git clone https://github.com/iamharshil/aix-cli.git
234
298
  cd aix-cli
235
299
  npm install
236
-
237
- # Development mode
238
- npm run dev
239
-
240
- # Run tests
241
- npm test
242
-
243
- # Lint
244
- npm run lint
245
-
246
- # Build
247
- npm run build
300
+ npm run dev # Run in development mode
301
+ npm test # Run tests
302
+ npm run lint # Lint
248
303
  ```
249
304
 
250
- ### Code Style
251
-
252
- - TypeScript with strict mode
253
- - ESLint + Prettier configured
254
- - 2-space indentation
255
- - Single quotes, semicolons
305
+ ---
256
306
 
257
307
  ## Related Projects
258
308
 
259
- - [LM Studio](https://lmstudio.ai) - Run local AI models
260
- - [Claude Code](https://docs.anthropic.com/en/docs/claude-code) - AI coding assistant
261
- - [OpenCode](https://opencode.ai) - Open-source AI coding assistant
309
+ - [LM Studio](https://lmstudio.ai) Run local AI models with a visual interface
310
+ - [Claude Code](https://docs.anthropic.com/en/docs/claude-code) Anthropic's AI coding assistant
311
+ - [OpenCode](https://opencode.ai) Open-source AI coding assistant
262
312
 
263
313
  ## License
264
314
 
265
- [MIT](LICENSE) - © 2024 Harshil
266
-
267
- ## Support
268
-
269
- - 📋 [Issues](https://github.com/iamharshil/aix-cli/issues) - Report bugs
270
- - 💬 [Discussions](https://github.com/iamharshil/aix-cli/discussions) - Ask questions
315
+ [MIT](LICENSE) © [Harshil](https://github.com/iamharshil)
271
316
 
272
317
  ---
273
318
 
274
319
  <div align="center">
275
-
276
- Built with ❤️ for privacy-conscious developers
277
-
320
+ <sub>Built for developers who care about privacy.</sub>
278
321
  </div>
package/package.json CHANGED
@@ -1,16 +1,20 @@
1
1
  {
2
2
  "name": "@iamharshil/aix-cli",
3
- "version": "2.0.3",
4
- "description": "AI CLI tool that integrates LM Studio with Claude Code for enhanced development assistance",
3
+ "version": "2.0.4",
4
+ "description": "Run Claude Code and OpenCode with local AI models via LM Studio no API keys, no cloud, complete privacy",
5
5
  "keywords": [
6
6
  "cli",
7
7
  "ai",
8
+ "lm-studio",
8
9
  "lmstudio",
9
- "claude",
10
- "github",
10
+ "claude-code",
11
+ "opencode",
12
+ "local-ai",
13
+ "llm",
11
14
  "developer-tools",
12
- "productivity",
13
- "llm"
15
+ "privacy",
16
+ "coding-assistant",
17
+ "offline-ai"
14
18
  ],
15
19
  "author": "Harshil <hello@iamharshil.com>",
16
20
  "license": "MIT",