iubcli 0.0.0-stage → 4.2.9

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,3 +1,288 @@
1
- # Temporary Holding Version
1
+ # IUB CLI
2
2
 
3
- This version is a temporary placeholder for this package. An operational version to replace this has been submitted for review and is awaiting a staged release.
3
+ > **The Autonomous, Lightweight BYOK AI Coding Agent in Your Terminal — Fluent in Bangla, Banglish & English with OpenCode-Style Build & Plan Modes.**
4
+
5
+ [![npm version](https://img.shields.io/npm/v/iubcli.svg?style=flat-square&color=00A3FF)](https://www.npmjs.com/package/iubcli)
6
+ [![Node.js Version](https://img.shields.io/badge/node-%3E%3D18.0.0-brightgreen.svg?style=flat-square)](https://nodejs.org/)
7
+ [![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg?style=flat-square)](https://opensource.org/licenses/MIT)
8
+ [![BYOK](https://img.shields.io/badge/BYOK-100%25%20Serverless-blue.svg?style=flat-square)](#-bring-your-own-key-byok)
9
+
10
+ ```
11
+ ██╗ ██╗ ██╗ ██████╗ ██████╗ ██╗ ██╗
12
+ ██║ ██║ ██║ ██╔══██╗ ██╔════╝ ██║ ██║
13
+ ██║ ██║ ██║ ██████╔╝ ██║ ██║ ██║
14
+ ██║ ██║ ██║ ██╔══██╗ ██║ ██║ ██║
15
+ ██║ ╚██████╔╝ ██████╔╝ ╚██████╗ ███████╗ ██║
16
+ ╚═╝ ╚═════╝ ╚═════╝ ╚═════╝ ╚══════╝ ╚═╝
17
+ ```
18
+
19
+ ---
20
+
21
+ ## Overview
22
+
23
+ **IUB CLI** (`iubcli`) is an open-source, serverless terminal coding assistant designed from the ground up for developers who think, speak, and code in **বাংলা (Bangla)**, **Banglish**, or **English**.
24
+
25
+ It brings the best of modern agent design (like OpenCode):
26
+ - **Smart Auto-Cascade Resilience:** If a model's free token quota or rate limit (429/503) is reached, it seamlessly rotates to the next available intelligent free model in the chain without dropping conversation context!
27
+ - **BUILD Mode:** Full autonomous development — reads and writes code, builds packages, runs tests and shell commands.
28
+ - **PLAN Mode:** Senior architect mode — read-only codebase exploration, architecture analysis, and concrete step-by-step implementation plans.
29
+ - **Live Status Bar:** Displays the currently active model, mode, and cascade indicator directly above your prompt.
30
+
31
+ It is 100% **BYOK (Bring Your Own Key)** — you don't need costly subscriptions. Connect your free **Google Gemini** API key or **OpenRouter** free models (Particle-1, Nemotron, Gemma 4, ERNIE, Groq) and start building software right inside your terminal.
32
+
33
+ ---
34
+
35
+ ## Features
36
+
37
+ - **Superior Autonomous AI Brain (Outperforming Legacy Agents)**:
38
+ - **Self-Healing Codebase:** If a build command or test fails, the agent inspects compiler logs and stack traces, edits the files, and verifies the fix autonomously.
39
+ - **Zero Placeholder Code Rule:** Writes 100% complete, production-grade files. No `// TODO`, no skipped code.
40
+ - **Intelligent Multi-Model Auto-Cascade**:
41
+ - Automatically cascades when tokens run out or rate limits hit (`openrouter/free` ➔ `particle-ai/particle-1:free` ➔ `nvidia/nemotron-3-ultra-550b:free` ➔ `google/gemma-4-31b-it:free` ➔ Gemini 2.0 Flash).
42
+ - **Trilingual Native Fluency**:
43
+ - **Bangla (বাংলা লিপি):** *"একটি Express.js REST API বানাও JWT auth সহ"*
44
+ - **Banglish:** *"Ekta React counter app banaye dao Tailwind CSS diye"*
45
+ - **English:** *"Build a full-stack Next.js portfolio website"*
46
+ - **OpenCode-Style Build & Plan Modes**:
47
+ - `BUILD Mode`: Autonomous builder with tools to create files, install dependencies, and run commands.
48
+ - `PLAN Mode`: Safe read-only mode to analyze codebase, design architecture, and formulate plans without modifying files.
49
+ - Switch anytime with `/mode`, `/plan`, or `/build`.
50
+ - **Real-Time Model & Mode Status Indicator**:
51
+ - Displays `[BUILD MODE] [openrouter/free] [Auto-Cascade Active]` right above the prompt so you always know what model you are running.
52
+ - **100% BYOK & Serverless**:
53
+ - No middleman backend. Your API keys are stored locally on your machine via `conf`.
54
+ - Supports **Google Gemini** (`gemini-3.5-flash-lite`, `gemini-3.5-flash`, `gemini-3.8-flash`, `gemini-3.1-flash-lite`).
55
+ - Supports **DeepSeek Frontier** (`deepseek-chat` [5M free tokens], `deepseek-reasoner` [R1], `deepseek/deepseek-r1:free`).
56
+ - Supports **OpenRouter Free Tier** (`openrouter/free`, `particle-ai/particle-1:free`, `nvidia/nemotron-3-ultra-550b-a55b:free`, `google/gemma-4-31b-it:free`, `dots-studio/dots-3-note-preview:free`).
57
+ - Supports **Custom OpenAI-Compatible** endpoints (Groq Cloud, Cerebras, Ollama, DeepSeek API).
58
+ - **Autonomous Project Builder (4 Native Tools)**:
59
+ - `list_files(dirPath)`: Explores workspace directory hierarchy (auto-ignoring `node_modules` and `.git`).
60
+ - `read_file(filePath)`: Inspects existing source code before editing.
61
+ - `write_file(filePath, content)`: Creates folders automatically and writes complete, production-ready code.
62
+ - `run_command(command)`: Executes terminal commands (`npm install`, `npm test`, `git init`, etc.).
63
+ - **Interactive Safety Confirmation**:
64
+ - Prompts you `[Y/n/a]` before modifying files or executing shell commands.
65
+ - Includes a *"Yes to all (Auto-approve for this session)"* mode for hands-free autonomous building.
66
+
67
+ ---
68
+
69
+ ## Quick Start
70
+
71
+ ### Installation
72
+
73
+ Install globally via npm:
74
+
75
+ ```bash
76
+ npm install -g iubcli
77
+ ```
78
+
79
+ Or run directly without installing:
80
+
81
+ ```bash
82
+ npx iubcli
83
+ ```
84
+
85
+ ### First-Time Setup
86
+
87
+ Simply type:
88
+
89
+ ```bash
90
+ iubcli
91
+ ```
92
+
93
+ If it's your first time, the interactive setup wizard will guide you to select a provider and enter your API key:
94
+
95
+ 1. **Google Gemini (Free Tier - Recommended)**
96
+ - Get key: [aistudio.google.com/apikey](https://aistudio.google.com/apikey)
97
+ - Flagship free models: `gemini-3.5-flash-lite` (Flagship Coder), `gemini-3.5-flash` (1M Context), `gemini-3.8-flash` (Latest Preview), `gemini-3.1-flash-lite` (1M token context, 1,500 RPD free)
98
+ 2. **OpenRouter (100% Free Coding Models)**
99
+ - Get key: [openrouter.ai/keys](https://openrouter.ai/keys)
100
+ - Auto-router: `openrouter/free` (zero downtime)
101
+ - 1M token free models: `google/lyria-3-pro-preview`, `google/lyria-3-clip-preview`, `particle-ai/particle-1:free`, `nvidia/nemotron-3-ultra-550b-a55b:free`, `baidu/ernie-5.5-flash-preview:free`, `inclusionai/ling-3.2-flash:free`, `google/gemma-4-31b-it:free`
102
+ 3. **Custom OpenAI-Compatible (Groq, Ollama, DeepSeek)**
103
+ - Groq Cloud (Free): [console.groq.com/keys](https://console.groq.com/keys) (Base URL: `https://api.groq.com/openai/v1`)
104
+ - Local Offline (Ollama): `http://localhost:11434/v1` (100% Free & offline)
105
+
106
+ To view the interactive free API guide:
107
+ ```bash
108
+ iubcli guide
109
+ ```
110
+
111
+ To reconfigure anytime:
112
+ ```bash
113
+ iubcli config
114
+ ```
115
+
116
+ ---
117
+
118
+ ## CLI Usage
119
+
120
+ ```text
121
+ Usage: iubcli [options] [command]
122
+
123
+ Autonomous BYOK terminal coding agent that speaks Bangla, Banglish & English.
124
+
125
+ Options:
126
+ -v, --version Output current version
127
+ -m, --model <model> Override model for this session
128
+ -M, --mode <mode> Agent mode: "build" (default) or "plan"
129
+ -p, --prompt <prompt> Run a single prompt and exit directly
130
+ -y, --yes Auto-approve all file writes and shell commands
131
+ -h, --help Display help for command
132
+
133
+ Commands:
134
+ config Run interactive setup wizard
135
+ guide (alias: keys) Display free API keys & models guide
136
+ limits (alias: tokens) Display free token limits & context windows
137
+ agent (alias: model) OpenCode-style AI agent & model selector
138
+ mode Display agent modes guide
139
+ ```
140
+
141
+ ### Examples
142
+
143
+ **Interactive Mode:**
144
+ ```bash
145
+ iubcli
146
+ ```
147
+
148
+ **Launch directly in PLAN Mode:**
149
+ ```bash
150
+ iubcli -M plan
151
+ ```
152
+
153
+ **Auto-Approve Autonomous Building:**
154
+ ```bash
155
+ iubcli -y
156
+ ```
157
+
158
+ **Single Command Execution:**
159
+ ```bash
160
+ iubcli -p "Ekta Node.js CLI tool banaw jeta weather show kore" -y
161
+ ```
162
+
163
+ ---
164
+
165
+ ## Slash Commands inside Chat
166
+
167
+ | Command | Description |
168
+ |---|---|
169
+ | `/mode` | **Toggle between BUILD Mode and PLAN Mode** (OpenCode style) |
170
+ | `/plan` | Switch directly to **PLAN Mode** (read-only architectural planning) |
171
+ | `/build` | Switch directly to **BUILD Mode** (autonomous coding & execution) |
172
+ | `/agent` (or `/model`) | **OpenCode-Style Agent Selector** (Free, Flagship, Gemini, Local) |
173
+ | `/provider` | Switch between Gemini, OpenRouter, or custom providers |
174
+ | `/limits` | View free token quotas, context windows & rate limits |
175
+ | `/guide` | Display direct links & guides for free API keys & models |
176
+ | `/config` | Full interactive setup to re-configure keys, provider, and endpoint |
177
+ | `/clear` | Clear conversation memory and reset token context |
178
+ | `/exit` | Exit the CLI session |
179
+
180
+ ---
181
+
182
+ ## Free API Keys & Models Guide (১০০% ফ্রি API গাইড)
183
+
184
+ You don't need to spend any money or enter credit cards to use **IUB CLI**. Here are the top free options:
185
+
186
+ ### 1. Google Gemini (Google AI Studio) — Recommended
187
+ - **Key URL:** [aistudio.google.com/apikey](https://aistudio.google.com/apikey)
188
+ - **Steps:** Sign in with Google account ➔ Click **Create API Key** ➔ Copy the key.
189
+ - **Recommended Free Model:** `gemini-3.5-flash-lite` (100% Free, active, fast, high rate limits).
190
+ - **Alternative Free Models:** `gemini-3.1-flash-lite`, `gemini-3.5-flash`, `gemini-3.8-flash`.
191
+ - **Free Limit:** 15 Requests per minute (RPM) and 1,500 Requests per day (RPD) free of charge!
192
+
193
+ ### 2. OpenRouter (Access 100% Free Frontier Models)
194
+ - **Key URL:** [openrouter.ai/keys](https://openrouter.ai/keys)
195
+ - **Steps:** Sign in with GitHub or Google ➔ Click **Create Key** ➔ Copy the key.
196
+ - **Top Free Models (`:free`):**
197
+ - `openrouter/free` — Automatic zero-downtime routing to the best active free model.
198
+ - `particle-ai/particle-1:free` — Specialized 1M token context agentic coding model.
199
+ - `nvidia/nemotron-3-ultra-550b-a55b:free` — Massive 550B frontier model with 1M tokens.
200
+ - `google/gemma-4-31b-it:free` — Google DeepMind 30.7B dense instruction-tuned model.
201
+ - `dots-studio/dots-3-note-preview:free` — 512,000 token context reasoning and code model.
202
+ - **Cost:** 100% Free with zero credit card required.
203
+
204
+ ### 3. Groq Cloud (Ultra-Fast 500+ tokens/sec)
205
+ - **Key URL:** [console.groq.com/keys](https://console.groq.com/keys)
206
+ - **Steps:** Choose `Custom OpenAI-Compatible` in **IUB CLI** ➔ Set Base URL to `https://api.groq.com/openai/v1`.
207
+ - **Free Models:** `llama-3.3-70b-versatile`, `qwen-2.5-coder-32b`, `deepseek-r1-distill-llama-70b`.
208
+
209
+ ### 4. Local Offline Models (100% Private via Ollama)
210
+ - **Download:** [ollama.com](https://ollama.com)
211
+ - **Run in terminal:** `ollama run qwen2.5-coder` or `ollama run deepseek-r1`
212
+ - **Steps in IUB CLI:** Choose `Custom OpenAI-Compatible` ➔ Base URL: `http://localhost:11434/v1` ➔ API key: `ollama` (or any string).
213
+ - **Cost:** 100% Free, unlimited, runs entirely on your local machine without internet.
214
+
215
+ ---
216
+
217
+ ### Token Capacities & Free Rate Limits Comparison
218
+
219
+ | Provider | Model | Context Window | Req / Min (RPM) | Tokens / Min (TPM) | Req / Day (RPD) |
220
+ |---|---|---|---|---|---|
221
+ | **Google Gemini** | `gemini-3.5-flash-lite` | **1,048,576** tokens | 15 RPM | **1,000,000** TPM | **1,500** RPD |
222
+ | **DeepSeek Platform**| `deepseek-chat` (V3) | 128,000 tokens | High Speed | 5M Free Tokens | Free Signup |
223
+ | **OpenRouter** | `openrouter/free` | 200,000 tokens | 20 RPM | Generous Free | ~200 RPD |
224
+ | **OpenRouter** | `particle-ai/particle-1:free` | **1,048,576** tokens | 20 RPM | Generous Free | ~200 RPD |
225
+ | **Groq Cloud** | `llama-3.3-70b-versatile` | 128,000 tokens | 30 RPM | 6,000 TPM | **14,400** RPD |
226
+ | **Cerebras Cloud** | `llama3.3-70b` | 128,000 tokens | 30 RPM | Ultra Low-Latency | **14,400** RPD |
227
+ | **Ollama (Local)** | `qwen2.5-coder` | Hardware limit | **Unlimited** | **Unlimited** | **Unlimited** |
228
+
229
+ > **Auto-Failover Protection:** If a model temporarily returns 503 (High Demand) or quota limit, **IUB CLI** automatically cascades to the next best zero-plan free model (`gemini-3.5-flash-lite`, `openrouter/free`, etc.) so your building process never crashes!
230
+
231
+ ---
232
+
233
+ ## Project Architecture
234
+
235
+ ```
236
+ iubcli/
237
+ ├── src/
238
+ │ ├── index.ts # CLI entry point, commander setup, interactive REPL loop
239
+ │ ├── config.ts # Secure local configuration manager (conf & @clack/prompts)
240
+ │ ├── agent.ts # Autonomous agent orchestrator (Gemini & OpenAI tool calling)
241
+ │ ├── tools.ts # 4 Core workspace tools with interactive safety confirmations
242
+ │ └── ui.ts # ASCII banner, terminal markdown rendering, spinners
243
+ ├── scripts/
244
+ │ └── test-tools.ts# End-to-end tool validation suite
245
+ ├── package.json # Node 18+ ESM configuration with bin mappings
246
+ ├── tsconfig.json # Strict TypeScript configuration
247
+ └── tsup.config.ts # Fast zero-config bundler
248
+ ```
249
+
250
+ ---
251
+
252
+ ## Development & Testing
253
+
254
+ Clone the repository and install dependencies:
255
+
256
+ ```bash
257
+ git clone https://github.com/Ifaz2611/iubcli.git
258
+ cd iubcli
259
+ npm install
260
+ ```
261
+
262
+ Run TypeScript type check:
263
+ ```bash
264
+ npm run typecheck
265
+ ```
266
+
267
+ Run test suite:
268
+ ```bash
269
+ npm test
270
+ ```
271
+
272
+ Build distribution bundle:
273
+ ```bash
274
+ npm run build
275
+ ```
276
+
277
+ Link locally for testing:
278
+ ```bash
279
+ npm link
280
+ iubcli --help
281
+ ```
282
+
283
+ ---
284
+
285
+
286
+ ## License
287
+
288
+ [MIT](LICENSE)