frely-cli 0.6.1 → 0.6.6

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 (64) hide show
  1. package/README.md +188 -38
  2. package/dist/agent-help.d.ts +287 -0
  3. package/dist/agent-help.js +64 -0
  4. package/dist/agent-help.js.map +1 -0
  5. package/dist/auth.d.ts +3 -1
  6. package/dist/auth.js +3 -2
  7. package/dist/auth.js.map +1 -1
  8. package/dist/cloud.d.ts +7 -0
  9. package/dist/cloud.js +263 -0
  10. package/dist/cloud.js.map +1 -0
  11. package/dist/device/connection-status.d.ts +42 -0
  12. package/dist/device/connection-status.js +112 -0
  13. package/dist/device/connection-status.js.map +1 -0
  14. package/dist/device/relay-client.d.ts +7 -0
  15. package/dist/device/relay-client.js +124 -56
  16. package/dist/device/relay-client.js.map +1 -1
  17. package/dist/diagnostics.d.ts +66 -4
  18. package/dist/diagnostics.js +133 -25
  19. package/dist/diagnostics.js.map +1 -1
  20. package/dist/index.js +157 -38
  21. package/dist/index.js.map +1 -1
  22. package/dist/key-budget.d.ts +22 -0
  23. package/dist/key-budget.js +97 -0
  24. package/dist/key-budget.js.map +1 -0
  25. package/dist/mcp-authorization.js +3 -3
  26. package/dist/mcp-authorization.js.map +1 -1
  27. package/dist/mcp-command.d.ts +9 -0
  28. package/dist/mcp-command.js +68 -0
  29. package/dist/mcp-command.js.map +1 -0
  30. package/dist/runtime/diagnostics.d.ts +17 -0
  31. package/dist/runtime/diagnostics.js +84 -0
  32. package/dist/runtime/diagnostics.js.map +1 -0
  33. package/dist/runtime/mcp.d.ts +3 -0
  34. package/dist/runtime/mcp.js +40 -23
  35. package/dist/runtime/mcp.js.map +1 -1
  36. package/dist/runtime/relay-mcp.d.ts +9 -3
  37. package/dist/runtime/relay-mcp.js +66 -19
  38. package/dist/runtime/relay-mcp.js.map +1 -1
  39. package/dist/service.d.ts +4 -0
  40. package/dist/service.js +28 -4
  41. package/dist/service.js.map +1 -1
  42. package/dist/skill/access.d.ts +70 -0
  43. package/dist/skill/access.js +292 -0
  44. package/dist/skill/access.js.map +1 -0
  45. package/dist/skill/managed.d.ts +32 -0
  46. package/dist/skill/managed.js +152 -0
  47. package/dist/skill/managed.js.map +1 -0
  48. package/dist/upgrade/installation.d.ts +24 -0
  49. package/dist/upgrade/installation.js +137 -0
  50. package/dist/upgrade/installation.js.map +1 -0
  51. package/dist/upgrade/maintenance.d.ts +15 -0
  52. package/dist/upgrade/maintenance.js +133 -0
  53. package/dist/upgrade/maintenance.js.map +1 -0
  54. package/dist/upgrade/release.d.ts +9 -0
  55. package/dist/upgrade/release.js +45 -0
  56. package/dist/upgrade/release.js.map +1 -0
  57. package/dist/upgrade/service-refresh.d.ts +38 -0
  58. package/dist/upgrade/service-refresh.js +138 -0
  59. package/dist/upgrade/service-refresh.js.map +1 -0
  60. package/dist/upgrade/update.d.ts +49 -0
  61. package/dist/upgrade/update.js +228 -0
  62. package/dist/upgrade/update.js.map +1 -0
  63. package/package.json +3 -2
  64. package/skills/frely-cli/SKILL.md +8 -0
package/README.md CHANGED
@@ -1,13 +1,22 @@
1
1
  # frely-cli
2
2
 
3
- 设计与 ChatGPT MCP 用户流程见 [`docs/chatgpt-mcp.md`](docs/chatgpt-mcp.md)。
3
+ 设备 MCP 的产品定义与通用客户端接入见 [`docs/device-mcp.md`](docs/device-mcp.md)。
4
4
 
5
- `frely-cli` is Frely's local command-line client and MCP runtime. The target flow is:
5
+ `frely-cli` includes FrelyMCP: let agents access your device from any location. Browser agents and command-line agents such as Codex and Claude Code use MCP to access the files, commands and processes on the computer you authorize. Invoking Frely-hosted Agents and sharing local model Providers are optional CLI features with their own setup and authorization.
6
+
7
+ **Release boundary (checked 2026-09-17):** npm `frely-cli@latest` resolves to
8
+ `0.6.2`. The published tarball includes device MCP, Provider commands,
9
+ `frely skill install` and `frely agent invoke`. Agent examples below apply to that
10
+ release. Package contents establish command availability; service deployment,
11
+ account or API-key access and client connections need their own verification.
6
12
 
