@inventeer.tech/apex 0.2.31 → 0.2.32

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 +386 -18
  2. package/package.json +1 -1
package/README.md CHANGED
@@ -1,8 +1,29 @@
1
1
  # @inventeer.tech/apex
2
2
 
3
- **AI-powered software delivery agent. From task to merged PR across multiple repos.**
3
+ **AI-powered software delivery agent. From task description to open pull request — across multiple repos.**
4
4
 
5
- This is the npm wrapper for the [APEX CLI](https://github.com/Inventeer/apex). It downloads the correct pre-built binary for your platform on install.
5
+ [![Platform](https://img.shields.io/badge/platform-macOS%20%7C%20Linux%20%7C%20Windows-lightgrey?style=flat)]()
6
+ [![License MIT](https://img.shields.io/badge/license-MIT-blue?style=flat)](https://github.com/Inventeer/apex/blob/main/LICENSE)
7
+ [![npm](https://img.shields.io/npm/v/@inventeer.tech/apex?style=flat)](https://www.npmjs.com/package/@inventeer.tech/apex)
8
+
9
+ ---
10
+
11
+ ## What is APEX?
12
+
13
+ APEX is a terminal CLI that turns a ticket (`ENG-123`) into merged pull requests across all your repositories — autonomously. You describe the task, approve the plan, and watch the code land in real time.
14
+
15
+ ```
16
+ You type: /eng.start ENG-123
17
+ APEX does: fetches the ticket → reads all your repos → proposes a cross-repo plan
18
+ You press: [A] to approve
19
+ APEX does: writes the code, runs tests, opens one PR per repo
20
+ ```
21
+
22
+ **What runs on your machine:** the `apex` binary, a native AI runtime engine, and your git repos.
23
+ **What lives in the cloud:** codebase semantic search (RAG), episodic session memory, LLM proxy, org config.
24
+ **What never happens:** files created in your repos, credentials stored anywhere besides `~/.apex/`.
25
+
26
+ ---
6
27
 
7
28
  ## Install
8
29
 
@@ -10,44 +31,391 @@ This is the npm wrapper for the [APEX CLI](https://github.com/Inventeer/apex). I
10
31
  npm install -g @inventeer.tech/apex
11
32
  ```
12
33
 
13
- Supports macOS (x64/arm64), Linux (x64/arm64), and Windows (x64).
34
+ The binary is self-contained — no Go, Docker, or external runtime required.
35
+
36
+ **Other install methods:**
14
37
 
15
- ## Usage
38
+ ```bash
39
+ # macOS — Homebrew
40
+ brew install Inventeer/tap/apex
41
+
42
+ # macOS / Linux — shell script
43
+ curl -fsSL https://install.apex.dev | sh
44
+ ```
45
+
46
+ Verify:
47
+
48
+ ```bash
49
+ apex version
50
+ ```
51
+
52
+ ---
53
+
54
+ ## The Workspace Concept
55
+
56
+ > This is the most important thing to understand about APEX.
57
+
58
+ A **workspace** is a named group of repositories that APEX treats as a single unit. When you start a task, APEX reads, understands, and writes code across **all repos in the workspace simultaneously** — like a senior engineer who has the full stack loaded in their head.
59
+
60
+ ```
61
+ workspace: payment-platform
62
+ ├── backend/ (Node.js API)
63
+ ├── frontend/ (React app)
64
+ └── shared-types/ (TypeScript contracts)
65
+ ```
66
+
67
+ When APEX works on `ENG-123: add refund endpoint`, it will:
68
+ - Read the backend schema, frontend payment hooks, and shared type definitions
69
+ - Generate a plan that touches all three repos
70
+ - Write changes across all repos at once
71
+ - Open one PR per repo, with cross-repo dependency notes
72
+
73
+ **You register each repo once**, then forget about it:
74
+
75
+ ```bash
76
+ cd ~/repos/backend && apex init
77
+ cd ~/repos/frontend && apex init
78
+ cd ~/repos/shared-types && apex init
79
+ ```
80
+
81
+ APEX detects the git remote and technology stack automatically. All three repos are now in the same workspace.
82
+
83
+ ---
84
+
85
+ ## Full Setup Walk-through
86
+
87
+ Follow these steps once to go from zero to your first AI-assisted PR.
88
+
89
+ ### Step 1 — Authenticate with GitHub
16
90
 
17
91
  ```bash
18
- # Authenticate (once per machine)
19
92
  apex login
93
+ ```
94
+
95
+ Opens the GitHub Device Flow in your browser. After approval, APEX stores a JWT in `~/.apex/credentials`. No API keys needed for this step.
96
+
97
+ ### Step 2 — Configure a model provider
98
+
99
+ APEX needs an LLM API key. Add at least one:
100
+
101
+ ```bash
102
+ # Anthropic Claude (recommended)
103
+ apex config set anthropic_api_key sk-ant-...
104
+ apex config set default_model anthropic/claude-opus-4-5
105
+
106
+ # Or OpenAI
107
+ apex config set openai_api_key sk-...
108
+ apex config set default_model openai/gpt-4o
109
+
110
+ # Or Google Gemini
111
+ apex config set google_api_key AI...
112
+ apex config set default_model google/gemini-2.0-flash
113
+ ```
114
+
115
+ You can configure separate models for planning (reasoning) vs. coding (speed):
116
+
117
+ ```bash
118
+ apex config set planning_model anthropic/claude-opus-4-5
119
+ apex config set coding_model anthropic/claude-sonnet-4-5
120
+ ```
121
+
122
+ ### Step 3 — Connect your issue tracker (optional but recommended)
123
+
124
+ ```bash
125
+ # Linear
126
+ apex auth linear
127
+
128
+ # Jira
129
+ apex config set jira_base_url https://myorg.atlassian.net
130
+ apex config set jira_api_token ...
131
+ apex config set jira_email you@company.com
132
+
133
+ # GitHub (for PRs)
134
+ apex config set github_token ghp_...
135
+ ```
136
+
137
+ When Linear or Jira is connected, APEX fetches the full ticket description, acceptance criteria, and linked issues before starting any work.
138
+
139
+ ### Step 4 — Register your repos
140
+
141
+ Run from inside each repository you want APEX to work with:
142
+
143
+ ```bash
144
+ cd ~/repos/backend && apex init
145
+ cd ~/repos/frontend && apex init
146
+ ```
20
147
 
21
- # Register your repo
22
- cd ~/repos/backend && apex init
148
+ Both repos are added to the same workspace automatically (based on git remote).
23
149
 
24
- # Index for RAG
150
+ ### Step 5 — Index the codebase
151
+
152
+ ```bash
25
153
  apex index
154
+ ```
155
+
156
+ This reads all source files, chunks them into 100-line overlapping segments, generates semantic embeddings, and stores them for search. Run this once after registration, and again after large changes.
157
+
158
+ > The TUI shows an amber warning when the index is more than 24 hours old.
159
+
160
+ ### Step 6 — Verify everything is working
161
+
162
+ ```bash
163
+ apex doctor
164
+ ```
165
+
166
+ Expected output:
26
167
 
27
- # Launch
168
+ ```
169
+ ✅ native runtime: built-in
170
+ ✅ model API key: anthropic configured
171
+ ✅ workspace: backend, frontend registered
172
+ ✅ gateway: connected
173
+ ```
174
+
175
+ Fix any ❌ items before continuing.
176
+
177
+ ### Step 7 — Launch
178
+
179
+ ```bash
28
180
  apex
29
181
  ```
30
182
 
31
- ## What is APEX?
183
+ APEX opens the workspace selector and the 3-panel TUI:
32
184
 
33
- APEX takes a developer from a task description to open pull requests across multiple repositories — with full context awareness, episodic memory, and zero configuration files left in your repos.
185
+ ```
186
+ ╔═══════════════════════════════════════════════════════════════════════════╗
187
+ ║ APEX ▸ payment-platform v0.2.30 ║
188
+ ╠══════════════════╦════════════════════════════════╦════════════════════════╣
189
+ ║ Workspace ║ ║ Live Diff ║
190
+ ║ ────────────── ║ APEX ║ ──────────────────── ║
191
+ ║ • backend ║ Workspace ready: ║ backend/ ║
192
+ ║ • frontend ║ › 2 repos indexed ║ src/payments/ ║
193
+ ║ • shared-types ║ › 4,139 files in RAG ║ client.ts +12 -3 ║
194
+ ║ ║ › Episodic memory: 7 sessions║ ║
195
+ ║ Sessions ║ ║ frontend/ ║
196
+ ║ ─────────────── ║ Type /eng.start ENG-XX ║ src/checkout/ ║
197
+ ║ 1 paused ║ or describe your task ║ Payment.tsx +8 -1 ║
198
+ ╠══════════════════╩════════════════════════════════╩════════════════════════╣
199
+ ║ › _ ║
200
+ ╚═══════════════════════════════════════════════════════════════════════════╝
201
+ ```
202
+
203
+ ---
204
+
205
+ ## The Delivery Workflow
206
+
207
+ Once APEX is running, this is the typical sequence for any engineering task:
208
+
209
+ ### `/init-apex` · Initialize the workspace
210
+
211
+ ```
212
+ /init-apex
213
+ ```
214
+
215
+ Runs on first use or after significant codebase changes. APEX loads your workspace configuration, reads your `ENV.md` files, and prepares the context.
216
+
217
+ ---
218
+
219
+ ### `/warm-up` · Load context before starting
34
220
 
35
221
  ```
36
- apex /eng.start TASK-456
222
+ /warm-up
37
223
  ```
38
224
 
39
- The AI fetches the ticket, investigates all workspace repos, proposes a cross-repo plan, and executes it step by step. When you close the terminal, the session is summarized. Next time, APEX resumes in under 500 tokens of overhead.
225
+ APEX reads git status across all repos, loads recent decisions, and summarizes the current workspace state. Run this at the start of each day or session. Takes ~30 seconds.
226
+
227
+ ---
228
+
229
+ ### `/eng.start ENG-XX` · Investigate and plan
230
+
231
+ ```
232
+ /eng.start ENG-123
233
+ ```
234
+
235
+ APEX:
236
+ 1. Fetches the Linear/Jira ticket (description, ACs, linked issues)
237
+ 2. Recalls relevant past sessions from episodic memory
238
+ 3. Searches the codebase for related code via semantic RAG
239
+ 4. Analyzes all affected repos
240
+ 5. Produces a phased cross-repo implementation plan
241
+
242
+ You review the plan and press:
243
+
244
+ ```
245
+ [ A ] Approve [ E ] Edit [ C ] Cancel
246
+ ```
247
+
248
+ ---
249
+
250
+ ### `/eng.work` · Execute the plan
251
+
252
+ ```
253
+ /eng.work
254
+ ```
255
+
256
+ APEX writes code across all workspace repos following the approved plan. The **Live Diff panel** on the right updates in real time as files change. The AI runs tests as it goes and self-corrects up to 3 times on failures.
257
+
258
+ You can watch, or come back when it's done.
259
+
260
+ ---
261
+
262
+ ### `/eng.pre-pr` · Validate before opening PRs
263
+
264
+ ```
265
+ /eng.pre-pr
266
+ ```
267
+
268
+ APEX runs a full quality gate across all repos:
269
+ - Unit and integration tests
270
+ - Type checking
271
+ - Lint
272
+ - Cross-repo dependency validation
273
+
274
+ Any failures are auto-fixed. You get a quality report with a pass/fail score.
275
+
276
+ ---
277
+
278
+ ### `/eng.pr` · Open pull requests
279
+
280
+ ```
281
+ /eng.pr
282
+ ```
40
283
 
41
- **What runs locally**: the `apex` binary, a native in-process AI runtime engine, and your repos.
42
- **What lives in the cloud**: codebase RAG, episodic session memory, org config, LLM proxy with context injection.
284
+ APEX opens **one PR per repo**, each containing:
285
+ - A description derived from the ticket
286
+ - A list of files changed and why
287
+ - Cross-repo dependency notes (e.g. "this PR requires `shared-types#42` to be merged first")
288
+ - Linear/Jira ticket status updated automatically
289
+
290
+ ---
291
+
292
+ ## Session Memory
293
+
294
+ APEX remembers everything between sessions.
295
+
296
+ When you close the terminal or pause a session, APEX generates a structured summary:
297
+ - What was completed
298
+ - What is pending
299
+ - Which files were modified
300
+ - Architectural decisions made
301
+ - Next steps
302
+
303
+ The next time you start a session on a similar task, that context is automatically injected into the AI — in under 500 tokens of overhead.
304
+
305
+ ```bash
306
+ # List paused sessions
307
+ apex session list
308
+
309
+ # Resume exactly where you left off
310
+ apex session resume <id>
311
+ ```
312
+
313
+ You never need to re-explain the codebase.
314
+
315
+ ---
316
+
317
+ ## Slash Commands Reference
318
+
319
+ Type these inside the APEX TUI:
320
+
321
+ | Command | What it does |
322
+ |---|---|
323
+ | `/init-apex` | Initialize workspace context and load configuration |
324
+ | `/warm-up` | Load git status, decisions, and workspace summary |
325
+ | `/eng.start ENG-XX` | Fetch ticket, analyze repos, produce implementation plan |
326
+ | `/eng.plan` | Re-present or refine the current plan |
327
+ | `/eng.work` | Execute the approved plan — writes code across all repos |
328
+ | `/eng.pre-pr` | Run tests, lint, type check; auto-fix failures |
329
+ | `/eng.pr` | Open one PR per repo; update issue tracker |
330
+ | `/eng.debug` | Root-cause analysis and incident investigation |
331
+ | `/eng.review` | Review current diff and staged changes |
332
+ | `/eng.docs` | Update technical documentation |
333
+ | `/qa-gate` | Run full quality gate with numeric scoring |
334
+
335
+ ---
336
+
337
+ ## CLI Reference
338
+
339
+ ```bash
340
+ apex # Open workspace selector and launch
341
+ apex login # Authenticate with GitHub
342
+ apex logout # Remove stored credentials
343
+ apex init # Register current repo in a workspace
344
+ apex index # Index workspace repos for semantic search
345
+ apex index --repo backend # Index a specific repo only
346
+ apex index --full # Force full re-index (clears previous)
347
+ apex doctor # Run pre-flight health checks
348
+ apex session list # List paused sessions
349
+ apex session resume <id> # Resume a paused session
350
+ apex workspace list # List all workspaces
351
+ apex workspace edit <name> # Add or remove repos from a workspace
352
+ apex knowledge add <path> # Upload docs/ADRs to org knowledge base
353
+ apex config set <key> <value> # Store a credential or config value
354
+ apex config show # Show current configuration
355
+ apex usage # Show token consumption by model/provider
356
+ apex decisions # Show saved architectural decisions
357
+ apex logs # Tail the latest AI engine log
358
+ apex version # Print version
359
+ ```
360
+
361
+ ---
362
+
363
+ ## Integrations
364
+
365
+ | Integration | What APEX does |
366
+ |---|---|
367
+ | **Linear** | Fetches ticket description and ACs; updates status when PR is opened |
368
+ | **Jira** | Fetches issue details; transitions status on PR open |
369
+ | **GitHub** | Opens PRs; monitors CI via Checks API; push webhook for auto re-index |
370
+ | **GitLab** | Opens merge requests; checks pipeline status |
371
+
372
+ Connect them:
373
+
374
+ ```bash
375
+ apex auth linear # OAuth flow
376
+ apex config set github_token ghp_...
377
+ apex config set jira_base_url https://myorg.atlassian.net
378
+ apex config set jira_api_token ...
379
+ apex config set jira_email you@company.com
380
+ ```
381
+
382
+ ---
383
+
384
+ ## Common Questions
385
+
386
+ **Q: Does APEX create files in my repos?**
387
+ No. APEX writes code to your repos (that's the point) but creates zero configuration or state files there. All state lives in `~/.apex/` and the cloud.
388
+
389
+ **Q: Do I need to re-explain my codebase every session?**
390
+ No. APEX indexes your code into a semantic search index (RAG) and stores session summaries in episodic memory. Both are injected automatically on every LLM call.
391
+
392
+ **Q: What if a task spans 4 repos?**
393
+ Register all 4 with `apex init`. APEX operates across all of them in every session. The plan, code changes, and PRs span all repos automatically.
394
+
395
+ **Q: Can I use APEX without Linear or Jira?**
396
+ Yes. You can describe the task in plain English instead of a ticket ID:
397
+ ```
398
+ › add rate limiting to the payments API, 100 req/min per user
399
+ ```
400
+
401
+ **Q: How do I pause mid-task and resume tomorrow?**
402
+ Close the TUI (Ctrl+C) or type `/pause`. APEX saves a structured summary. Tomorrow, run `apex session resume <id>`.
403
+
404
+ **Q: What models are supported?**
405
+ Anthropic Claude, OpenAI GPT-4o, and Google Gemini. You bring your own API key. Configure separate models for planning vs. coding phases.
406
+
407
+ ---
43
408
 
44
409
  ## Links
45
410
 
46
- - [Homepage](https://github.com/Inventeer/apex)
411
+ - [GitHub](https://github.com/Inventeer/apex)
47
412
  - [Documentation](https://github.com/Inventeer/apex/tree/main/docs)
413
+ - [Get Started Guide](https://github.com/Inventeer/apex/blob/main/docs/get-started.md)
48
414
  - [Releases](https://github.com/Inventeer/apex-releases/releases)
49
- - [Issues](https://github.com/Inventeer/apex/issues)
415
+ - [Issues & Feedback](https://github.com/Inventeer/apex/issues)
416
+
417
+ ---
50
418
 
51
419
  ## License
52
420
 
53
- MIT
421
+ MIT © [Inventeer](https://github.com/Inventeer)
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@inventeer.tech/apex",
3
- "version": "0.2.31",
3
+ "version": "0.2.32",
4
4
  "description": "AI-powered software delivery agent",
5
5
  "bin": {
6
6
  "apex": "./bin/apex"