# Use Filestar With AI Agents

> Let Claude Code, Codex, Cursor and other AI agents convert, resize and compress files on your computer with the Filestar CLI.

AI agents such as Claude Code, Codex, Cursor, Gemini CLI, GitHub Copilot CLI and Claude Desktop can use Filestar to convert, resize, compress, merge and inspect files. The agent runs the Filestar CLI (`filestarcli`) on your computer, so your files stay on your computer unless a cloud skill runs (see Local by default below).

> **Today and coming.** The released CLI, npm `filestar` 30.5.1, converts files from the command line: `filestarcli -i photo.heic -c "convert to jpg"`, and `--cloud Disallowed` keeps files on the computer. It does not have `filestarcli agent readme`, `agent install`, `mcp`, `account`, `skills`, `--dry-run`, `--json` or the 50 free conversions yet: they arrive with the next release, and the steps on these pages that use them will not work until then. Until then, tell your agent to run `filestarcli -i <file> -c "<command>"`. Once released, the MCP server will default to `--cloud Disallowed`; the CLI stays on `Allowed`.

## Start in three commands

```
npm install -g filestar
filestarcli agent readme
filestarcli -i photo.heic -c "convert to jpg" --json --user-agent claude-code
```

1. `npm install -g filestar` installs the CLI, without the Filestar app. You can also use `npx -y filestar`, the .NET tool or the desktop app: see [Get Started](https://filestar.com/help/ai-agents/get-started).
2. `filestarcli agent readme` prints everything an agent needs to know, as markdown: the commands, the JSON it gets back, the exit codes and what to do about each error.
3. The agent runs the conversion with `--json` and reads the paths of the files it wrote from the result.

To add Filestar to the agents on your computer in one step, run `filestarcli agent install`. It finds the agents you have, shows what it would add to each and asks before it writes anything. In the Filestar app, choose **Help › Use With AI Agents…**.

## Local by default

Filestar runs skills on the computer the agent runs on. Nothing is uploaded unless a skill runs in the cloud. By default (`--cloud Allowed`) the CLI runs a cloud skill when there is no local one, so a conversion can be uploaded. Agents should pass `--cloud Disallowed` when files must stay on the computer. Export skills such as `http post` and `email` send files by their nature and are not stopped by that option in the current CLI release. See [Privacy](https://filestar.com/help/ai-agents/privacy).

## What it costs

An npm or .NET tool install gets 50 free conversions on each computer, with no account. Local skills only, one file per run. After that, or for cloud skills and batches, a Filestar plan is needed. When the free conversions are used up, the CLI gives the agent a link for you to open and choose a plan; the purchase is tied to your computer, so nobody has to copy a licence key. See [Plans and Limits](https://filestar.com/help/ai-agents/plans-and-limits).

The CLI that comes with the Filestar app works as before: it uses the app's plan.

## Supported agents

| Agent | How Filestar is added | Guide |
| --- | --- | --- |
| Claude Code | Skill | [Claude Code](https://filestar.com/help/ai-agents/claude-code) |
| Codex | Skill | [Codex](https://filestar.com/help/ai-agents/codex) |
| Claude Desktop | MCP server | [Claude Desktop](https://filestar.com/help/ai-agents/claude-desktop) |
| Cursor | MCP server | [Cursor](https://filestar.com/help/ai-agents/cursor) |
| VS Code (Copilot agent mode) | MCP server | [VS Code](https://filestar.com/help/ai-agents/vs-code) |
| Gemini CLI | MCP server | [Gemini CLI](https://filestar.com/help/ai-agents/gemini-cli) |
| GitHub Copilot CLI | MCP server | [GitHub Copilot CLI](https://filestar.com/help/ai-agents/copilot-cli) |
| opencode, Windsurf and others | MCP server, or the CLI directly | [Other Agents](https://filestar.com/help/ai-agents/other-agents) |

A skill tells an agent with a shell how to run `filestarcli` and costs little context. The [MCP server](https://filestar.com/help/ai-agents/mcp-server) (`filestarcli mcp`) gives agents without a shell the same abilities as tools.

## Rules for agents

- Run `filestarcli agent readme` once per session and follow it.
- Pass `--json` and `--user-agent <your name>`, and read the exit code.
- Never use `--cloud Forced` unless the person asked for it.
- When the result says `CliAllowanceUsed` (exit code 5), show the person the `forUser` text and the link, then stop. Run the `next` command (`filestarcli upgrade --wait`) only if the person says they are buying now. Do not retry, reinstall or switch tools to get around it.

The commands, JSON and exit codes are in the [CLI Reference](https://filestar.com/help/ai-agents/cli-reference).

## Guides

- [Get Started](https://filestar.com/help/ai-agents/get-started): Install the Filestar CLI and add Filestar to your AI agents.
- [Claude Code](https://filestar.com/help/ai-agents/claude-code): Add the Filestar skill to Claude Code so it can convert and edit files on your computer.
- [Codex](https://filestar.com/help/ai-agents/codex): Add the Filestar skill to OpenAI Codex so it can convert and edit files on your computer.
- [Claude Desktop](https://filestar.com/help/ai-agents/claude-desktop): Add the Filestar MCP server to Claude Desktop so Claude can convert and edit files on your computer.
- [Cursor](https://filestar.com/help/ai-agents/cursor): Add the Filestar MCP server to Cursor so its agent can convert and edit files on your computer.
- [VS Code](https://filestar.com/help/ai-agents/vs-code): Add the Filestar MCP server to VS Code so GitHub Copilot's agent mode can convert and edit files.
- [Gemini CLI](https://filestar.com/help/ai-agents/gemini-cli): Add the Filestar MCP server to Gemini CLI so it can convert and edit files on your computer.
- [GitHub Copilot CLI](https://filestar.com/help/ai-agents/copilot-cli): Add the Filestar MCP server to GitHub Copilot CLI so it can convert and edit files on your computer.
- [Other Agents](https://filestar.com/help/ai-agents/other-agents): Use Filestar from opencode, Windsurf or any AI agent that can run commands.
- [MCP Server](https://filestar.com/help/ai-agents/mcp-server): The Filestar MCP server: how to start it, its tools and how they are versioned.
- [CLI Reference](https://filestar.com/help/ai-agents/cli-reference): The Filestar CLI for agents: commands, options, the JSON result, exit codes and error codes.
- [Plans and Limits](https://filestar.com/help/ai-agents/plans-and-limits): 50 free conversions with the npm or .NET tool install, what happens after, and how to upgrade or sign in from an agent.
- [Privacy](https://filestar.com/help/ai-agents/privacy): What stays on your computer when an AI agent uses Filestar, what is sent, and what the agent's name is used for.

## More

- Web page: https://filestar.com/help/ai-agents
- Help centre index for assistants: https://filestar.com/help/llms.txt
- About Filestar: https://filestar.com/llms.txt
