frely CLI

Help

Question, short answer, related links. Back to docs.

Getting started

What is Frely CLI?

Frely CLI (the `frely` command) turns a computer you choose into a device that AI agents can work on from anywhere. ChatGPT, Claude, Codex and other MCP clients connect through FrelyMCP and use the files, shell commands and processes in the folders you allow. The computer connects out to Frely, so you open no ports. It is also the command line for your Frely account.

How do I install Frely CLI?

On macOS or Linux run: curl -fsSL https://frely.cloud/start.sh | sh. On Windows run the PowerShell command shown on the install page. The script installs the latest `frely`, then runs `frely mcp start`, which opens the browser to sign in (new accounts can register on the same page), asks you to approve the device and prints your MCP URL. Run it again any time to update.

How do I install on a server with no browser?

Create a one-time install command in the Frely App under My Devices, Add a computer, Create install command, or ask ChatGPT or Claude (connected to FrelyMCP) to add a computer. Paste the command on the server. It looks like: curl -fsSL https://frely.cloud/start.sh | FRELY_INSTALL_TOKEN=fit_... sh. The token works once, expires after 15 minutes and is not saved. On Linux also run `sudo loginctl enable-linger $USER` so the service stays online after you log out of SSH.

How do I install only the program, without the device service?

Use https://frely.cloud/install.sh (macOS and Linux) or https://frely.cloud/install.ps1 (Windows). They only install `frely`, which suits scripts, Skills and agents. Or run: npm install --global --ignore-scripts frely-cli@latest (Node.js 22 or newer). The installers check the SHA-256 of the executable and download from GitHub Releases first, then fall back to npmmirror and npmjs.

Which folder does the AI get access to?

Your home directory by default; credential and shell start-up files stay protected. Set FRELY_WORKSPACE=/path before installing to share another folder. Afterwards use `frely mcp workspace add <path>` to share more folders, `frely mcp workspace remove <path>` to stop sharing one, and `frely mcp workspace list` to see them all.

Connecting AI clients

How do I connect Claude Code or Codex?

Claude Code: claude mcp add --transport http frely "https://mcp.frely.cloud/mcp", then open /mcp in Claude Code to authorize. Codex: codex mcp add frely --url "https://mcp.frely.cloud/mcp". Both use OAuth, so sign in to Frely and approve the client when asked. Any other MCP client that supports remote HTTP MCP with OAuth can use the same URL.

What is my MCP URL, and does it change?

The FrelyMCP address is https://mcp.frely.cloud/mcp for every computer on your account. It never changes and contains no secret; clients hold OAuth tokens. Run `frely mcp status` to print the URL, the workspace, the authorization expiry and the service state.

Using your computer

What can the AI do on my computer?

Through FrelyMCP the AI can use list_devices (your computers and whether each is online), read (list, read, search and find files in the workspace), edit_file (write whole files or edit lines atomically), process (run shell commands or manage long-running processes) and web_fetch (read public web pages). Device tools take a `device` argument and run on that computer. The AI client's own shell still runs where the client runs, so ask it to use the Frely tools for work on your computer.

How do I add another computer?

Run the install command on the new computer, or ask ChatGPT or Claude connected to FrelyMCP to add a computer: list_devices returns an install command. You can also create one in the Frely App under My Devices. Every computer where you ran `frely mcp start` appears behind the same MCP URL, and all clients share each computer's workspaces and running processes.

How do I let remote AI use an MCP server that runs on my computer?

Servers that listen only on loopback are found automatically (`frely mcp local list`). Add others with: frely mcp local add <name> --url http://127.0.0.1:<port>/mcp, or for a stdio server: frely mcp local add <name> -- <command> [args...]. Each server stays hidden from remote clients until you turn it on, one by one, on the Frely connections page. Enabled servers run outside the command sandbox with your user account.

How do I share a local model (Ollama, LM Studio, vLLM)?