7
13
  ```text
8
- install -> frely login -> frely mcp setup -> add stable MCP URL to ChatGPT -> OAuth authorize
14
+ Remote Agent Skill: install -> frely login -> frely skill install -> frely agent invoke
15
+ Device MCP: install on target computer -> frely login -> frely mcp -> add MCP URL to client -> OAuth authorize
9
16
  ```
10
17
 
18
+ `frely skill install` installs a local trigger Skill. It does not install a model or change the user's current model Provider/Base URL. `frely mcp` provisions local file, shell, process, and workspace execution; consuming a remote Frely Agent does not require that local execution authorization.
19
+
11
20
  There is no separate `friday-local` project. Local MCP execution belongs to `frely-cli`.
12
21
 
13
22
  This repository contains the open-source Frely client and local MCP runtime.
@@ -15,6 +24,13 @@ The hosted Friday Relay control plane remains a separate service dependency.
15
24
  See [`CONTRIBUTING.md`](CONTRIBUTING.md) for development guidance and
16
25
  [`SECURITY.md`](SECURITY.md) for private vulnerability reporting.
17
26
 
27
+ ## Landing page
28
+
29
+ The open-source CLI landing page lives in [`site/`](site/README.md), alongside
30
+ the CLI under the same Apache-2.0 license and trademark policy. It is prepared
31
+ for `cli.frely.cloud` and deploys independently as a static site. Website assets
32
+ are excluded from the npm package.
33
+
18
34
  ## Quick install
19
35
 
20
36
  After the standalone artifacts and installer are released, Frely can serve `install.sh` as:
@@ -41,32 +57,57 @@ npm install --global frely-cli@0.3.6
41
57
 
42
58
  ## Update an existing installation
43
59
 
