futurex-cli 0.1.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 +66 -0
- package/dist/index.js +7216 -0
- package/dist/index.js.map +7 -0
- package/package.json +66 -0
package/README.md
ADDED
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
# futurex-cli
|
|
2
|
+
|
|
3
|
+
FutureX — a **DeepSeek-only**, terminal-native AI coding agent (Claude-Code-like). A streaming,
|
|
4
|
+
repo-aware REPL plus an agentic tool loop with permission gates. Runs on **Windows, Linux, and macOS**
|
|
5
|
+
(pure Node + pnpm, no Docker).
|
|
6
|
+
|
|
7
|
+
➡️ **Full cross-platform setup & run guide: [`docs/futurex/RUNNING.md`](../../docs/futurex/RUNNING.md).**
|
|
8
|
+
|
|
9
|
+
## Install (published CLI)
|
|
10
|
+
|
|
11
|
+
```bash
|
|
12
|
+
npm i -g futurex-cli # or: pnpm add -g futurex-cli
|
|
13
|
+
futurex login # device-code sign-in against the FIM gateway
|
|
14
|
+
futurex # interactive REPL · futurex agent "<task>" · futurex --help
|
|
15
|
+
```
|
|
16
|
+
|
|
17
|
+
The published binary is a single bundled file: all internal `@fim/*` packages are
|
|
18
|
+
inlined at build time, so a global install pulls only the runtime deps. It talks to
|
|
19
|
+
the hosted gateway by default; point it elsewhere with `FUTUREX_API_URL`.
|
|
20
|
+
|
|
21
|
+
> **Building the package:** `pnpm --filter futurex-cli build` bundles `src/` →
|
|
22
|
+
> `dist/index.js` via [`build.mjs`](./build.mjs) (esbuild). `npm publish` runs it
|
|
23
|
+
> automatically through `prepublishOnly`.
|
|
24
|
+
|
|
25
|
+
## Quick start (from the monorepo)
|
|
26
|
+
|
|
27
|
+
From the repo root (auto-loads the workspace `.env`, which must contain `DEEPSEEK_API_KEY`):
|
|
28
|
+
|
|
29
|
+
```bash
|
|
30
|
+
pnpm futurex # interactive REPL
|
|
31
|
+
pnpm futurex ask "explain src/index.ts"
|
|
32
|
+
pnpm futurex index # index the repo for retrieval-augmented answers
|
|
33
|
+
pnpm futurex agent "add a null check to the login handler" # agentic loop: tools + permission gate
|
|
34
|
+
pnpm futurex login # use the FIM gateway (needs `pnpm dev` running)
|
|
35
|
+
pnpm futurex --help
|
|
36
|
+
```
|
|
37
|
+
|
|
38
|
+
## Commands
|
|
39
|
+
|
|
40
|
+
- **`futurex`** / **`futurex ask "<q>"`** — streaming chat, grounded by a stable system prefix
|
|
41
|
+
(system + `futurex-memory.md` + repo card) and, when an index exists, retrieved repo chunks.
|
|
42
|
+
- **`futurex agent "<task>"`** — ReAct loop: the model calls tools — `read_file`/`list_dir`/
|
|
43
|
+
`grep_search` (auto) and `write_file`/`terminal_exec` (**permission-gated**) — and iterates to an
|
|
44
|
+
answer. Flags: `--auto-approve`, `--max-steps <n>`.
|
|
45
|
+
- **`futurex index`** — scan + redact + chunk + embed (in-process, DeepSeek-only) + persist a per-repo
|
|
46
|
+
index under `~/.futurex/index/`.
|
|
47
|
+
- **`futurex login` / `whoami` / `logout`** — authenticate against the FIM gateway (gateway mode).
|
|
48
|
+
|
|
49
|
+
Common flags: `-r/--reason`, `--max`, `--pro`, `-m/--model <id>`, `--max-tokens <n>`, `--top-k <n>`,
|
|
50
|
+
`--no-memory`, `--no-repo`, `--no-context`, `-v/--version`.
|
|
51
|
+
|
|
52
|
+
## Modes
|
|
53
|
+
|
|
54
|
+
- **Local (offline):** not logged in → the CLI calls DeepSeek directly (needs `DEEPSEEK_API_KEY`).
|
|
55
|
+
- **Gateway:** after `futurex login` → routes through the FIM gateway (sessions + usage metering); the
|
|
56
|
+
CLI never calls DeepSeek itself.
|
|
57
|
+
|
|
58
|
+
## Architecture seam
|
|
59
|
+
|
|
60
|
+
The CLI talks to a `FutureXClient` from [`@fim/futurex-protocol`](../../packages/futurex-protocol) —
|
|
61
|
+
`createGatewayClient()` when logged in, else `createDirectClient()` — so chat code is backend-agnostic.
|
|
62
|
+
The `agent` loop additionally uses [`@fim/futurex-tools`](../../packages/futurex-tools) (tool schemas +
|
|
63
|
+
hardened executor) and [`@fim/ai-sdk`](../../packages/ai-sdk) tool-calling.
|
|
64
|
+
|
|
65
|
+
See [`docs/futurex/review.md`](../../docs/futurex/review.md) for the architecture and what remains for a
|
|
66
|
+
shipped (signed-binary) product.
|