Run `frely provider share ollama`, or `frely provider share openai-compatible --url http://127.0.0.1:8080/v1 --models model-a,model-b --name "Local GPU"`. This publishes a loopback OpenAI-compatible endpoint as a personal Frely Provider using one empty personal Provider slot. With no empty slot, or with --creator, it creates a Creator Provider counted against your Creator plan. Keep the computer online while it is used and make sure the runtime returns usage. If setup stops halfway, run the same command again. `frely provider list` shows your Providers.

Account and API

How do I install a Frely Agent, Prompt or Skill?

Agent: frely agent install <distribution-id> --host claude-code --scope global (hosts: chatgpt, codex, claude-code, pi, generic). Run it with: printf '%s' 'Your task' | frely agent run <distribution-id> --input-stdin --json. Marketplace items: frely item install <item-id> --host claude-code. The first call opens a browser for authorization, and a paid part installs only if your account holds a pass; otherwise the command says how to buy one. Frely never overwrites a folder it did not install or a file you edited.

How do I manage my Frely account (API keys, credits, plans, orders) from the terminal or an AI?

Use `frely api list` to see operations, `frely api describe <name>` to inspect one, and `frely api call <name> --json '{...}'` to run it. Examples: frely api call agents.list, frely api call usage.summary. AI clients connected to FrelyMCP reach the same operations through the frely_list and frely_call tools. The first `frely api` command opens a browser for separate OAuth authorization. The operations are served at https://frely.cloud/mcp.

How do I sign in or out?

`frely mcp start` signs in when needed, so a separate login is normally unnecessary. Use `frely login` to sign in on its own (add --no-browser on a machine without a browser, or --email <address> then --code <6-digit code>), and `frely logout` to sign out; logout also revokes the `frely api` authorization. To stop controlling the computer remotely, use `frely mcp stop` (pause) or `frely mcp remove` (revoke every client and uninstall the service).

Security and limits

Is it safe to let an AI use my computer?

Access is limited to the folders you share. File tools reject symlink escapes and cap reads and writes at 1 MiB. Commands run as your OS user inside an OS sandbox: credential folders are unreadable, writes are limited to the workspace and the temp directory, and network goes through a proxy. If the computer cannot sandbox, commands are refused rather than run unsandboxed. The MCP URL contains no secret, and the CLI keeps its execution key encrypted in the OS credential store. You can revoke access any time with `frely mcp remove`.

A command failed because of the sandbox. What can I do?

On the Frely connections page you can open more for a connection: credential folders to read, extra folders to write, or a time-limited run without the sandbox. On Windows, or on Linux without bubblewrap, socat and ripgrep, commands are refused because the computer cannot sandbox; install those tools on Linux. FRELY_SANDBOX=off turns the sandbox off on the device only; use it only when you accept the risk.

Maintenance

How do I update Frely CLI?

Run `frely update`. It keeps your login, device, URL and workspace, never downgrades, pauses the background service, replaces the program after checking it and restarts the service. On Windows it prints a PowerShell command to run in a local terminal. Re-running https://frely.cloud/start.sh also updates and restarts the service.

How do I uninstall Frely CLI?

Run `frely uninstall` in a local terminal (not through Device MCP). It lists everything first and removes it after you type yes (--yes for scripts). It revokes this computer's access on the Frely side, removes the service, saved login, device identity, settings, caches and the Agent Skills Frely installed, and finally the `frely` program. It keeps the Frely App, your Providers and Agents in your account, the PATH lines the installer added, Skills you edited and marketplace items.

Which commands does the CLI have?

Main ones: frely mcp start|status|stop|remove, frely mcp workspace list|add|remove, frely mcp local list|add|remove, frely doctor, frely update, frely login, frely logout, frely uninstall, frely agent install|run|status|remove, frely item install|trust, frely provider share|list and frely api list|describe|call. Run any command group without a subcommand (for example `frely mcp`) to see what it offers; `frely help --agent --json` prints the full machine-readable contract.