> ## Documentation Index
> Fetch the complete documentation index at: https://docs.synheart.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# Developer setup

> Install the CLI once; your coding agent then follows your team's rules

About two minutes, once per machine. You need a Synapse login in your organization.

<Steps>
  <Step title="Install the CLI">
    <Tabs>
      <Tab title="macOS / Linux">
        ```bash theme={null}
        curl -fsSL https://synheart.sh/install | bash
        ```
      </Tab>

      <Tab title="Windows (PowerShell)">
        ```powershell theme={null}
        iwr -useb https://synheart.sh/install.ps1 | iex
        ```
      </Tab>
    </Tabs>

    macOS builds are signed and notarized by Apple. If `synheart` isn't found afterwards, see [Add to PATH](/setup/install-cli#add-to-path).
  </Step>

  <Step title="Sign in">
    ```bash theme={null}
    synheart login
    ```

    A browser window opens. Sign in with your work account.
  </Step>

  <Step title="Join your team and add the hook">
    Run `synheart`, open **Synapse → Set up guard**. Or from the command line:

    ```bash theme={null}
    synheart guard team join
    synheart guard install --write
    ```

    `team join` fetches your organization's rules. `install --write` adds the guard hook to `~/.claude/settings.json`, keeping your other settings and hooks and saving a backup first. Add `--project` to install it for the current repository only (`.claude/settings.local.json`).
  </Step>

  <Step title="Restart Claude Code">
    Restart it, or run `/hooks` inside it. From now on, each shell command and file edit is checked before it runs.
  </Step>
</Steps>

## Check it works

```bash theme={null}
synheart guard check git push --force origin main
```

```text theme={null}
action  git.push map[branch:main force:true remote:origin …]
verdict deny
Synheart guard [no-force-push-protected]: Never force-push to main, master, dev or production.
```

`check` runs nothing. It shows what the guard would decide for a command in the current directory. In the TUI, **Synapse → Guard status** shows whether the hook is installed, which team policy version you have, and when it last synced.

## What happens when a rule fires

* **deny** — the agent is told no, with the rule's own words, and tries another way.
* **ask** — Claude Code asks you before the action runs.
* Nothing matches — the agent's own permission settings decide, as before.

## Letting something through

When a rule is right in general but wrong right now, grant yourself a scoped exception. Only you can, from your own terminal; an agent can't.

```bash theme={null}
synheart guard allow no-direct-push-protected --for 30m --repo acme/api --branch hotfix-123 --note "incident 4411"
```

* `--for` defaults to 1h; the maximum is 168h (a week).
* `--repo`, `--branch` and `--path` narrow where it applies.
* `synheart guard rules` lists the rules in force here and your active exceptions.

## Your own numbers

```bash theme={null}
synheart guard report
```

It shows how many actions were checked, stopped, asked about and let through, per rule, for the last 7 days (`--since 720h` for 30). The same totals appear under **Agents → Mine** at synapse.synheart.ai. Only rule ids and counts leave your machine: never a command, a file path or a prompt.

## Commands

| Command | Does |
| - | - |
| `synheart guard team join` | Use your organization's rules here, ahead of your own |
| `synheart guard install --write` | Add the hook to Claude Code's settings |
| `synheart guard check <command>` | Show what the guard would do, without running anything |
| `synheart guard allow <rule-id>` | A scoped, time-limited exception |
| `synheart guard rules` | Rules in force here and active exceptions |
| `synheart guard report` | Your counts per rule |
| `synheart guard sync` | Fetch the team rules and send your counts now (otherwise every 15 minutes) |
| `synheart guard team status` | Which team, which policy version, last sync |
| `synheart guard team leave` | Stop using the team rules on this machine |
| `synheart guard init` | Create your own rules file from a starter set |

## Troubleshooting

| Symptom | Fix |
| - | - |
| Nothing is ever checked | Guard status says the hook isn't installed: run `synheart guard install --write`, then restart Claude Code |
| Team rules are old | `synheart guard sync`. If it fails with *not logged in*, run `synheart login` |
| `Only the developer can grant exceptions…` | Expected when an agent tries to run `guard allow`, `team` or `install`. Run it yourself in a terminal |
| Your counts don't show on the dashboard | `synheart guard team status` shows the last sync and its error |


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.