@moxxy/cli 0.49.1 → 0.50.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/dist/bin.js +411 -166
- package/dist/skills/add-mcp-server.md +3 -0
- package/dist/skills/add-provider.md +6 -13
- package/dist/skills/self-update.md +3 -4
- package/dist/skills/vault-setup.md +4 -22
- package/package.json +2 -2
|
@@ -9,6 +9,7 @@ triggers:
|
|
|
9
9
|
- register mcp
|
|
10
10
|
- install mcp
|
|
11
11
|
allowed-tools:
|
|
12
|
+
- env_share
|
|
12
13
|
- mcp_test_server
|
|
13
14
|
- mcp_add_server
|
|
14
15
|
- mcp_list_servers
|
|
@@ -23,6 +24,8 @@ When the user wants to add an MCP server, walk them through these steps:
|
|
|
23
24
|
- `http` or `sse` — a remote HTTP server. Need `url`, optional `headers` (for auth).
|
|
24
25
|
- Ask what NAME to use. Must be slug-like (lowercase letters, digits, hyphens). The name prefixes every tool the server exposes — pick something short and recognizable (e.g. `canva`, `github`, `fs`).
|
|
25
26
|
|
|
27
|
+
- For a missing credential call `env_share` with its name and purpose. Put the returned `${vault:NAME}` reference in the env or header field.
|
|
28
|
+
|
|
26
29
|
2. **Test the connection BEFORE persisting**
|
|
27
30
|
- Call `mcp_test_server` with the gathered details.
|
|
28
31
|
- On success, the result lists the tools the server exposes. Show them to the user.
|
|
@@ -15,6 +15,7 @@ triggers:
|
|
|
15
15
|
- add mistral
|
|
16
16
|
- add perplexity
|
|
17
17
|
allowed-tools:
|
|
18
|
+
- env_share
|
|
18
19
|
- provider_add
|
|
19
20
|
- provider_list
|
|
20
21
|
- provider_remove
|
|
@@ -67,17 +68,9 @@ Build the list, show it to the user as a markdown table (id / context / tools /
|
|
|
67
68
|
|
|
68
69
|
Tool-call support and streaming default to `true` for OpenAI-compatible vendors (their /v1/chat/completions endpoint inherits both). Only flip them to `false` if you've confirmed the vendor doesn't.
|
|
69
70
|
|
|
70
|
-
## 3.
|
|
71
|
+
## 3. Request the provider credential
|
|
71
72
|
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
```
|
|
75
|
-
/vault set <SLUG>_API_KEY <their-key>
|
|
76
|
-
```
|
|
77
|
-
|
|
78
|
-
Use the uppercase slug, e.g. "Please run `/vault set DEEPSEEK_API_KEY <your-key>` — the value stays local; I'll only get a reference." `<SLUG>_API_KEY` is moxxy's canonical resolution path (config.apiKey → vault → env → prompt), so once it's there the provider picks it up automatically. **Stop and wait** for the user to confirm before continuing.
|
|
79
|
-
|
|
80
|
-
After they run it you'll get a note confirming storage and the reference `${vault:<SLUG>_API_KEY}` — you never see the key itself.
|
|
73
|
+
Call `env_share` with the name `<SLUG>_API_KEY` and the provider it will authenticate. After a successful save, pass this name to `provider_test`. If the person skips the request, stop the connection setup.
|
|
81
74
|
|
|
82
75
|
## 4. (Optional) Test the endpoint
|
|
83
76
|
|
|
@@ -87,7 +80,7 @@ Once the user has stored the key (step 3), verify the baseURL + key with `provid
|
|
|
87
80
|
{ "baseURL": "<base url>", "keyName": "<SLUG>_API_KEY" }
|
|
88
81
|
```
|
|
89
82
|
|
|
90
|
-
If it reports the secret is missing, the
|
|
83
|
+
If it reports the secret is missing, the credential is still missing — go back to step 3. Alternatively, after registering (step 5), the user can run `moxxy doctor`, which resolves `<SLUG>_API_KEY` from the vault and reports whether the provider's key is present.
|
|
91
84
|
|
|
92
85
|
## 5. Register the provider
|
|
93
86
|
|
|
@@ -122,13 +115,13 @@ Ask if they want this provider as the default:
|
|
|
122
115
|
|
|
123
116
|
Report:
|
|
124
117
|
- Provider slug + baseURL + default model.
|
|
125
|
-
- That the API key is in the vault under `<SLUG>_API_KEY` (the user stored it via
|
|
118
|
+
- That the API key is in the vault under `<SLUG>_API_KEY` (the user stored it via Env Share).
|
|
126
119
|
- That `~/.moxxy/providers.json` was updated and the provider is live this session.
|
|
127
120
|
- How to switch to it.
|
|
128
121
|
|
|
129
122
|
## Don't
|
|
130
123
|
|
|
131
|
-
- Don't ask the user to paste their API key to you, and don't call any tool with the key as an argument.
|
|
124
|
+
- Don't ask the user to paste their API key to you, and don't call any tool with the key as an argument. Use `env_share` so it never enters the conversation.
|
|
132
125
|
- Don't invent baseURLs, model ids, or context windows. If you're not sure, `web_fetch` or ask.
|
|
133
126
|
- Don't store the API key anywhere except the vault. Never write it into a file in the repo, never echo it back.
|
|
134
127
|
- Don't try to handle non-OpenAI-compatible vendors here — those need a real provider plugin (`.claude/agents/provider-author.md`).
|
|
@@ -133,8 +133,7 @@ export default definePlugin({
|
|
|
133
133
|
|
|
134
134
|
If the plugin needs an API key (e.g. to call a third-party API), **read it at call
|
|
135
135
|
time from the vault via `ctx.getSecret(name)`** — never `process.env`, and never ask
|
|
136
|
-
the user to paste the key into the chat.
|
|
137
|
-
`/vault set NAME <value>` (or the desktop Secrets UI); the plaintext only ever reaches
|
|
136
|
+
the user to paste the key into the chat. Request it once with `env_share`, giving the name and purpose; the plaintext only ever reaches
|
|
138
137
|
your handler, not the model's context.
|
|
139
138
|
|
|
140
139
|
```js
|
|
@@ -151,7 +150,7 @@ export default definePlugin({
|
|
|
151
150
|
permission: { action: 'prompt' },
|
|
152
151
|
handler: async ({ text }, ctx) => {
|
|
153
152
|
const key = await ctx.getSecret?.('ELEVENLABS_API_KEY');
|
|
154
|
-
if (!key) throw new Error('Set the key first:
|
|
153
|
+
if (!key) throw new Error('Set the key first: moxxy env share ELEVENLABS_API_KEY');
|
|
155
154
|
const res = await fetch('https://api.elevenlabs.io/v1/text-to-speech/...', {
|
|
156
155
|
method: 'POST',
|
|
157
156
|
headers: { 'xi-api-key': key, 'content-type': 'application/json' },
|
|
@@ -187,7 +186,7 @@ export default definePlugin({
|
|
|
187
186
|
name: 'elevenlabs',
|
|
188
187
|
async synthesize(text) {
|
|
189
188
|
const key = await getSecret?.('ELEVENLABS_API_KEY');
|
|
190
|
-
if (!key) throw new Error('Set the key:
|
|
189
|
+
if (!key) throw new Error('Set the key: moxxy env share ELEVENLABS_API_KEY');
|
|
191
190
|
const res = await fetch(
|
|
192
191
|
'https://api.elevenlabs.io/v1/text-to-speech/<voiceId>',
|
|
193
192
|
{
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: vault-setup
|
|
3
|
-
description: Help the user store secrets in the encrypted vault
|
|
3
|
+
description: Help the user store secrets in the encrypted vault with Env Share, without the secret ever reaching the model.
|
|
4
4
|
triggers: ["set up vault", "initialize vault", "store a secret", "save api key", "need an api key", "provide your key"]
|
|
5
|
-
allowed-tools: [vault_status, vault_list]
|
|
5
|
+
allowed-tools: [env_share, vault_status, vault_list]
|
|
6
6
|
---
|
|
7
7
|
# Vault setup
|
|
8
8
|
|
|
@@ -12,21 +12,9 @@ The user wants to store secrets (API keys, tokens, webhook URLs) in moxxy's encr
|
|
|
12
12
|
|
|
13
13
|
**Never ask the user to paste a secret into the chat, and never call a tool with a secret value the user gave you.** Anything the user types to you, and any tool argument you send, is visible to you (the model) and is recorded in the conversation. Secrets must not flow through there.
|
|
14
14
|
|
|
15
|
-
|
|
15
|
+
Call `env_share` with the environment variable name and why the integration needs it. The user can save or skip the request in the desktop or TUI. Continue with the returned `${vault:NAME}` reference after a successful save. If the request is skipped, stop the step that needs it.
|
|
16
16
|
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
When you need a secret from the user (e.g. an API key for a platform), tell them to run:
|
|
20
|
-
|
|
21
|
-
```
|
|
22
|
-
/vault set <NAME> <value>
|
|
23
|
-
```
|
|
24
|
-
|
|
25
|
-
For example: "I need your OpenAI API key. Please run `/vault set OPENAI_API_KEY <your-key>` — the value stays local and I'll only get a reference to it." Then **stop and wait** for the user; don't keep working until they confirm.
|
|
26
|
-
|
|
27
|
-
After they run it, you'll receive a short note confirming the secret was stored and giving you the reference `${vault:<NAME>}`. Use that reference — you will never see the value.
|
|
28
|
-
|
|
29
|
-
Naming: use slug-style names like `ANTHROPIC_API_KEY`, `OPENAI_API_KEY`, `slack_webhook_url` (letters, digits, `_`, `.`, `-`).
|
|
17
|
+
For a headless session the person can run `moxxy env share NAME` in a local terminal. The command asks privately for the value. Check entry names with `vault_list` before continuing.
|
|
30
18
|
|
|
31
19
|
## Using a stored secret
|
|
32
20
|
|
|
@@ -40,9 +28,3 @@ Naming: use slug-style names like `ANTHROPIC_API_KEY`, `OPENAI_API_KEY`, `slack_
|
|
|
40
28
|
## Verify
|
|
41
29
|
|
|
42
30
|
Call `vault_list` (names + metadata only, never plaintext) or have the user run `/vault list` to confirm the entry is present.
|
|
43
|
-
|
|
44
|
-
## Don't
|
|
45
|
-
|
|
46
|
-
- Don't ask the user to type or paste a secret value into the chat — direct them to `/vault set` instead.
|
|
47
|
-
- Don't print the plaintext of an existing secret. If the user wants to verify, suggest they run `/vault list`.
|
|
48
|
-
- Don't reuse a name for two different secrets — storing overwrites silently.
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@moxxy/cli",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.50.0",
|
|
4
4
|
"description": "moxxy command-line agent: TUI, one-shot prompts, setup, services, and API-key or installed-CLI subscription providers.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"moxxy",
|
|
@@ -49,7 +49,7 @@
|
|
|
49
49
|
"dependencies": {
|
|
50
50
|
"undici": "^8.12.2",
|
|
51
51
|
"zod": "^4.6.7",
|
|
52
|
-
"@moxxy/sdk": "0.
|
|
52
|
+
"@moxxy/sdk": "0.50.0"
|
|
53
53
|
},
|
|
54
54
|
"optionalDependencies": {
|
|
55
55
|
"@napi-rs/keyring": "^2.1.2"
|