nexora-code 1.0.0
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 +302 -0
- package/dist/bundle.cjs +289142 -0
- package/package.json +84 -0
package/README.md
ADDED
|
@@ -0,0 +1,302 @@
|
|
|
1
|
+
<div align="center">
|
|
2
|
+
|
|
3
|
+
<img src="https://lab.getnexora.cloud/og-banner.png" alt="Nexora Code Banner" width="100%">
|
|
4
|
+
|
|
5
|
+
# Nexora Code
|
|
6
|
+
|
|
7
|
+
**Professional multi-model AI coding agent & terminal.**
|
|
8
|
+
Built for engineers who don't want to leave the terminal.
|
|
9
|
+
|
|
10
|
+
[](https://www.npmjs.com/package/nexora-code)
|
|
11
|
+
[](https://www.npmjs.com/package/nexora-code)
|
|
12
|
+
[](https://nodejs.org/)
|
|
13
|
+
[](./LICENSE)
|
|
14
|
+
[](https://lab.getnexora.cloud/docs)
|
|
15
|
+
|
|
16
|
+
[**๐ Documentation**](https://lab.getnexora.cloud/docs) ยท [**๐ Report a Bug**](https://github.com/enochboadu/nexora-code/issues) ยท [**๐ก Request a Feature**](https://github.com/enochboadu/nexora-code/issues)
|
|
17
|
+
|
|
18
|
+
</div>
|
|
19
|
+
|
|
20
|
+
---
|
|
21
|
+
|
|
22
|
+
## What is Nexora Code?
|
|
23
|
+
|
|
24
|
+
Nexora Code is a **fully open-source, terminal-native AI coding agent** that brings Gemini-style conversational intelligence directly into your workflow. It is built on a BYOK (Bring Your Own Key) model โ you connect your own API keys from providers like Gemini, Anthropic, OpenAI, OpenRouter, and Groq, and Nexora Code handles everything else.
|
|
25
|
+
|
|
26
|
+
Unlike browser-based AI tools, Nexora Code lives entirely in your terminal:
|
|
27
|
+
|
|
28
|
+
- **Multi-action agent** โ reads, writes, refactors and fixes files autonomously
|
|
29
|
+
- **Conversation memory** โ sessions persist across restarts
|
|
30
|
+
- **Smart auto-routing** โ picks the right model for code vs. general tasks
|
|
31
|
+
- **50+ built-in tools** โ file ops, Git integration, AST mapping, semantic search, web fetch, test runner, and more
|
|
32
|
+
- **Multi-provider BYOK** โ swap models on the fly without reconfiguring
|
|
33
|
+
- **Session history** โ browse and resume past conversations with `/chats`
|
|
34
|
+
- **Background tasks** โ run long agent jobs non-interactively via `--headless`
|
|
35
|
+
- **OS Keychain integration** โ API keys stored securely in your native keychain, never in plaintext
|
|
36
|
+
|
|
37
|
+
---
|
|
38
|
+
|
|
39
|
+
### Install via npm
|
|
40
|
+
|
|
41
|
+
The fastest way to get started. Requires **Node.js v20+**:
|
|
42
|
+
|
|
43
|
+
```bash
|
|
44
|
+
npm install -g nexora-code
|
|
45
|
+
```
|
|
46
|
+
|
|
47
|
+
Or run directly without installing:
|
|
48
|
+
|
|
49
|
+
```bash
|
|
50
|
+
npx nexora-code
|
|
51
|
+
```
|
|
52
|
+
|
|
53
|
+
Nexora Code will guide you through connecting your first API key on first launch.
|
|
54
|
+
|
|
55
|
+
---
|
|
56
|
+
|
|
57
|
+
## Quick Start
|
|
58
|
+
|
|
59
|
+
```bash
|
|
60
|
+
# Start interactive chat
|
|
61
|
+
nexora
|
|
62
|
+
|
|
63
|
+
# Ask the agent to write or modify code
|
|
64
|
+
nexora write "build a REST API in Express with user auth"
|
|
65
|
+
|
|
66
|
+
# Fix a file
|
|
67
|
+
nexora fix src/components/Button.tsx
|
|
68
|
+
|
|
69
|
+
# Index your project into memory
|
|
70
|
+
nexora scan
|
|
71
|
+
|
|
72
|
+
# Run a one-shot prompt (CI/scripting)
|
|
73
|
+
echo "Summarise this file" | nexora --headless
|
|
74
|
+
```
|
|
75
|
+
|
|
76
|
+
---
|
|
77
|
+
|
|
78
|
+
## Supported Providers
|
|
79
|
+
|
|
80
|
+
Nexora Code is model-agnostic. Connect any combination of these providers:
|
|
81
|
+
|
|
82
|
+
| Provider | Models |
|
|
83
|
+
|----------------|---------------------------------------------|
|
|
84
|
+
| **Gemini** | Gemini 2.0 Flash, Gemini 1.5 Pro, and more |
|
|
85
|
+
| **Anthropic** | Claude 3.5 Sonnet, Claude 3 Haiku, and more|
|
|
86
|
+
| **OpenAI** | GPT-4o, GPT-4o Mini, o1, and more |
|
|
87
|
+
| **OpenRouter** | 200+ models via a single key |
|
|
88
|
+
| **Groq** | Llama 3.1, Mixtral, Gemma (ultra-fast) |
|
|
89
|
+
|
|
90
|
+
Manage keys at any time:
|
|
91
|
+
```bash
|
|
92
|
+
nexora auth login gemini
|
|
93
|
+
nexora auth list
|
|
94
|
+
nexora auth remove openai
|
|
95
|
+
```
|
|
96
|
+
|
|
97
|
+
---
|
|
98
|
+
|
|
99
|
+
## Commands
|
|
100
|
+
|
|
101
|
+
### CLI (one-off)
|
|
102
|
+
|
|
103
|
+
| Command | Description |
|
|
104
|
+
|----------------------------|------------------------------------------------------|
|
|
105
|
+
| `nexora` | Start interactive Chat mode |
|
|
106
|
+
| `nexora scan` | Index current project folder into semantic memory |
|
|
107
|
+
| `nexora write <desc>` | Generate files from a description (Agent mode) |
|
|
108
|
+
| `nexora fix <file>` | Analyse and fix a file autonomously (Agent mode) |
|
|
109
|
+
| `nexora auth login <p>` | Add or rotate an API key for a provider |
|
|
110
|
+
| `nexora auth list` | List all configured providers |
|
|
111
|
+
| `nexora auth remove <p>` | Remove a provider's API key |
|
|
112
|
+
| `nexora doctor` | System health: keys, DB, cache, bootstrap state |
|
|
113
|
+
| `nexora stats` | Token usage, cache hit rate, cost estimates |
|
|
114
|
+
| `nexora debug` | Internal paths, config state, runtime diagnostics |
|
|
115
|
+
| `nexora task create <job>` | Spawn a background agent task |
|
|
116
|
+
| `nexora task list` | Show running background tasks |
|
|
117
|
+
| `nexora reset` | Factory reset: wipe config, memory, and API keys |
|
|
118
|
+
| `nexora uninstall` | Clean local data and guide through full removal |
|
|
119
|
+
| `nexora --headless` | Pipe a prompt via stdin for scripting / CI use |
|
|
120
|
+
| `nexora --version` | Show version |
|
|
121
|
+
| `nexora --help` | Full command reference |
|
|
122
|
+
|
|
123
|
+
### Inside the REPL
|
|
124
|
+
|
|
125
|
+
| Command | Description |
|
|
126
|
+
|----------------------|------------------------------------------------|
|
|
127
|
+
| `/new` | Start a blank new conversation |
|
|
128
|
+
| `/chats` | Browse and resume past conversations |
|
|
129
|
+
| `/chat models` | List & select a model for Chat mode |
|
|
130
|
+
| `/agent models` | View & change Agent models |
|
|
131
|
+
| `/auto` | Toggle smart auto-model routing |
|
|
132
|
+
| `/mode agent` | Switch to Agent mode (file read/write) |
|
|
133
|
+
| `/mode chat` | Return to Chat mode |
|
|
134
|
+
| `/mode auto` | Agent auto-approves all trusted writes |
|
|
135
|
+
| `/mode plan` | Agent previews full plan before executing |
|
|
136
|
+
| `/scan` | Index current project into semantic memory |
|
|
137
|
+
| `/write <desc>` | Generate or create files from a description |
|
|
138
|
+
| `/fix <file>` | Analyse a file for bugs and patch it |
|
|
139
|
+
| `/resume` | Resume the last interrupted agent session |
|
|
140
|
+
| `/history` | Recent agent sessions and their status |
|
|
141
|
+
| `/setup` | Re-run the API key setup wizard |
|
|
142
|
+
| `/auth` | Manage API keys (login, list, remove) |
|
|
143
|
+
| `/doctor` | Show system health report |
|
|
144
|
+
| `/stats` | Token usage and cost stats |
|
|
145
|
+
| `/debug` | Internal paths and config state |
|
|
146
|
+
| `/task create <job>` | Start a background task |
|
|
147
|
+
| `/task list` | Show all running background tasks |
|
|
148
|
+
| `/task watch` | Stream output from a running task |
|
|
149
|
+
| `/task result` | View the output of a completed task |
|
|
150
|
+
| `/task cancel` | Cancel a running background task |
|
|
151
|
+
| `/clear` | Redraw the full UI |
|
|
152
|
+
| `/help` | Show command reference |
|
|
153
|
+
| `exit` | Quit Nexora Code |
|
|
154
|
+
|
|
155
|
+
---
|
|
156
|
+
|
|
157
|
+
## Uninstall
|
|
158
|
+
|
|
159
|
+
### Using the CLI (Recommended)
|
|
160
|
+
|
|
161
|
+
```bash
|
|
162
|
+
nexora uninstall
|
|
163
|
+
```
|
|
164
|
+
|
|
165
|
+
This removes local configuration, sessions, and API keys, then prints the final npm command to complete removal.
|
|
166
|
+
|
|
167
|
+
```bash
|
|
168
|
+
npm uninstall -g nexora-code
|
|
169
|
+
```
|
|
170
|
+
|
|
171
|
+
**Modes:**
|
|
172
|
+
|
|
173
|
+
| Mode | What it removes |
|
|
174
|
+
|-----------------------------|----------------------------------------------------|
|
|
175
|
+
| `nexora uninstall` | `~/.nexora`, keychain tokens |
|
|
176
|
+
| `nexora uninstall --soft` | Config & keys only, preserves logs & cache |
|
|
177
|
+
| `nexora uninstall --deep` | Complete wipe of all local Nexora data |
|
|
178
|
+
| `nexora reset` | Wipes config & memory, keeps the binary installed |
|
|
179
|
+
|
|
180
|
+
---
|
|
181
|
+
|
|
182
|
+
## Project Structure
|
|
183
|
+
|
|
184
|
+
```
|
|
185
|
+
nexora-code/
|
|
186
|
+
โโโ src/
|
|
187
|
+
โ โโโ index.ts โ Entry point & CLI router
|
|
188
|
+
โ โโโ types.ts โ Global type definitions
|
|
189
|
+
โ โโโ agent/ โ Agent engine, tools, session, safety
|
|
190
|
+
โ โ โโโ engine.ts โ Multi-action agent loop
|
|
191
|
+
โ โ โโโ tools.ts โ 50+ built-in agent tools
|
|
192
|
+
โ โ โโโ autonomy-engine.ts โ Fully autonomous task execution
|
|
193
|
+
โ โ โโโ safety-engine.ts โ Rollback, sandboxing, approval gates
|
|
194
|
+
โ โ โโโ semantic-rag.ts โ Retrieval-augmented generation
|
|
195
|
+
โ โ โโโ vector-search.ts โ Semantic project indexing
|
|
196
|
+
โ โ โโโ procedural-memory.tsโ Memory for long-term task contexts
|
|
197
|
+
โ โ โโโ git-tools.ts โ Native Git integration tools
|
|
198
|
+
โ โ โโโ scaffold-tools.ts โ Boilerplate and template generation
|
|
199
|
+
โ โ โโโ deploy-tools.ts โ Deployment automation tools
|
|
200
|
+
โ โ โโโ test-tools.ts โ Automated testing and validation
|
|
201
|
+
โ โ โโโ subagents.ts โ Swarm subagent orchestration
|
|
202
|
+
โ โโโ commands/ โ CLI subcommands
|
|
203
|
+
โ โ โโโ chat.ts โ REPL loop, memory, streaming
|
|
204
|
+
โ โ โโโ auth.ts โ API key management
|
|
205
|
+
โ โ โโโ init.ts โ Project initialization wizard
|
|
206
|
+
โ โ โโโ tasks.ts โ Background task manager
|
|
207
|
+
โ โ โโโ doctor.ts โ Diagnostics & health checks
|
|
208
|
+
โ โ โโโ uninstall.ts โ Uninstallation wizard
|
|
209
|
+
โ โโโ config/ โ Configuration files
|
|
210
|
+
โ โ โโโ agent-config.ts โ Agent behavior settings
|
|
211
|
+
โ โ โโโ chat-config.ts โ Chat UI and model configurations
|
|
212
|
+
โ โโโ core/ โ Infrastructure layer
|
|
213
|
+
โ โ โโโ provider-registry.tsโ Multi-provider BYOK routing
|
|
214
|
+
โ โ โโโ context-manager.ts โ Token budget & context windowing
|
|
215
|
+
โ โ โโโ circuit-breaker.ts โ Provider failover & retries
|
|
216
|
+
โ โ โโโ ast-mapper.ts โ Abstract Syntax Tree analysis
|
|
217
|
+
โ โ โโโ telemetry.ts โ Performance and metric tracking
|
|
218
|
+
โ โ โโโ sandbox.ts โ Isolated execution environment
|
|
219
|
+
โ โโโ utils/ โ Shared utilities
|
|
220
|
+
โ โโโ bootstrap.ts โ Runtime environment validation
|
|
221
|
+
โ โโโ keychain.ts โ OS keychain integration
|
|
222
|
+
โ โโโ mcp-client.ts โ Model Context Protocol client
|
|
223
|
+
โ โโโ multi-project.ts โ Multi-workspace management
|
|
224
|
+
โ โโโ learning-system.ts โ Adaptive learning from feedback
|
|
225
|
+
โ โโโ router.ts โ Smart auto-model routing logic
|
|
226
|
+
โ โโโ db.ts โ SQLite database connection
|
|
227
|
+
โ โโโ ui.ts โ Terminal UI chrome & animations
|
|
228
|
+
โโโ packaging/ โ Platform install/uninstall scripts
|
|
229
|
+
โโโ .github/workflows/ โ CI/CD pipelines
|
|
230
|
+
โโโ package.json
|
|
231
|
+
```
|
|
232
|
+
|
|
233
|
+
---
|
|
234
|
+
|
|
235
|
+
## Architecture Highlights
|
|
236
|
+
|
|
237
|
+
- **ESM-native TypeScript** โ fully typed, no legacy JavaScript baggage
|
|
238
|
+
- **Single bundled binary** โ esbuild bundles everything into `dist/bundle.cjs` so installation is a single npm command
|
|
239
|
+
- **OS Keychain security** โ API keys are stored in macOS Keychain, Windows Credential Manager, or Linux Secret Service via `keytar`. Never written to disk in plaintext.
|
|
240
|
+
- **SQLite + Vector Search** โ `better-sqlite3` + `sqlite-vss` powers semantic code search, session history, and caching
|
|
241
|
+
- **Provider Circuit Breaker** โ automatic failover to backup providers if a primary provider times out or errors
|
|
242
|
+
- **Safety Gates** โ all destructive agent actions (file writes, deletes, shell commands) require explicit confirmation unless running in `--auto` mode
|
|
243
|
+
|
|
244
|
+
---
|
|
245
|
+
|
|
246
|
+
## Contributing
|
|
247
|
+
|
|
248
|
+
Contributions are very welcome! Nexora Code is MIT-licensed and community-first.
|
|
249
|
+
|
|
250
|
+
**Good first issues include:**
|
|
251
|
+
- Adding new agent tools
|
|
252
|
+
- Improving provider support (new models, APIs)
|
|
253
|
+
- Enhancing the terminal UI
|
|
254
|
+
- Writing tests and docs
|
|
255
|
+
|
|
256
|
+
**To get started:**
|
|
257
|
+
```bash
|
|
258
|
+
git clone https://github.com/enochboadu/nexora-code
|
|
259
|
+
cd nexora-code
|
|
260
|
+
npm install
|
|
261
|
+
npm start # Run in development mode
|
|
262
|
+
```
|
|
263
|
+
|
|
264
|
+
For larger changes, please open an issue first to discuss your idea. We review PRs actively.
|
|
265
|
+
|
|
266
|
+
---
|
|
267
|
+
|
|
268
|
+
## Roadmap
|
|
269
|
+
|
|
270
|
+
- [ ] Cloud session sync across machines
|
|
271
|
+
- [ ] MCP (Model Context Protocol) full integration
|
|
272
|
+
- [ ] Multi-agent orchestration (spawn sub-agents for parallel tasks)
|
|
273
|
+
- [ ] Plugin marketplace for community tools
|
|
274
|
+
- [ ] Nexora Cloud โ hosted model gateway with no BYOK required
|
|
275
|
+
- [ ] VS Code extension with shared context
|
|
276
|
+
|
|
277
|
+
Follow development at [lab.getnexora.cloud](https://lab.getnexora.cloud) and star the repo to stay updated.
|
|
278
|
+
|
|
279
|
+
---
|
|
280
|
+
|
|
281
|
+
## Data Storage
|
|
282
|
+
|
|
283
|
+
All Nexora Code data is stored under `~/.nexora/` on all platforms:
|
|
284
|
+
|
|
285
|
+
| File / Directory | Contents |
|
|
286
|
+
|------------------------|---------------------------------------|
|
|
287
|
+
| `config.json` | Preferences, model selection |
|
|
288
|
+
| `state.json` | Bootstrap and setup state |
|
|
289
|
+
| `nexora.db` | Session history, semantic index |
|
|
290
|
+
| `sessions/` | Conversation session archives |
|
|
291
|
+
| `logs/` | Debug logs |
|
|
292
|
+
| `cache/` | Response cache |
|
|
293
|
+
|
|
294
|
+
API keys are **not** stored in `~/.nexora`. They live exclusively in your OS keychain.
|
|
295
|
+
|
|
296
|
+
---
|
|
297
|
+
|
|
298
|
+
## License
|
|
299
|
+
|
|
300
|
+
MIT ยฉ [Nexora Inc.](https://getnexora.cloud) โ Founded 2026 by Enoch Boadu
|
|
301
|
+
|
|
302
|
+
> Nexora Code is the open-source core of the Nexora developer platform. The goal is to make professional AI-assisted development accessible to every engineer on every team โ regardless of which AI provider they prefer or how much they want to spend.
|