@lunaroute/cli 0.1.0 → 0.2.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 +55 -0
- package/dist/index.js +1623 -0
- package/package.json +1 -1
package/README.md
ADDED
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
# @lunaroute/cli
|
|
2
|
+
|
|
3
|
+
One command to put your coding agent on LunaRoute.
|
|
4
|
+
|
|
5
|
+
`lunaroute` configures the coding harness you already use — Pi, Claude Code, OpenCode, Copilot CLI, or any OpenAI-compatible agent — to route through [LunaRoute](https://www.lunaroute.com): one API for a rotating catalog of frontier models, with per-model credit pricing and a usage ledger you can read from your terminal.
|
|
6
|
+
|
|
7
|
+
## Install
|
|
8
|
+
|
|
9
|
+
```sh
|
|
10
|
+
npm install -g @lunaroute/cli
|
|
11
|
+
```
|
|
12
|
+
|
|
13
|
+
Requires Node.js 20+.
|
|
14
|
+
|
|
15
|
+
## Quickstart
|
|
16
|
+
|
|
17
|
+
```sh
|
|
18
|
+
lunaroute login # authorize this device in your browser
|
|
19
|
+
lunaroute setup pi # or: claude-code | opencode | copilot-cli | generic
|
|
20
|
+
```
|
|
21
|
+
|
|
22
|
+
`setup` asks before touching anything: for `pi` it first offers to install the LunaRoute Pi extension + MCP adapter (recommended — models then auto-sync), and falls back to a `~/.pi/agent/models.json` merge if you decline. It finishes with an `export LUNAROUTE_API_KEY=…` line — run it in your shell, then start your agent and it routes through LunaRoute.
|
|
23
|
+
|
|
24
|
+
Prefer a script? `setup pi --extension` / `--models` pick a flow, `--yes` accepts all prompts, and `--print` previews without writing.
|
|
25
|
+
|
|
26
|
+
## What it enables
|
|
27
|
+
|
|
28
|
+
- **One-command setup** — `lunaroute setup` writes the right config for `pi`, `claude-code`, `opencode`, `copilot-cli`, or `generic` (any OpenAI-compatible base URL swap).
|
|
29
|
+
- **Session launches** — `lunaroute run claude` or `lunaroute run codex` starts a session wired to LunaRoute; `--model` picks from the catalog, everything after `--` passes through to the harness.
|
|
30
|
+
- **The catalog, in your terminal** — `models`, `pricing`, and `usage` show what's available, what it costs (credits per million tokens), and your wallet balance plus recent ledger entries.
|
|
31
|
+
- **Project memory** — `memory search` and `memory read` query your past agent conversations for the current project. `lunaroute mcp` exposes the same tools as a stdio MCP server, and `skill install` wires the memory skill + MCP into Claude Code.
|
|
32
|
+
|
|
33
|
+
## Commands
|
|
34
|
+
|
|
35
|
+
| Command | What it does |
|
|
36
|
+
|---|---|
|
|
37
|
+
| `lunaroute login` | Authorize this device via the browser and store a routing key |
|
|
38
|
+
| `lunaroute whoami` | Show the signed-in user and organization |
|
|
39
|
+
| `lunaroute logout` | Remove stored credentials |
|
|
40
|
+
| `lunaroute setup <harness>` | Configure `opencode` \| `pi` \| `openclaw` \| `claude-code` \| `copilot-cli` \| `generic`. pi setup is interactive (asks before writing); `--extension` / `--models` pick a flow, `--yes` accepts prompts, `--print` previews |
|
|
41
|
+
| `lunaroute run <harness>` | Launch `claude` \| `claude-code` \| `codex` on LunaRoute for this session |
|
|
42
|
+
| `lunaroute models` | List available LunaRoute models |
|
|
43
|
+
| `lunaroute pricing` | Per-model pricing (credits per million tokens) |
|
|
44
|
+
| `lunaroute usage` | Wallet balance and recent usage |
|
|
45
|
+
| `lunaroute memory search [query]` | Search past conversations for the current project |
|
|
46
|
+
| `lunaroute memory read <id>` | Read a full past conversation by id |
|
|
47
|
+
| `lunaroute mcp` | Run a stdio MCP server exposing the memory tools |
|
|
48
|
+
| `lunaroute skill install` | Install the LunaRoute memory skill + MCP server into Claude Code |
|
|
49
|
+
|
|
50
|
+
All commands accept `--profile <name>` for multiple credential profiles; `models`, `pricing`, `usage`, and the `memory` commands accept `--json` for machine-readable output.
|
|
51
|
+
|
|
52
|
+
## Links
|
|
53
|
+
|
|
54
|
+
- Site: <https://www.lunaroute.com>
|
|
55
|
+
- Sign up: <https://app.lunaroute.com/auth/signup>
|