@moxxy/cli 0.0.0 → 0.1.2

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 ADDED
@@ -0,0 +1,237 @@
1
+ <p align="center">
2
+ <a href="https://moxxy.ai">
3
+ <img src="https://moxxy.ai/logo-gradient.svg" alt="moxxy" width="160" />
4
+ </a>
5
+ </p>
6
+
7
+ <h1 align="center">@moxxy/cli</h1>
8
+
9
+ <p align="center">
10
+ <strong>The <code>moxxy</code> binary.</strong><br/>
11
+ Interactive TUI, one-shot prompts, channels, scheduler, MCP, services — all the surfaces in one bundled command.
12
+ </p>
13
+
14
+ <p align="center">
15
+ <a href="https://www.npmjs.com/package/@moxxy/cli">
16
+ <img src="https://img.shields.io/npm/v/@moxxy/cli?logo=npm&logoColor=white" alt="npm" />
17
+ </a>
18
+ <a href="https://nodejs.org">
19
+ <img src="https://img.shields.io/badge/node-%3E%3D20.10-brightgreen?logo=node.js&logoColor=white" alt="Node ≥20.10" />
20
+ </a>
21
+ <a href="https://www.typescriptlang.org">
22
+ <img src="https://img.shields.io/badge/TypeScript-strict-3178C6?logo=typescript&logoColor=white" alt="TypeScript" />
23
+ </a>
24
+ <a href="https://github.com/moxxy-ai/new_moxxy/actions/workflows/ci.yml">
25
+ <img src="https://github.com/moxxy-ai/new_moxxy/actions/workflows/ci.yml/badge.svg" alt="CI" />
26
+ </a>
27
+ </p>
28
+
29
+ <p align="center">
30
+ <a href="#-installation">Install</a>
31
+ &nbsp;·&nbsp;
32
+ <a href="#-quickstart">Quickstart</a>
33
+ &nbsp;·&nbsp;
34
+ <a href="https://moxxy.ai">Docs</a>
35
+ &nbsp;·&nbsp;
36
+ <a href="#-commands">Commands</a>
37
+ &nbsp;·&nbsp;
38
+ <a href="#-channels">Channels</a>
39
+ &nbsp;·&nbsp;
40
+ <a href="#-services">Services</a>
41
+ </p>
42
+
43
+ ---
44
+
45
+ ## ✨ What this package is
46
+
47
+ `@moxxy/cli` is the published `moxxy` binary. It bundles the framework runtime, every built-in mode + provider + plugin, the Ink TUI channel, MCP support, the scheduler, webhooks, and the OS-service installer into a single executable.
48
+
49
+ If you want to **use** moxxy, install this. If you want to **author plugins**, depend on [`@moxxy/sdk`](https://www.npmjs.com/package/@moxxy/sdk) instead.
50
+
51
+ | | |
52
+ |---|---|
53
+ | 🧩 **Every block is a plugin** | Anthropic / OpenAI / ChatGPT-OAuth providers, five loop strategies, built-in Read/Edit/Write/Bash/Grep/Glob, MCP, memory, vault — all swappable. |
54
+ | 📺 **Multi-channel** | TUI, Telegram, HTTP, web, cron, webhooks — one session, many surfaces. |
55
+ | 🎙 **Voice in** | Telegram voice notes & `POST /v1/turn/audio` route through a `Transcriber` (Whisper plugin ships built-in). |
56
+ | 🔐 **Vault** | AES-256-GCM secrets at rest; reference as `${vault:KEY}` in config. |
57
+ | 🧠 **Long-term memory** | Journal-based with vector recall; TF-IDF built in, swap to OpenAI embeddings. |
58
+ | ⏰ **Always-on** | `moxxy service install` for per-channel launchd / systemd units, or `moxxy serve --background` for everything in one process. |
59
+ | 🪪 **Permission gating** | Every tool call gated; allow-always rules learned per tool. |
60
+ | 🛡 **Pluggable isolation** | Opt-in capability sandboxing (`inproc` shipped; `worker` / `subprocess` / `wasm` / `docker` drop-in). Off by default. |
61
+
62
+ ## 🚀 Installation
63
+
64
+ ```sh
65
+ npm install -g @moxxy/cli
66
+ ```
67
+
68
+ Or run it without installing:
69
+
70
+ ```sh
71
+ npx @moxxy/cli init
72
+ ```
73
+
74
+ **Requirements**: Node.js ≥ 20.10. An API key for a supported provider (Anthropic, OpenAI) — or sign into ChatGPT via `moxxy login openai-codex`.
75
+
76
+ ## ⚡ Quickstart
77
+
78
+ ```sh
79
+ moxxy init # interactive: choose provider, paste API key (goes into the vault)
80
+ moxxy # launch the interactive TUI
81
+ ```
82
+
83
+ One-shot from the command line:
84
+
85
+ ```sh
86
+ moxxy -p "summarize the README in three bullets"
87
+ ```
88
+
89
+ Resume a previous conversation:
90
+
91
+ ```sh
92
+ moxxy resume
93
+ ```
94
+
95
+ That's it. `moxxy --help` lists every command; `moxxy <command> --help` shows per-command details.
96
+
97
+ ## 🧭 Commands
98
+
99
+ The `moxxy` CLI groups commands the same way `moxxy --help` does:
100
+
101
+ ### Setup
102
+
103
+ | Command | What it does |
104
+ |---|---|
105
+ | `moxxy init` | Interactive first-time setup. Picks a provider, captures the key, writes it into the vault. |
106
+ | `moxxy login <provider>` | OAuth sign-in for providers that don't use API keys (e.g. `openai-codex`). |
107
+ | `moxxy login status` | Show stored OAuth credentials. |
108
+ | `moxxy login logout <provider>` | Remove stored OAuth credentials. |
109
+ | `moxxy doctor` | Diagnose your install — provider readiness, vault unlock, missing optional deps. |
110
+
111
+ ### Run
112
+
113
+ | Command | What it does |
114
+ |---|---|
115
+ | `moxxy` | Default — start the Ink TUI. |
116
+ | `moxxy tui` | Same, explicit. |
117
+ | `moxxy -p "…"` (or `--prompt`) | One-shot prompt to stdout. |
118
+ | `moxxy resume [-s <id>]` | Resume a persisted session (interactive picker if no id). |
119
+ | `moxxy <channel>` | Start a registered channel by name. |
120
+ | `moxxy channels` | List registered channels + their subcommands. |
121
+ | `moxxy serve` | Start every channel + the scheduler + webhooks in one process. |
122
+
123
+ ### Manage
124
+
125
+ | Command | What it does |
126
+ |---|---|
127
+ | `moxxy sessions list` / `delete` | Inspect or remove persisted sessions. |
128
+ | `moxxy skills list` / `new` / `audit` | Manage skill files (user / project / builtin / plugin scopes). |
129
+ | `moxxy plugins list` / `reload` / `new` | Manage the plugin host; reload picks up newly installed packages. |
130
+ | `moxxy mcp list` / `add` / `enable` / `disable` / `remove` | Manage MCP servers in `~/.moxxy/mcp.json`. |
131
+ | `moxxy perms list` / `add` / `remove` | Inspect or edit the persisted permission rules. |
132
+ | `moxxy memory journal` / `recall` | Read or query long-term memory. |
133
+ | `moxxy schedule add` / `list` / `remove` | Time-driven prompts (cron or one-shot ISO). |
134
+ | `moxxy security audit` / `status` / `isolators` | Inspect tool capability declarations and active isolator. |
135
+ | `moxxy service install` / `logs` / `status` / `uninstall` | Background OS services (launchd / systemd). |
136
+ | `moxxy self-update` | Update bundled plugins/skills/core safely. |
137
+
138
+ ### Flags
139
+
140
+ | Flag | What it does |
141
+ |---|---|
142
+ | `--prompt, -p "…"` | One-shot input. |
143
+ | `--model <id>` | Override the default model for this invocation. |
144
+ | `--output-format <fmt>` | `text` \| `json` \| `stream-json` (one-shot output mode). |
145
+ | `--cwd <path>` | Set the agent's working directory. |
146
+ | `--config <path>` | Load a specific `moxxy.config.ts`. |
147
+ | `--no-color` | Disable ANSI colors. |
148
+ | `-h, --help` / `-v, --version` | Standard. |
149
+
150
+ ### Environment
151
+
152
+ | Variable | What it does |
153
+ |---|---|
154
+ | `ANTHROPIC_API_KEY` | Default Anthropic provider key. |
155
+ | `OPENAI_API_KEY` | OpenAI provider key (and openai embeddings). |
156
+ | `MOXXY_VAULT_PASSPHRASE` | Headless vault unlock when no OS keychain is available. |
157
+ | `MOXXY_FIXTURES` | `record` \| `replay` — provider fixture mode (used by tests). |
158
+
159
+ ## 📺 Channels
160
+
161
+ Run your agent through whatever surface fits the task:
162
+
163
+ | Channel | What it does | Command |
164
+ |---|---|---|
165
+ | **TUI** | Grok-style interactive terminal UI | `moxxy` |
166
+ | **Telegram** | Message your agent from anywhere; voice notes get transcribed and run as turns; pairs with a 6-digit code | `moxxy telegram` |
167
+ | **HTTP** | `POST /v1/turn` (JSON, SSE streaming) or `POST /v1/turn/audio` (raw bytes, iOS Shortcut friendly), bearer-token auth | `moxxy channels http` |
168
+ | **Cron** | Time-driven prompts (cron expressions or one-shot ISO timestamps) | `moxxy schedule add …` |
169
+ | **Webhooks** | External systems fire prompts on signed POST. HMAC + bearer + filter rules. | `moxxy serve` (auto-starts the listener) |
170
+
171
+ ## ⏰ Services
172
+
173
+ Two ways to keep moxxy online 24/7:
174
+
175
+ ```sh
176
+ # Per-channel units (one process each, independent crashes)
177
+ moxxy service install telegram # launchd on macOS, systemd --user on Linux
178
+ moxxy service logs telegram # tail the log
179
+
180
+ # Or: one process for everything, shared event log
181
+ moxxy serve --background # every channel + scheduler + webhooks
182
+ moxxy serve --background --except http # skip what you don't want
183
+ moxxy serve --status # is it running?
184
+ ```
185
+
186
+ Logs land in `~/.moxxy/services/<name>.log`; units survive reboots.
187
+
188
+ ## ⚙ Configuration
189
+
190
+ `moxxy.config.ts` at your project root:
191
+
192
+ ```ts
193
+ import { defineConfig } from '@moxxy/config';
194
+
195
+ export default defineConfig({
196
+ provider: {
197
+ name: 'anthropic',
198
+ model: 'claude-sonnet-4-6',
199
+ config: { apiKey: '${vault:ANTHROPIC_API_KEY}' }, // resolved from the vault
200
+ },
201
+ mode: 'tool-use',
202
+ plugins: {
203
+ '@moxxy/mode-plan-execute': { enabled: false }, // disable per-plugin
204
+ },
205
+ });
206
+ ```
207
+
208
+ `${vault:NAME}` placeholders resolve on session start. The vault unlocks via OS keychain (`keytar`) with a passphrase fallback (`MOXXY_VAULT_PASSPHRASE` for headless boxes).
209
+
210
+ ## 🧩 What ships in the binary
211
+
212
+ The CLI bundles a complete out-of-the-box stack:
213
+
214
+ - **Providers**: Anthropic, OpenAI, ChatGPT-OAuth (via `openai-codex`).
215
+ - **Loop strategies**: `tool-use` (default Claude-Code-style), `plan-execute`, `bmad`, `developer`, `deep-research`.
216
+ - **Tools**: Read, Edit, Write, Bash, Grep, Glob, WebFetch, browser-session (Playwright, optional), computer-control (macOS).
217
+ - **MCP**: register any Model Context Protocol server as a tool source.
218
+ - **Skills**: prompt-only Markdown files; the agent can author new skills for itself.
219
+ - **Memory**: long-term journal + STM selectors; TF-IDF vector recall ships built in.
220
+ - **Vault**: AES-256-GCM secrets at rest, `${vault:KEY}` references in config.
221
+ - **Voice in**: `@moxxy/plugin-stt-whisper` for any audio-capable channel.
222
+ - **Webhooks**: signed HTTP listener + `cloudflared` / `ngrok` tunnel helper.
223
+ - **Security**: opt-in capability isolation (`inproc` built-in; `worker` / `subprocess` / `wasm` drop in).
224
+
225
+ For the full package map and the framework's internal architecture see the [root README](https://github.com/moxxy-ai/new_moxxy#-developer-guide).
226
+
227
+ ## 📚 Docs
228
+
229
+ Full docs at **[docs.moxxy.ai](https://docs.moxxy.ai)**: concepts, recipes, plugin authoring, channel guides. Marketing site: [moxxy.ai](https://moxxy.ai).
230
+
231
+ ## 🤝 Contributing
232
+
233
+ PRs welcome. Issue tracker + author guides live in the [moxxy monorepo](https://github.com/moxxy-ai/new_moxxy).
234
+
235
+ ## 📝 License
236
+
237
+ TBD.