# Claude Code

Source: https://desklet.io/agent/claude-code

## Connect Claude Code to Desklet.

On your computer with the Desklet app, with one command, or with the Desklet CLI and skill.

[Start free trial](https://desklet.io/app/sign-in) You need a Desklet account. 14 days, no card.

### On your computer, with the Desklet app

The open-source Desklet app starts Claude Code on the computer that does the work. On macOS and Linux each agent changes only the folder you add, and your key stays on that computer.

1.  Install Desklet with Homebrew, or with the install script where there is no Homebrew. On Windows, use these steps inside WSL 2.
    
    ```
    brew install --cask desklet-io/tap/desklet
    ```
    
    ```
    curl -fsSL https://raw.githubusercontent.com/desklet-io/desklet/master/install.sh | sh
    ```
    
    [Desklet on Windows](https://desklet.io/agent/safety#windows)
    
2.  Check that your terminal finds it. If it says “command not found”, run the line the installer printed under “Action needed”.
    
    ```
    desklet --version
    ```
    
3.  Connect the computer. Open the link it shows, check that the code matches and click Connect.
    
    ```
    desklet host connect
    ```
    
4.  Check that protection is on. It prints what to fix if it isn’t.
    
    ```
    desklet host doctor
    ```
    
    [What protection does](https://desklet.io/agent/safety#what-keeps-it-safe)
    
5.  Add the project folder. In a git project each task works in a separate copy.
    
    ```
    desklet host folder add ~/projects/my-app
    ```
    
    [What not to add](https://desklet.io/agent/safety#what-not-to-add)
    
6.  Store an API key from the Anthropic Console. It pays for the work by use, separately from a Claude or ChatGPT plan, and stays on this computer: Desklet never gets it.
    
    [Anthropic Console keys](https://platform.claude.com/settings/keys)
    
    ```
    desklet host login claude-code --key
    ```
    
7.  Start Desklet at login.
    
    ```
    desklet host install
    ```
    
8.  In Desklet, open Settings → Agents → Add an agent and pick Claude Code and Desklet runs it for you. Pick the computer, then the folder and the desks it sees; More settings holds who may give it tasks.
    
    [What not to do](https://desklet.io/agent/safety#what-not-to-do)
    
9.  On a desk, add a Tasks region, click Use next to the agent and write a task. Read the report, then apply the changes to the folder or discard them.
    

### With one command

1.  Add Desklet in a terminal.
    
    ```
    claude mcp add --transport http --scope user desklet https://desklet.io/mcp
    ```
    
2.  In Claude Code, run /mcp, choose desklet and sign in.
    
    ```
    /mcp
    ```
    
3.  Tell it this. It takes your tasks while it stays open.
    
    ```
    Listen for my Desklet tasks.
    ```
    

### With the Desklet CLI and skill

For Claude Code on a computer where it runs shell commands.

1.  Install the Desklet CLI with Homebrew, or with the install script where there is no Homebrew.
    
    ```
    brew install --cask desklet-io/tap/desklet
    ```
    
    ```
    curl -fsSL https://raw.githubusercontent.com/desklet-io/desklet/master/install.sh | sh
    ```
    
2.  Check that your terminal finds it. If it says “command not found”, run the line the installer printed under “Action needed”.
    
    ```
    desklet --version
    ```
    
3.  Sign in once. The browser opens and asks which desks this computer sees and the mode. It shows up in Settings → Agents as Desklet CLI.
    
    ```
    desklet login
    ```
    
4.  Add the Desklet skill, which teaches Claude Code the CLI and its rules.
    
    ```
    npx skills add desklet-io/desklet
    ```
    

### Keep it safe

Connected with one command, Claude Code runs with your own permissions, outside the Desklet app. These settings keep it to the project: it refuses what it would ask about, blocks your files outside the project and runs commands in its sandbox.

In `.claude/settings.json in the project`:

```
{
  "permissions": {
    "defaultMode": "dontAsk",
    "disableBypassPermissionsMode": "disable",
    "blockReadsOutsideWorkingDirectories": true,
    "allow": [
      "mcp__desklet__*",
      "Edit(/**)"
    ]
  },
  "sandbox": {
    "enabled": true,
    "failIfUnavailable": true,
    "allowUnsandboxedCommands": false
  }
}
```

-   dontAsk refuses every call that would ask. Reads in the project, edits in the project and Desklet still work.
-   These settings are for the connection above: with the Desklet CLI and skill they block the desklet commands.
-   blockReadsOutsideWorkingDirectories needs Claude Code 2.1.257 or later; an older one ignores it.
-   The sandbox covers shell commands and what they start, not Claude Code’s own file tools or local MCP servers. It works on macOS, Linux and WSL 2, not on native Windows.
-   A command you type after ! runs outside the sandbox.
-   Allow rules in a project’s settings apply only after you trust the folder in an interactive session.
-   Never start it with --dangerously-skip-permissions.

[Claude Code sandboxing](https://code.claude.com/docs/en/sandboxing) · [Run agents safely](https://desklet.io/agent/safety)

### When you sign in

Desklet asks which desks Claude Code may see, and whether it may only read (Read) or also put results on them (Read & add). Claude Code then shows up in Settings → Agents. On your computer, you choose the same in Add an agent.

### Try asking

-   “Check Desklet and review the draft I put on the Work desk.”
-   “Put the result on Desklet.”

### If it doesn’t work

If Claude Code shows Desklet as not signed in, run:

```
claude mcp login desklet
```

### What an agent can do

-   It never deletes anything on your desks, whether it connects by itself or runs on your computer.
-   It sees only the desks you choose.
-   You pick the mode: Read, where it only looks, or Read & add, where it also puts results on the desk.
-   You can disconnect or remove it any time in Settings → Agents, or revoke an AI link from the desk’s menu.

[All agents](https://desklet.io/agent) [Claude Code documentation](https://code.claude.com/docs/en/mcp)
