frely-cli 0.6.10 → 0.7.1
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 +97 -283
- package/README.zh-CN.md +240 -0
- package/dist/agent-help.d.ts +38 -2
- package/dist/agent-help.js +52 -4
- package/dist/agent-help.js.map +1 -1
- package/dist/auth.d.ts +3 -0
- package/dist/auth.js +52 -14
- package/dist/auth.js.map +1 -1
- package/dist/device/protocol.d.ts +1 -1
- package/dist/device/protocol.js +1 -1
- package/dist/device/protocol.js.map +1 -1
- package/dist/device/relay-client.d.ts +10 -2
- package/dist/device/relay-client.js +29 -4
- package/dist/device/relay-client.js.map +1 -1
- package/dist/index.js +15 -39
- package/dist/index.js.map +1 -1
- package/dist/mcp-command.d.ts +2 -2
- package/dist/mcp-command.js +31 -8
- package/dist/mcp-command.js.map +1 -1
- package/dist/runtime/mcp.js +58 -29
- package/dist/runtime/mcp.js.map +1 -1
- package/dist/runtime/process-manager.d.ts +1 -1
- package/dist/runtime/process-manager.js +4 -2
- package/dist/runtime/process-manager.js.map +1 -1
- package/dist/runtime/relay-mcp.d.ts +2 -1
- package/dist/runtime/relay-mcp.js.map +1 -1
- package/dist/runtime/relay-session.d.ts +47 -0
- package/dist/runtime/relay-session.js +56 -0
- package/dist/runtime/relay-session.js.map +1 -0
- package/dist/runtime/sandbox.d.ts +14 -0
- package/dist/runtime/sandbox.js +136 -0
- package/dist/runtime/sandbox.js.map +1 -0
- package/dist/runtime/workspace-registry.d.ts +5 -0
- package/dist/runtime/workspace-registry.js +87 -0
- package/dist/runtime/workspace-registry.js.map +1 -0
- package/dist/runtime/workspace-router.d.ts +5 -0
- package/dist/runtime/workspace-router.js +32 -0
- package/dist/runtime/workspace-router.js.map +1 -0
- package/dist/runtime/workspace.js +3 -1
- package/dist/runtime/workspace.js.map +1 -1
- package/dist/workspace-command.d.ts +8 -0
- package/dist/workspace-command.js +36 -0
- package/dist/workspace-command.js.map +1 -0
- package/package.json +2 -1
package/README.md
CHANGED
|
@@ -1,114 +1,44 @@
|
|
|
1
1
|
# frely-cli
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
[English](README.md) · [简体中文](README.zh-CN.md)
|
|
4
4
|
|
|
5
|
-
`frely-cli`
|
|
5
|
+
`frely-cli` turns the computer you choose into a secure remote device that AI agents can operate. Browser agents (ChatGPT, Codex) and command-line agents (Claude Code, pi) connect through Model Context Protocol (MCP) and access the files, commands and processes inside the workspace you authorize — from anywhere.
|
|
6
6
|
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
7
|
+
Two optional features, each with its own setup and authorization:
|
|
8
|
+
|
|
9
|
+
- **Remote Agent Skill** — install a published Frely Agent as a local trigger Skill and invoke it from automation.
|
|
10
|
+
- **Local model sharing** — publish a local Ollama / OpenAI-compatible runtime as your personal Frely Provider.
|
|
11
|
+
|
|
12
|
+
This repository contains the open-source Frely client and local MCP runtime. The hosted Frely Relay control plane remains a separate service dependency. There is no separate `friday-local` project; local MCP execution belongs to `frely-cli`.
|
|
12
13
|
|
|
13
14
|
```text
|
|
14
15
|
Remote Agent Skill: install -> frely login -> frely skill install -> frely agent invoke
|
|
15
16
|
Device MCP: install on target computer -> frely login -> frely mcp -> add MCP URL to client -> OAuth authorize
|
|
16
17
|
```
|
|
17
18
|
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
There is no separate `friday-local` project. Local MCP execution belongs to `frely-cli`.
|
|
19
|
+
## Install
|
|
21
20
|
|
|
22
|
-
|
|
23
|
-
The hosted Friday Relay control plane remains a separate service dependency.
|
|
24
|
-
See [`CONTRIBUTING.md`](CONTRIBUTING.md) for development guidance and
|
|
25
|
-
[`SECURITY.md`](SECURITY.md) for private vulnerability reporting.
|
|
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
|
-
|
|
34
|
-
## Quick install
|
|
35
|
-
|
|
36
|
-
After the standalone artifacts and installer are released, Frely can serve `install.sh` as:
|
|
21
|
+
The standalone installers select the platform executable, verify a SHA-256 checksum and install into the user directory. They do not require Node.js, npm or a keyring.
|
|
37
22
|
|
|
38
23
|
```sh
|
|
39
|
-
|
|
24
|
+
# macOS / Linux
|
|
25
|
+
curl -fsSL https://frely.cloud/install.sh | sh
|
|
40
26
|
```
|
|
41
27
|
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
To install or update to the latest release, use:
|
|
47
|
-
|
|
48
|
-
```sh
|
|
49
|
-
npm install --global --ignore-scripts frely-cli@latest
|
|
28
|
+
```powershell
|
|
29
|
+
# Windows
|
|
30
|
+
irm https://github.com/FrelyHQ/frely-cli/releases/latest/download/install.ps1 | iex
|
|
50
31
|
```
|
|
51
32
|
|
|
52
|
-
|
|
33
|
+
Or with npm (Node.js 22 or newer required):
|
|
53
34
|
|
|
54
35
|
```sh
|
|
55
|
-
npm install --global frely-cli@
|
|
36
|
+
npm install --global --ignore-scripts frely-cli@latest
|
|
56
37
|
```
|
|
57
38
|
|
|
58
|
-
|
|
39
|
+
To install a specific release, replace `latest` with the version. Tagged releases publish the npm package and standalone GitHub Release assets after cross-platform verification.
|
|
59
40
|
|
|
60
|
-
|
|
61
|
-
frely doctor
|
|
62
|
-
frely upgrade
|
|
63
|
-
```
|
|
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
|
-
|
|
111
|
-
## Install from a local checkout
|
|
41
|
+
### Install from a local checkout
|
|
112
42
|
|
|
113
43
|
To install the current source checkout with Bun:
|
|
114
44
|
|
|
@@ -119,45 +49,60 @@ bun run build
|
|
|
119
49
|
bun install --global "$PWD"
|
|
120
50
|
```
|
|
121
51
|
|
|
122
|
-
Use the absolute `$PWD` path in the global install command.
|
|
52
|
+
Use the absolute `$PWD` path in the global install command. If `frely` is not found, add the Bun global bin to your `PATH`:
|
|
123
53
|
|
|
124
54
|
```sh
|
|
125
55
|
export PATH="$(bun pm bin -g):$PATH"
|
|
126
56
|
```
|
|
127
57
|
|
|
128
|
-
This source revision has no keytar dependency or native npm build step. Dependency installation supports `npm ci --ignore-scripts` and `bun install --ignore-scripts`.
|
|
129
|
-
|
|
130
|
-
The repository uses npm as the canonical package manager for CI and releases
|
|
131
|
-
and commits `package-lock.json`. Bun can be used for local development; keep
|
|
132
|
-
the lockfiles synchronized when changing dependencies.
|
|
58
|
+
This source revision has no keytar dependency or native npm build step. Dependency installation supports `npm ci --ignore-scripts` and `bun install --ignore-scripts`. The repository uses npm as the canonical package manager for CI and releases and commits `package-lock.json`; Bun is for local development — keep the lockfiles synchronized when changing dependencies.
|
|
133
59
|
|
|
134
60
|
## First use
|
|
135
61
|
|
|
136
|
-
Sign in once
|
|
62
|
+
Sign in once with the Frely account the consumer uses:
|
|
137
63
|
|
|
138
64
|
```sh
|
|
139
65
|
frely login
|
|
140
66
|
```
|
|
141
67
|
|
|
142
|
-
To choose another browser or Frely account,
|
|
68
|
+
The browser opens automatically. To choose another browser or Frely account, run `frely login --no-browser` and 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. `FRELY_NO_BROWSER=1` remains supported.
|
|
69
|
+
|
|
70
|
+
### Device MCP: control this computer from a remote client
|
|
71
|
+
|
|
72
|
+
On the computer to control, enable file, shell and process access:
|
|
143
73
|
|
|
144
74
|
```sh
|
|
145
|
-
frely
|
|
75
|
+
frely mcp --workspace /path/to/project
|
|
146
76
|
```
|
|
147
77
|
|
|
148
|
-
|
|
78
|
+
`frely login` requests a restricted account session through browser device authorization. `frely mcp` initializes a separate secure MCP key, requests browser approval for this device and workspace, and installs the user-level Device Relay service (macOS LaunchAgent, Linux systemd user unit, or Windows Task Scheduler). The default authorization is 90 days; `--days 1..180` selects a duration.
|
|
149
79
|
|
|
150
|
-
|
|
80
|
+
Print the URL to add to an MCP client:
|
|
151
81
|
|
|
152
|
-
|
|
82
|
+
```sh
|
|
83
|
+
frely mcp url
|
|
84
|
+
```
|
|
153
85
|
|
|
154
|
-
|
|
155
|
-
commands below. Use a published Agent with account or restricted API-key access.
|
|
86
|
+
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. 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.
|
|
156
87
|
|
|
157
|
-
|
|
88
|
+
Add the exact printed URL to a remote MCP client with OAuth support, choose OAuth and complete authorization. Keep the computer online. Verify the first connection by asking the client to list the top-level names in your selected workspace, without writing files or running shell commands — a returned result that matches the folder confirms connectivity.
|
|
89
|
+
|
|
90
|
+
For Claude Code on the calling computer:
|
|
158
91
|
|
|
159
92
|
```sh
|
|
160
|
-
|
|
93
|
+
claude mcp add --transport http frely-computer "<MCP_URL>"
|
|
94
|
+
```
|
|
95
|
+
|
|
96
|
+
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.
|
|
97
|
+
|
|
98
|
+
Authorization lifecycle: `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. Manage your devices in Frely → **Device MCP** (`/user/account/connections`). A bare `frely mcp` uses the current directory.
|
|
99
|
+
|
|
100
|
+
### Invoke a Frely-hosted Agent
|
|
101
|
+
|
|
102
|
+
Use a published Agent with account or restricted API-key access. To install it as a local trigger Skill:
|
|
103
|
+
|
|
104
|
+
```sh
|
|
105
|
+
frely skill install https://frely.cloud/api/public/virtual-models/<distribution-id> \
|
|
161
106
|
--host pi \
|
|
162
107
|
--scope global \
|
|
163
108
|
--json
|
|
@@ -167,7 +112,7 @@ A Creator can also provide an existing model-scoped, quota-limited API key for a
|
|
|
167
112
|
|
|
168
113
|
```sh
|
|
169
114
|
printf '%s' "$FRELY_AGENT_KEY" | \
|
|
170
|
-
frely skill install https://
|
|
115
|
+
frely skill install https://frely.cloud/api/public/virtual-models/<distribution-id> \
|
|
171
116
|
--host chatgpt \
|
|
172
117
|
--scope global \
|
|
173
118
|
--api-key-stdin \
|
|
@@ -183,86 +128,78 @@ printf '%s' 'Your complete task' | \
|
|
|
183
128
|
frely agent invoke '<distribution-id>' --input-stdin --json
|
|
184
129
|
```
|
|
185
130
|
|
|
186
|
-
|
|
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.
|
|
131
|
+
## Local model sharing
|
|
189
132
|
|
|
190
|
-
|
|
133
|
+
Publish a loopback OpenAI-compatible runtime as a Frely personal Provider. Ollama is the default driver:
|
|
191
134
|
|
|
192
135
|
```sh
|
|
193
|
-
frely
|
|
136
|
+
frely provider share ollama
|
|
194
137
|
```
|
|
195
138
|
|
|
196
|
-
|
|
139
|
+
Custom endpoint and model selection:
|
|
140
|
+
|
|
141
|
+
```sh
|
|
142
|
+
frely provider share openai-compatible \
|
|
143
|
+
--url http://127.0.0.1:8080/v1 \
|
|
144
|
+
--models model-a,model-b \
|
|
145
|
+
--slot <personal-provider-slot-id> \
|
|
146
|
+
--name "Local GPU"
|
|
147
|
+
```
|
|
197
148
|
|
|
198
|
-
|
|
149
|
+
Requirements: Frely login, one empty active personal Provider slot, loopback HTTP, OpenAI-compatible `/v1` (default Ollama endpoint `http://127.0.0.1:11434/v1`). Model names cannot contain whitespace or `/`.
|
|
199
150
|
|
|
200
|
-
|
|
151
|
+
The command creates a server-managed `openai-compatible` personal Provider, stores the local endpoint in owner-only CLI state, starts the Device Relay service, signs a Provider credential with the device Ed25519 key, configures CPA, and enables the declared models. Existing Frely Access Point and API-key flows consume the Provider.
|
|
201
152
|
|
|
202
|
-
|
|
153
|
+
Provider inspection and recovery:
|
|
203
154
|
|
|
204
155
|
```sh
|
|
205
|
-
frely
|
|
156
|
+
frely provider list
|
|
157
|
+
frely provider finalize <provider-id>
|
|
206
158
|
```
|
|
207
159
|
|
|
208
|
-
|
|
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.
|
|
160
|
+
`finalize` resumes CPA setup for a Provider left in a prepared state.
|
|
217
161
|
|
|
218
|
-
|
|
162
|
+
## Update and diagnostics
|
|
219
163
|
|
|
220
164
|
```sh
|
|
221
|
-
|
|
165
|
+
frely doctor # installation path, distribution, latest stable, local account/MCP/service state
|
|
166
|
+
frely doctor -v # + config paths, runtime details, authorization expiry, last heartbeat, sanitized errors
|
|
167
|
+
frely upgrade # updates the running installation in place
|
|
222
168
|
```
|
|
223
169
|
|
|
224
|
-
|
|
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.
|
|
170
|
+
`frely upgrade` never changes to a different installer, edits PATH or downgrades a newer installation. Standalone downloads are checksum-checked and tested before the installed executable is replaced. npm/Bun installations keep their original global directory. A matching, running Device Relay service is paused for maintenance, restarted and checked after installation; credentials, device identity, MCP URL, workspace and authorization expiry are preserved. On Windows, `upgrade` prints a PowerShell command for the detected installation to run in a local terminal.
|
|
227
171
|
|
|
228
|
-
`frely
|
|
172
|
+
`frely doctor` is the single diagnostic entry point and never restarts the service. `Connected` means the matching account/device process has received a WebSocket heartbeat within 75 seconds and the MCP authorization and workspace match the running relay. Neither mode completes client OAuth authorization or executes a tool call through the client. `frely doctor --mcp` is the recommended way to check the protected credential and server state.
|
|
229
173
|
|
|
230
|
-
|
|
174
|
+
Full behavior: [the self-upgrade contract](docs/self-upgrade.md) and [service maintenance and legacy upgrades](docs/service-maintenance.md). If more than one `frely` is installed, check the path shown by `doctor` before upgrading.
|
|
231
175
|
|
|
232
|
-
|
|
176
|
+
## Local execution boundaries
|
|
233
177
|
|
|
234
|
-
|
|
235
|
-
frely provider share ollama
|
|
236
|
-
```
|
|
178
|
+
The local MCP server exposes workspace inspection, file search/read/write/patch, directory create/delete/move, shell commands, and persistent process management.
|
|
237
179
|
|
|
238
|
-
|
|
180
|
+
Filesystem tools are constrained to the selected workspace, reject symlink escapes, cap normal file reads/writes at 1 MiB, use no-follow reads, and use atomic replacement for writes. `run_command` and persistent process tools execute with the current OS user's permissions; the workspace only constrains their working directory and is **not** a shell sandbox.
|
|
239
181
|
|
|
240
|
-
|
|
182
|
+
Read-only local operations may overlap; writes and shell operations use the local fair scheduler — this avoids device-wide `busy -> 429` behavior.
|
|
241
183
|
|
|
242
|
-
|
|
243
|
-
frely provider share openai-compatible \
|
|
244
|
-
--url http://127.0.0.1:8080/v1 \
|
|
245
|
-
--models model-a,model-b \
|
|
246
|
-
--slot <personal-provider-slot-id> \
|
|
247
|
-
--name "Local GPU"
|
|
248
|
-
```
|
|
184
|
+
## Authentication and secrets
|
|
249
185
|
|
|
250
|
-
|
|
186
|
+
Basic account and Network sessions use private plaintext files. They cannot approve MCP authorization or invoke account-management operations outside their explicit scopes. The Provider key is separate from the MCP execution key.
|
|
251
187
|
|
|
252
|
-
|
|
188
|
+
MCP secrets use AES-256-GCM files with a master key in macOS Keychain, Windows Credential Manager or Linux Secret Service. Headless deployments can inject a 32-byte key through `FRELY_CREDENTIAL_KEY` and select `FRELY_CREDENTIAL_STORE=encrypted-file`. MCP has no plaintext fallback; secure-store failure does not stop basic features.
|
|
253
189
|
|
|
254
|
-
|
|
190
|
+
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.
|
|
255
191
|
|
|
256
|
-
|
|
257
|
-
frely provider list
|
|
258
|
-
frely provider finalize <provider-id>
|
|
259
|
-
```
|
|
192
|
+
Storage, migration, service injection, release requirements and threat boundaries: [credential and installation boundaries](docs/credential-storage.md).
|
|
260
193
|
|
|
261
|
-
|
|
194
|
+
## Architecture
|
|
262
195
|
|
|
263
|
-
|
|
196
|
+
- Product definition and generic client integration: [docs/device-mcp.md](docs/device-mcp.md)
|
|
197
|
+
- Device Relay transport: subprotocol, connection grant, reconnection, fallback state machine: [docs/device-transport.md](docs/device-transport.md)
|
|
198
|
+
- Relay OAuth 2.1 Authorization Code + PKCE, discovery and token endpoints: [docs/mcp-oauth-relay-contract.md](docs/mcp-oauth-relay-contract.md)
|
|
199
|
+
- Cloud commands and authorization: [docs/cloud.md](docs/cloud.md)
|
|
200
|
+
- Frely Network commands (unreleased): [docs/frely-network.md](docs/frely-network.md)
|
|
264
201
|
|
|
265
|
-
|
|
202
|
+
The public MCP URL is the canonical resource returned by Relay, for example `https://connect.frely.cloud/mcp/<device-id>`. Use `frely mcp url`; do not derive the URL from the control-plane hostname. The URL contains no bearer secret.
|
|
266
203
|
|
|
267
204
|
## Commands
|
|
268
205
|
|
|
@@ -288,139 +225,16 @@ frely mcp revoke
|
|
|
288
225
|
frely mcp stdio [--workspace <path>]
|
|
289
226
|
```
|
|
290
227
|
|
|
291
|
-
`frely mcp serve` is the foreground form of the Device Relay client. Remote execution requires the approved workspace and MCP lease
|
|
228
|
+
`frely mcp serve` is the foreground form of the Device Relay client. Remote execution requires the approved workspace and MCP lease; a Provider-only connection does not enable MCP.
|
|
292
229
|
|
|
293
230
|
`frely logout` removes the account session and attempts to stop the background service. `frely mcp revoke` revokes the MCP lease and removes its secure credential; it retains the Provider device and service.
|
|
294
231
|
|
|
295
|
-
##
|
|
296
|
-
|
|
297
|
-
The CLI expects Frely Relay to expose these authenticated user endpoints:
|
|
298
|
-
|
|
299
|
-
```text
|
|
300
|
-
POST /api/user/device-relay/enroll
|
|
301
|
-
POST /api/user/device-relay/connect
|
|
302
|
-
POST /api/user/device-relay/revoke
|
|
303
|
-
```
|
|
304
|
-
|
|
305
|
-
Enrollment returns:
|
|
306
|
-
|
|
307
|
-
```json
|
|
308
|
-
{
|
|
309
|
-
"deviceId": "..."
|
|
310
|
-
}
|
|
311
|
-
```
|
|
312
|
-
|
|
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).
|
|
316
|
-
|
|
317
|
-
A Device Relay connection request uses the enrolled Ed25519 device key and returns a short-lived connection grant:
|
|
318
|
-
|
|
319
|
-
```json
|
|
320
|
-
{
|
|
321
|
-
"websocketUrl": "wss://...",
|
|
322
|
-
"accessToken": "short-lived-token",
|
|
323
|
-
"expiresAt": "..."
|
|
324
|
-
}
|
|
325
|
-
```
|
|
326
|
-
|
|
327
|
-
The access token is sent only in the WebSocket `Authorization` header. It is not printed and is not persisted in the MCP URL.
|
|
328
|
-
|
|
329
|
-
## Device Relay
|
|
330
|
-
|
|
331
|
-
The WebSocket subprotocol is `frely.device-relay.v1`. Requests use independent request IDs and a 64-request inflight window. Read-only local operations may overlap; writes and shell operations use the local fair scheduler. This avoids LocalMCP's device-wide `busy -> 429` behavior.
|
|
332
|
-
|
|
333
|
-
The client requests a fresh short-lived connection grant for every connection attempt and reconnects with bounded exponential backoff. A renewed Frely login is picked up by the next reconnect without reinstalling the service.
|
|
334
|
-
|
|
335
|
-
## Local MCP capabilities
|
|
336
|
-
|
|
337
|
-
The local MCP server exposes workspace inspection, file search/read/write/patch, directory create/delete/move, shell commands, and persistent process management.
|
|
338
|
-
|
|
339
|
-
Filesystem tools are constrained to the selected workspace, reject symlink escapes, cap normal file reads/writes at 1 MiB, use no-follow reads, and use atomic replacement for writes. `run_command` and persistent process tools execute with the current OS user's permissions; the workspace only constrains their working directory and is not a shell sandbox.
|
|
340
|
-
|
|
341
|
-
## Authentication and secrets
|
|
342
|
-
|
|
343
|
-
Basic account and Network sessions use private plaintext files. They cannot approve MCP authorization or invoke account-management operations outside their explicit scopes. The Provider key is separate from the MCP execution key.
|
|
344
|
-
|
|
345
|
-
MCP secrets use AES-256-GCM files with a master key in macOS Keychain, Windows Credential Manager or Linux Secret Service. Headless deployments can inject a 32-byte key through `FRELY_CREDENTIAL_KEY` and select `FRELY_CREDENTIAL_STORE=encrypted-file`. MCP has no plaintext fallback. Secure-store failure does not stop basic features.
|
|
346
|
-
|
|
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.
|
|
348
|
-
|
|
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.
|
|
374
|
-
|
|
375
|
-
Storage, migration, service injection, release requirements and threat boundaries: [`docs/credential-storage.md`](docs/credential-storage.md).
|
|
376
|
-
|
|
377
|
-
## Current server dependency
|
|
378
|
-
|
|
379
|
-
The CLI side of installation, account login, device enrollment, MCP URL discovery, background service lifecycle, Device Relay WebSocket transport, multiplexing, reconnection, local MCP execution, local model discovery, and loopback Provider forwarding is implemented here.
|
|
232
|
+
## Landing page
|
|
380
233
|
|
|
381
|
-
|
|
234
|
+
The open-source CLI landing page lives in [`site/`](site/README.md), alongside the CLI under the same Apache-2.0 license and trademark policy. It is prepared for `cli.frely.cloud` and deploys independently as a static site. Website assets are excluded from the npm package.
|
|
382
235
|
|
|
383
236
|
## License and trademarks
|
|
384
237
|
|
|
385
|
-
`frely-cli` is licensed under the Apache License 2.0; see [`LICENSE`](LICENSE).
|
|
386
|
-
The Frely name, logos, and product names are not licensed as trademarks; see
|
|
387
|
-
[`TRADEMARKS.md`](TRADEMARKS.md).
|
|
388
|
-
|
|
389
|
-
## Frely Network onboarding
|
|
390
|
-
|
|
391
|
-
The Network commands are part of the unreleased 0.4.0 source version. The npm distribution requires Node.js 22 or newer; the standalone distribution includes its runtime. Package publication and server activation are separate release steps.
|
|
392
|
-
|
|
393
|
-
```sh
|
|
394
|
-
frely network setup --host chatgpt --json
|
|
395
|
-
frely network status --json
|
|
396
|
-
frely network find --capability web3.address-risk --json
|
|
397
|
-
frely network use --capability web3.address-risk \
|
|
398
|
-
--input-json '{"address":"<EVM_ADDRESS>","chainId":"1"}' \
|
|
399
|
-
--request-id '<REQUEST_UUID>' --json
|
|
400
|
-
frely network logout --json
|
|
401
|
-
```
|
|
402
|
-
|
|
403
|
-
The examples contain placeholders. Host values are `chatgpt`, `claude-code`, `opencode` and `generic`. Setup returns a browser link and request code without waiting for a signature or requiring a TTY. The next status or capability call retrieves the authorization. ChatGPT requires an existing device-execution bridge and uses the instructions in its current conversation; setup does not add a ChatGPT connector or native Skill.
|
|
404
|
-
|
|
405
|
-
`--network <HTTPS-origin>` selects a deployment. Credentials are scoped to that origin in the basic private-file store under `frely-network`; they do not share Frely account or device-relay credentials. Tokens and private device codes are excluded from command output. `logout` affects the Network session, not the existing FrelyMCP service. An unconfirmed remote revocation is reported as an error.
|
|
406
|
-
|
|
407
|
-
Skill installation manages its own files and hash metadata. An unmanaged file, user edit or symlink causes a failure rather than a configuration overwrite. Installation paths are `.claude/skills/frely-network`, `.config/opencode/skills/frely-network` or `.agents/skills/frely-network` under the user home.
|
|
408
|
-
|
|
409
|
-
The first address-risk profile requires target chain `1`; the wallet login chain does not choose the target. Service output contains source-backed risk signals and `scamProbability: null`, not a fabricated percentage. Calls use platform demo quota without granting wallet transfer permissions. Preserve the request UUID for retries; the CLI does not resend an ambiguous service call.
|
|
410
|
-
|
|
411
|
-
Source verification:
|
|
412
|
-
|
|
413
|
-
```sh
|
|
414
|
-
npm ci
|
|
415
|
-
npm run check
|
|
416
|
-
npm test
|
|
417
|
-
npm run build
|
|
418
|
-
node dist/index.js network help --json
|
|
419
|
-
```
|
|
420
|
-
|
|
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.
|
|
238
|
+
`frely-cli` is licensed under the Apache License 2.0; see [`LICENSE`](LICENSE). The Frely name, logos, and product names are not licensed as trademarks; see [`TRADEMARKS.md`](TRADEMARKS.md).
|
|
422
239
|
|
|
423
|
-
|
|
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.
|
|
240
|
+
See [`CONTRIBUTING.md`](CONTRIBUTING.md) for development guidance and [`SECURITY.md`](SECURITY.md) for private vulnerability reporting.
|