44
- If you installed `frely-cli` with the official installer, run the [Quick install](#quick-install) installer again. It replaces the global package with the latest `frely-cli` release. If you installed the package directly with npm, run one of the commands in [Install or update with npm](#install-or-update-with-npm) again.
45
-
46
- If multiple `frely` executables are installed, list the candidates and check the npm global installation:
47
-
48
- ```sh
49
- type -a frely
50
- npm prefix --global
51
- "$(npm prefix --global)/bin/frely" --version
52
- ```
53
-
54
- Your shell uses the first `frely` path in `PATH`. If that path is not the npm global bin directory, put `$(npm prefix --global)/bin` earlier in `PATH` and run `frely --version` again.
55
-
56
- If the background Device Relay service is running, restart it after the update so it loads the new CLI version:
57
-
58
60
  ```sh
59
- frely mcp service stop
60
- frely mcp service start
61
- ```
62
-
63
- Verify the update:
64
-
65
- ```sh
66
- frely --version
67
61
  frely doctor
62
+ frely upgrade
68
63
  ```
69
64
 
65
+ `doctor` reports the installation path, distribution and latest stable version.
66
+ Release lookup has a timeout; offline version checks do not fail other diagnostics.
67
+ Use `doctor --json` for structured results. `upgrade` has no options and never
68
+ changes to a different installer, edits PATH or downgrades a newer installation.
69
+
70
+ On macOS/Linux, `upgrade` updates the current standalone, npm-global or Bun-global
71
+ installation. Standalone downloads are checksum-checked and tested before the
72
+ installed executable is replaced. npm/Bun keep their original global directory
73
+ and run with `--ignore-scripts`. Unknown installations, local links, source
74
+ checkouts and temporary runners are left unchanged.
75
+
76
+ A matching, running Device Relay service is paused for maintenance, restarted
77
+ and checked after installation. Credentials, device identity, MCP URL, workspace
78
+ and authorization expiry are preserved. Stopped or uninstalled services stay
79
+ that way. If requests or managed processes are still running, the upgrade exits
80
+ without stopping them. Finish those tasks and run the command in a local terminal;
81
+ an upgrade invoked inside the MCP service being upgraded is itself active work.
82
+ The connection may disconnect during the service restart. Installation, runtime
83
+ version and Relay connectivity are reported separately.
84
+
85
+ On Windows, `upgrade` prints a PowerShell command for the detected installation.
86
+ Run it in a local terminal after finishing Frely tasks, then run `frely doctor`.
87
+ The CLI does not launch an update helper or schedule a background replacement.
88
+
89
+ For an already-running macOS/Linux service with automatic refresh support,
90
+ updating the same installation with npm, Bun or the standalone installer also
91
+ loads the new version without manual service commands. The service checks local
92
+ installation files every five seconds, waits for two stable observations and
93
+ checks that the new CLI starts. Active calls, managed processes and buffered
94
+ responses defer the switch; calls remain available while work finishes.
95
+ It uses the existing service supervisor and does not download updates itself.
96
+ The MCP address, credentials, workspace and authorization expiry stay unchanged.
97
+
98
+ A service that is stopped or not installed is never started by this watcher.
99
+ Foreground sessions, source/link installs, changes of installation path and
100
+ Windows replacement remain outside automatic refresh. A short reconnection
101
+ window is possible; failed or outcome-unknown calls are not replayed.
102
+
103
+ Versions predating the upgrade/refresh support require a one-time transition;
104
+ see [service maintenance and legacy upgrades](docs/service-maintenance.md).
105
+ Manual pause/resume commands remain in maintenance help.
106
+
107
+ If more than one `frely` is installed, check the path shown by `doctor` before
108
+ upgrading. The CLI does not remove other installations or choose one by changing
109
+ shell configuration. See [the self-upgrade contract](docs/self-upgrade.md).
110
+
70
111
  ## Install from a local checkout
71
112
 
72
113
  To install the current source checkout with Bun:
@@ -92,14 +133,69 @@ the lockfiles synchronized when changing dependencies.
92
133
 
93
134
  ## First use
94
135
 
136
+ Sign in once when the consumer uses their own Frely account:
137
+
95
138
  ```sh
96
139
  frely login
97
- frely mcp setup --workspace /path/to/project
140
+ ```
141
+
142
+ To choose another browser or Frely account, disable automatic browser opening:
143
+
144
+ ```sh
145
+ frely login --no-browser
146
+ ```
147
+
148
+ Open the printed URL only in the browser signed in to the account you want to use. Visiting a device authorization URL while signed in can bind that code to the account before you click Approve. If the default browser already opened it with another account, press Ctrl+C, run `frely login --no-browser` again, and use the **new URL**. Signing in again or reusing the old URL does not switch its account. Keep `--relay <url>` when using a custom Relay.
149
+
150
+ `FRELY_NO_BROWSER=1` remains supported for scripts and existing setups. `frely login --help` lists the available options.
151
+
152
+ ### Invoke a Frely-hosted Agent
153
+
154
+ The verified npm release `0.6.2` includes the Agent installation and invocation
155
+ commands below. Use a published Agent with account or restricted API-key access.
156
+
157
+ To install a published Frely Agent as a local trigger Skill:
158
+
159
+ ```sh
160
+ frely skill install https://app.frely.cloud/api/public/virtual-models/<distribution-id> \
161
+ --host pi \
162
+ --scope global \
163
+ --json
164
+ ```
165
+
166
+ A Creator can also provide an existing model-scoped, quota-limited API key for a sponsored/demo invocation. Pass it only on stdin so it never appears in argv or the generated Skill:
167
+
168
+ ```sh
169
+ printf '%s' "$FRELY_AGENT_KEY" | \
170
+ frely skill install https://app.frely.cloud/api/public/virtual-models/<distribution-id> \
171
+ --host chatgpt \
172
+ --scope global \
173
+ --api-key-stdin \
174
+ --json
175
+ ```
176
+
177
+ The CLI verifies the key against the target model-scoped MCP `tools/list` endpoint, stores it in the secure credential store, and records only `authMode=api-key` in managed Skill metadata. Use short-lived, single-model keys with bounded quota for sharing; do not paste a Creator master key.
178
+
179
+ The generated Skill calls the published Agent through Frely's model-scoped MCP endpoint. Invoke the installed Agent from automation with the full task on stdin:
180
+
181
+ ```sh
182
+ printf '%s' 'Your complete task' | \
183
+ frely agent invoke '<distribution-id>' --input-stdin --json
184
+ ```
185
+
186
+ ### Device MCP: control this computer from a remote client
187
+
188
+ Frely CLI turns the target computer into a personal device MCP service. ChatGPT in a browser, Claude Code on another computer, and other remote HTTP MCP clients with OAuth use the same endpoint. Install and run Frely CLI on the computer to control; the calling computer only needs its MCP client.
189
+
190
+ Enable file, shell and process access on the target computer:
191
+
192
+ ```sh
193
+ frely mcp --workspace /path/to/project
98
194
  ```
99
195
 
100
196
  `frely login` requests a restricted account session through browser device authorization. Basic sessions use private plaintext files, not the OS credential store. Legacy account cookies do not migrate to this store. Basic features and Network commands do not initialize MCP credentials.
101
197
 
102
- `frely mcp setup` initializes a separate secure MCP key, requests browser approval for this device and workspace, and installs the user-level Device Relay service. The default authorization is 90 days; `--days 1..180` selects a duration. `frely mcp renew --days 180` requires a new approval and rotates the MCP execution key. The MCP URL remains bound to the device. Login refresh, OAuth refresh, restart and repeated setup do not extend authorization.
198
+ `frely mcp` initializes a separate secure MCP key, requests browser approval for this device and workspace, and installs the user-level Device Relay service. The default authorization is 90 days; `--days 1..180` selects a duration. `frely mcp renew --days 180` requires a new approval and rotates the MCP execution key. The MCP URL remains bound to the device. Login refresh, OAuth refresh, restart and repeated setup do not extend authorization.
103
199
 
104
200
  Services use macOS LaunchAgents, Linux systemd user units, or Windows Task Scheduler for the logged-on user. Windows implementation needs native acceptance testing. Linux MCP secure storage can require Secret Service or an injected key; basic installation does not.
105
201
 
@@ -109,12 +205,28 @@ You can print the URL again with:
109
205
  frely mcp url
110
206
  ```
111
207
 
112
- Or show ChatGPT-oriented instructions with:
208
+ If MCP has not been configured, `frely mcp url` automatically runs the equivalent of `frely mcp setup --workspace ~`: it requests browser approval for your home directory (90 days by default), then installs the background service and prints the URL. Run `frely login` first. To select a project directory instead, run `frely mcp --workspace /path/to/project` before requesting the URL. Existing workspaces are preserved; expired authorization still requires `frely mcp renew`. Setup prompts go to stderr, so stdout remains a single URL or, with `--json`, a JSON object. No URL is printed if approval or service installation fails.
209
+
210
+ Add the exact printed URL to a remote MCP client with OAuth support, choose
211
+ OAuth and complete authorization. Keep the computer online. Ask the client to
212
+ list the top-level names in your selected workspace, without writing files or
213
+ running shell commands. A returned result that matches the folder verifies the
214
+ first connection. `frely doctor` shows whether the running relay has a recent heartbeat; it does not complete client OAuth authorization or execute a tool through that client.
215
+
216
+ Use `frely doctor` for a quick overview. If a call fails, run `frely doctor -v` for detailed diagnostics.
217
+
218
+ For Claude Code on the calling computer, replace the placeholder with the URL printed on the target computer:
113
219
 
114
220
  ```sh
115
- frely mcp chatgpt
221
+ claude mcp add --transport http frely-computer "<MCP_URL>"
116
222
  ```
117
223
 
224
+ Open `/mcp` in Claude Code to complete OAuth authorization. Use a distinct server name per device. Ask the Agent to use Frely tools for remote work; its built-in shell still runs on the calling computer. Clients of the same device share its workspace and managed processes. Unknown-outcome writes must not be replayed.
225
+
226
+ Manage your devices in Frely → **Device MCP** (`/user/account/connections`). The page shows execution permission and connection history, not a live online indicator. Client OAuth authorization and device execution permission have separate lifecycles.
227
+
228
+ `frely mcp setup` and `frely mcp chatgpt` remain compatibility aliases. The latter prints the same connection details; it does not create a ChatGPT-specific service. A bare `frely mcp` uses the current directory.
229
+
118
230
  ## Local model sharing
119
231
 
120
232
  `frely-cli` can publish a loopback OpenAI-compatible runtime as a Frely personal Provider. Ollama is the default driver.
@@ -148,23 +260,30 @@ frely provider finalize <provider-id>
148
260
 
149
261
  `finalize` resumes CPA setup for a Provider left in a prepared state.
150
262
 
263
+ ## Frely Cloud
264
+
265
+ Use `frely cloud` to discover and call cloud business operations. See [Cloud commands and authorization](docs/cloud.md).
266
+
151
267
  ## Commands
152
268
 
153
269
  ```text
154
- frely login [--relay <https-url>]
270
+ frely login [--relay <https-url>] [--no-browser]
155
271
  frely logout
156
272
  frely whoami
157
- frely status [--json]
158
- frely doctor [--json]
273
+ frely doctor [-v] [--json]
274
+ frely upgrade
275
+ frely skill install <manifest-url> [--host chatgpt|codex|claude-code|pi|generic] [--scope global|project] [--api-key-stdin] [--json]
276
+ frely skill status <distribution-id> [--json]
277
+ frely skill remove <distribution-id> [--json]
278
+ frely agent invoke <distribution-id> (--input <text>|--input-stdin) [--json]
159
279
  frely provider share [ollama|openai-compatible] [--url <loopback-v1-url>] [--models <a,b>] [--slot <slot-id>] [--name <name>]
160
280
  frely provider list [--json]
161
281
  frely provider finalize <provider-id>
162
- frely mcp setup [--workspace <path>]
282
+ frely mcp [--workspace <path>] [--days 1..180]
283
+ frely mcp renew [--days 1..180]
163
284
  frely mcp url [--json]
164
- frely mcp status [--json]
165
- frely mcp chatgpt
166
285
  frely mcp serve [--workspace <path>]
167
- frely mcp service status|start|stop|uninstall [--json]
286
+ frely mcp service start|stop|uninstall
168
287
  frely mcp revoke
169
288
  frely mcp stdio [--workspace <path>]
170
289
  ```
@@ -191,7 +310,9 @@ Enrollment returns:
191
310
  }
192
311
  ```
193
312
 
194
- The public MCP URL has the stable form `https://app.frely.cloud/mcp/<device-id>`. The URL contains no bearer secret. Remote MCP clients use OAuth 2.1 Authorization Code + PKCE. OAuth access tokens bind to the exact MCP resource URL and do not extend the 90/180-day local execution authorization. Relay OAuth requirements are defined in [`docs/mcp-oauth-relay-contract.md`](docs/mcp-oauth-relay-contract.md).
313
+ The public MCP URL is the canonical resource returned by Relay, for example
314
+ `https://connect.frely.cloud/mcp/<device-id>`. Use `frely mcp url`; do not derive the URL
315
+ from the control-plane hostname. The URL contains no bearer secret. Remote MCP clients use OAuth 2.1 Authorization Code + PKCE. OAuth access tokens bind to the exact MCP resource URL and do not extend the 90/180-day local execution authorization. Relay OAuth requirements are defined in [`docs/mcp-oauth-relay-contract.md`](docs/mcp-oauth-relay-contract.md).
195
316
 
196
317
  A Device Relay connection request uses the enrolled Ed25519 device key and returns a short-lived connection grant:
197
318
 
@@ -225,7 +346,31 @@ MCP secrets use AES-256-GCM files with a master key in macOS Keychain, Windows C
225
346
 
226
347
  The stable MCP URL contains no credential. Remote clients hold OAuth credentials; the CLI holds the MCP execution private key. The Relay checks OAuth resource binding and the current MCP execution lease. Expiry blocks requests and queued work and cancels managed execution. It does not undo writes or create a sandbox around arbitrary shell programs.
227
348
 
228
- `frely doctor` treats unconfigured MCP as optional. `frely doctor --mcp` checks the secure credential and server. `frely mcp status` displays local metadata; it is not server revocation proof.
349
+ `frely doctor` is the single diagnostic entry point. It reports the installation
350
+ path and distribution, checks the latest stable release with a deadline, and reads
351
+ local account, MCP authorization, service and connection state. It does not access
352
+ the MCP keyring in summary mode. An unavailable release source is informational;
353
+ unconfigured account/MCP features remain optional.
354
+
355
+ `frely doctor -v` (also `--verbose`) adds configuration paths, runtime details,
356
+ service state, authorization expiry, last received heartbeat and sanitized last
357
+ connection error. It also checks session storage, the account session and any
358
+ configured MCP secure key/server authorization. Add `--json` to either view for
359
+ structured output. Confirmed failures and unknown connectivity for a configured
360
+ relay return a nonzero exit code.
361
+
362
+ A running process is not proof of connectivity. Connected means the matching
363
+ account/device process has received a WebSocket heartbeat within 75 seconds.
364
+ The MCP authorization and workspace must also match the running relay. Missing,
365
+ stale or old-runtime observations are reported as unknown. Verbose diagnostics
366
+ include the running CLI version, entry path and start time. Diagnostics never
367
+ restart the service or open a second relay connection. Neither mode claims
368
+ to test client OAuth or an end-to-end tool call.
369
+
370
+ Legacy `frely status`, `frely mcp status`, `frely mcp service status` and
371
+ `frely doctor --mcp` remain compatible for existing scripts, but are no longer
372
+ listed as recommended diagnostic entry points. The legacy status output shapes
373
+ are unchanged; `doctor --mcp` requests verbose checks and requires MCP setup.
229
374
 
230
375
  Storage, migration, service injection, release requirements and threat boundaries: [`docs/credential-storage.md`](docs/credential-storage.md).
231
376
 
@@ -274,3 +419,8 @@ node dist/index.js network help --json
274
419
  ```
275
420
 
276
421
  CLI unit tests use a fake credential store and temporary home directories. They do not verify the user's OS credential-store permissions or a deployed Network.
422
+
423
+ The planned unified MCP entry will support wallet-funded capability use without
424
+ a Frely account. Current device MCP authorization and demo Network calls do not
425
+ implement that complete flow. See [Wallet access plan](docs/mcp-wallet-access-plan.md)
426
+ for the accepted product boundary and remaining work.
@@ -0,0 +1,287 @@
1
+ export declare const COMMANDS: readonly [{
2
+ readonly id: "cloud";
3
+ readonly usage: "frely cloud list|describe|call|login|logout [--help]";
4
+ readonly auth: "cloud-oauth";
5
+ readonly effect: "subcommand-dependent";
6
+ readonly purpose: "Discover and call Frely cloud business operations at app.frely.cloud/mcp. Use describe before call; parameters and results are JSON.";
7
+ }, {
8
+ readonly id: "upgrade";
9
+ readonly usage: "frely upgrade";
10
+ readonly auth: "none";
11
+ readonly effect: "local-write";
12
+ readonly purpose: "Upgrade the current installation to the latest stable release. Windows prints a manual command; doctor checks versions.";
13
+ }, {
14
+ readonly id: "help";
15
+ readonly usage: "frely help --agent --json";
16
+ readonly auth: "none";
17
+ readonly effect: "read";
18
+ readonly purpose: "Read this installed CLI's current Agent instructions.";
19
+ }, {
20
+ readonly id: "key.budget";
21
+ readonly usage: "frely key budget (--api-key-stdin [--relay <url>]|--distribution <distribution-id>) [--json]";
22
+ readonly auth: "api-key";
23
+ readonly effect: "read";
24
+ readonly purpose: "Read the Key's self usage and each funding source's limits without account login.";
25
+ }, {
26
+ readonly id: "skill.install";
27
+ readonly usage: "frely skill install <manifest-url> [--host chatgpt|codex|claude-code|pi|generic] [--scope global|project] [--api-key-stdin] [--json]";
28
+ readonly auth: "optional-api-key";
29
+ readonly effect: "local-write";
30
+ readonly purpose: "Install the public Agent's trigger Skill; an API key goes only through stdin to secure storage.";
31
+ }, {
32
+ readonly id: "skill.status";
33
+ readonly usage: "frely skill status <distribution-id> [--json]";
34
+ readonly auth: "none";
35
+ readonly effect: "read";
36
+ readonly purpose: "Inspect a managed Agent Skill.";
37
+ }, {
38
+ readonly id: "skill.remove";
39
+ readonly usage: "frely skill remove <distribution-id> [--json]";
40
+ readonly auth: "none";
41
+ readonly effect: "local-write";
42
+ readonly purpose: "Remove a managed Agent Skill and its saved API key.";
43
+ }, {
44
+ readonly id: "agent.invoke";
45
+ readonly usage: "frely agent invoke <distribution-id> (--input <text>|--input-stdin) [--json]";
46
+ readonly auth: "installed-api-key-or-account";
47
+ readonly effect: "remote-call";
48
+ readonly purpose: "Send the complete relevant user request to the installed Agent through model-scoped MCP. Usage may be billed.";
49
+ }, {
50
+ readonly id: "login";
51
+ readonly usage: "frely login [--relay <url>] [--no-browser]";
52
+ readonly auth: "browser";
53
+ readonly effect: "authorization";
54
+ readonly purpose: "Authorize the CLI for the user's Frely account.";
55
+ }, {
56
+ readonly id: "logout";
57
+ readonly usage: "frely logout";
58
+ readonly auth: "none";
59
+ readonly effect: "local-write";
60
+ readonly purpose: "Remove login and stop the MCP background service.";
61
+ }, {
62
+ readonly id: "whoami";
63
+ readonly usage: "frely whoami";
64
+ readonly auth: "account";
65
+ readonly effect: "read";
66
+ readonly purpose: "Read the signed-in account.";
67
+ }, {
68
+ readonly id: "doctor";
69
+ readonly usage: "frely doctor [-v] [--json]";
70
+ readonly auth: "optional-account";
71
+ readonly effect: "diagnostic";
72
+ readonly purpose: "Show installation, available upgrades, account, MCP and connection status; -v runs detailed diagnostics.";
73
+ }, {
74
+ readonly id: "provider.share";
75
+ readonly usage: "frely provider share [ollama|openai-compatible] [--url <loopback-v1-url>] [--models <a,b>] [--slot <slot-id>] [--name <name>]";
76
+ readonly auth: "account";
77
+ readonly effect: "remote-write";
78
+ readonly purpose: "Publish a local model Provider.";
79
+ }, {
80
+ readonly id: "provider.list";
81
+ readonly usage: "frely provider list [--json]";
82
+ readonly auth: "account";
83
+ readonly effect: "read";
84
+ readonly purpose: "List configured local Providers.";
85
+ }, {
86
+ readonly id: "provider.finalize";
87
+ readonly usage: "frely provider finalize <provider-id>";
88
+ readonly auth: "account";
89
+ readonly effect: "remote-write";
90
+ readonly purpose: "Finish a prepared local Provider.";
91
+ }, {
92
+ readonly id: "mcp.setup";
93
+ readonly usage: "frely mcp [--workspace <path>] [--days 1..180]";
94
+ readonly auth: "account-and-browser";
95
+ readonly effect: "authorization";
96
+ readonly purpose: "Enable this computer as a device MCP service for remote HTTP MCP clients with OAuth; install its background service.";
97
+ }, {
98
+ readonly id: "mcp.renew";
99
+ readonly usage: "frely mcp renew [--days 1..180]";
100
+ readonly auth: "account-and-browser";
101
+ readonly effect: "authorization";
102
+ readonly purpose: "Renew this device's execution authorization without changing its MCP URL.";
103
+ }, {
104
+ readonly id: "mcp.url";
105
+ readonly usage: "frely mcp url [--json]";
106
+ readonly auth: "account-and-mcp-or-browser";
107
+ readonly effect: "authorization-if-unconfigured";
108
+ readonly purpose: "Read this device's stable MCP URL. If unconfigured, set up the user home directory with browser approval and install the background service. --json includes HTTP transport and OAuth connection details; setup prompts go to stderr.";
109
+ }, {
110
+ readonly id: "mcp.serve";
111
+ readonly usage: "frely mcp serve [--workspace <path>]";
112
+ readonly auth: "account-and-mcp";
113
+ readonly effect: "local-execution";
114
+ readonly purpose: "Serve authorized local workspace tools.";
115
+ }, {
116
+ readonly id: "mcp.service";
117
+ readonly usage: "frely mcp service start|stop|uninstall";
118
+ readonly auth: "none";
119
+ readonly effect: "local-service";
120
+ readonly purpose: "Pause, resume or remove the local MCP background service for maintenance. Supported upgrades restore running services without these commands.";
121
+ }, {
122
+ readonly id: "mcp.revoke";
123
+ readonly usage: "frely mcp revoke";
124
+ readonly auth: "account";
125
+ readonly effect: "remote-write";
126
+ readonly purpose: "Revoke device MCP execution authorization for every connected client.";
127
+ }, {
128
+ readonly id: "mcp.stdio";
129
+ readonly usage: "frely mcp stdio [--workspace <path>]";
130
+ readonly auth: "mcp";
131
+ readonly effect: "local-execution";
132
+ readonly purpose: "Serve authorized local tools over stdio.";
133
+ }, {
134
+ readonly id: "network";
135
+ readonly usage: "frely network setup|status|find|use|logout [--json]";
136
+ readonly auth: "network";
137
+ readonly effect: "subcommand-dependent";
138
+ readonly purpose: "Access Frely Network using its separate setup and credentials.";
139
+ }];
140
+ export declare function agentHelp(): {
141
+ schemaVersion: string;
142
+ cliVersion: string;
143
+ bootstrapVersion: number;
144
+ skill_update_required: boolean;
145
+ instructions: string[];
146
+ commands: readonly [{
147
+ readonly id: "cloud";
148
+ readonly usage: "frely cloud list|describe|call|login|logout [--help]";
149
+ readonly auth: "cloud-oauth";
150
+ readonly effect: "subcommand-dependent";
151
+ readonly purpose: "Discover and call Frely cloud business operations at app.frely.cloud/mcp. Use describe before call; parameters and results are JSON.";
152
+ }, {
153
+ readonly id: "upgrade";
154
+ readonly usage: "frely upgrade";
155
+ readonly auth: "none";
156
+ readonly effect: "local-write";
157
+ readonly purpose: "Upgrade the current installation to the latest stable release. Windows prints a manual command; doctor checks versions.";
158
+ }, {
159
+ readonly id: "help";
160
+ readonly usage: "frely help --agent --json";
161
+ readonly auth: "none";
162
+ readonly effect: "read";
163
+ readonly purpose: "Read this installed CLI's current Agent instructions.";
164
+ }, {
165
+ readonly id: "key.budget";
166
+ readonly usage: "frely key budget (--api-key-stdin [--relay <url>]|--distribution <distribution-id>) [--json]";
167
+ readonly auth: "api-key";
168
+ readonly effect: "read";
169
+ readonly purpose: "Read the Key's self usage and each funding source's limits without account login.";
170
+ }, {
171
+ readonly id: "skill.install";
172
+ readonly usage: "frely skill install <manifest-url> [--host chatgpt|codex|claude-code|pi|generic] [--scope global|project] [--api-key-stdin] [--json]";
173
+ readonly auth: "optional-api-key";
174
+ readonly effect: "local-write";
175
+ readonly purpose: "Install the public Agent's trigger Skill; an API key goes only through stdin to secure storage.";
176
+ }, {
177
+ readonly id: "skill.status";
178
+ readonly usage: "frely skill status <distribution-id> [--json]";
179
+ readonly auth: "none";
180
+ readonly effect: "read";
181
+ readonly purpose: "Inspect a managed Agent Skill.";
182
+ }, {
183
+ readonly id: "skill.remove";
184
+ readonly usage: "frely skill remove <distribution-id> [--json]";
185
+ readonly auth: "none";
186
+ readonly effect: "local-write";
187
+ readonly purpose: "Remove a managed Agent Skill and its saved API key.";
188
+ }, {
189
+ readonly id: "agent.invoke";
190
+ readonly usage: "frely agent invoke <distribution-id> (--input <text>|--input-stdin) [--json]";
191
+ readonly auth: "installed-api-key-or-account";
192
+ readonly effect: "remote-call";
193
+ readonly purpose: "Send the complete relevant user request to the installed Agent through model-scoped MCP. Usage may be billed.";
194
+ }, {
195
+ readonly id: "login";
196
+ readonly usage: "frely login [--relay <url>] [--no-browser]";
197
+ readonly auth: "browser";
198
+ readonly effect: "authorization";
199
+ readonly purpose: "Authorize the CLI for the user's Frely account.";
200
+ }, {
201
+ readonly id: "logout";
202
+ readonly usage: "frely logout";
203
+ readonly auth: "none";
204
+ readonly effect: "local-write";
205
+ readonly purpose: "Remove login and stop the MCP background service.";
206
+ }, {
207
+ readonly id: "whoami";
208
+ readonly usage: "frely whoami";
209
+ readonly auth: "account";
210
+ readonly effect: "read";
211
+ readonly purpose: "Read the signed-in account.";
212
+ }, {
213
+ readonly id: "doctor";
214
+ readonly usage: "frely doctor [-v] [--json]";
215
+ readonly auth: "optional-account";
216
+ readonly effect: "diagnostic";
217
+ readonly purpose: "Show installation, available upgrades, account, MCP and connection status; -v runs detailed diagnostics.";
218
+ }, {
219
+ readonly id: "provider.share";
220
+ readonly usage: "frely provider share [ollama|openai-compatible] [--url <loopback-v1-url>] [--models <a,b>] [--slot <slot-id>] [--name <name>]";
221
+ readonly auth: "account";
222
+ readonly effect: "remote-write";
223
+ readonly purpose: "Publish a local model Provider.";
224
+ }, {
225
+ readonly id: "provider.list";
226
+ readonly usage: "frely provider list [--json]";
227
+ readonly auth: "account";
228
+ readonly effect: "read";
229
+ readonly purpose: "List configured local Providers.";
230
+ }, {
231
+ readonly id: "provider.finalize";
232
+ readonly usage: "frely provider finalize <provider-id>";
233
+ readonly auth: "account";
234
+ readonly effect: "remote-write";
235
+ readonly purpose: "Finish a prepared local Provider.";
236
+ }, {
237
+ readonly id: "mcp.setup";
238
+ readonly usage: "frely mcp [--workspace <path>] [--days 1..180]";
239
+ readonly auth: "account-and-browser";
240
+ readonly effect: "authorization";
241
+ readonly purpose: "Enable this computer as a device MCP service for remote HTTP MCP clients with OAuth; install its background service.";
242
+ }, {
243
+ readonly id: "mcp.renew";
244
+ readonly usage: "frely mcp renew [--days 1..180]";
245
+ readonly auth: "account-and-browser";
246
+ readonly effect: "authorization";
247
+ readonly purpose: "Renew this device's execution authorization without changing its MCP URL.";
248
+ }, {
249
+ readonly id: "mcp.url";
250
+ readonly usage: "frely mcp url [--json]";
251
+ readonly auth: "account-and-mcp-or-browser";
252
+ readonly effect: "authorization-if-unconfigured";
253
+ readonly purpose: "Read this device's stable MCP URL. If unconfigured, set up the user home directory with browser approval and install the background service. --json includes HTTP transport and OAuth connection details; setup prompts go to stderr.";
254
+ }, {
255
+ readonly id: "mcp.serve";
256
+ readonly usage: "frely mcp serve [--workspace <path>]";
257
+ readonly auth: "account-and-mcp";
258
+ readonly effect: "local-execution";
259
+ readonly purpose: "Serve authorized local workspace tools.";
260
+ }, {
261
+ readonly id: "mcp.service";
262
+ readonly usage: "frely mcp service start|stop|uninstall";
263
+ readonly auth: "none";
264
+ readonly effect: "local-service";
265
+ readonly purpose: "Pause, resume or remove the local MCP background service for maintenance. Supported upgrades restore running services without these commands.";
266
+ }, {
267
+ readonly id: "mcp.revoke";
268
+ readonly usage: "frely mcp revoke";
269
+ readonly auth: "account";
270
+ readonly effect: "remote-write";
271
+ readonly purpose: "Revoke device MCP execution authorization for every connected client.";
272
+ }, {
273
+ readonly id: "mcp.stdio";
274
+ readonly usage: "frely mcp stdio [--workspace <path>]";
275
+ readonly auth: "mcp";
276
+ readonly effect: "local-execution";
277
+ readonly purpose: "Serve authorized local tools over stdio.";
278
+ }, {
279
+ readonly id: "network";
280
+ readonly usage: "frely network setup|status|find|use|logout [--json]";
281
+ readonly auth: "network";
282
+ readonly effect: "subcommand-dependent";
283
+ readonly purpose: "Access Frely Network using its separate setup and credentials.";
284
+ }];
285
+ };
286
+ export declare function cliUsage(): string;
287
+ export declare function mcpUsage(): string;