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

# Semgrep Guardian quickstart

> Set up Semgrep Guardian with Claude Code or Codex to scan AI-generated code and catch security issues before they ship.

**Claude Code and Codex are the recommended Semgrep Guardian setups.** Both use Semgrep's hosted remote server and authenticate through OAuth, so you don't need a local Semgrep CLI.

If you use a different coding agent, see [Choose your setup](/semgrep-guardian/choose-your-setup).

<Info>
  **For Windows machines:** [Windows Subsystem for Linux (WSL)](https://learn.microsoft.com/en-us/windows/wsl/install) is required. Native Windows is unsupported.
</Info>

<Tabs>
  <Tab title="Claude Code">
    ## Prerequisites

    * A Semgrep account
    * Claude Code installed (`claude` command)

    ## Set up Guardian

    <Steps>
      <Step title="Install the plugin">
        Install the Guardian plugin from the Claude Marketplace:

        ```bash theme={null}
        claude plugin install semgrep@claude-plugins-official
        ```
      </Step>

      <Step title="Sign in to Semgrep">
        Start a new Claude Code session:

        ```bash theme={null}
        claude
        ```

        You're prompted to sign in to Semgrep through your browser. This is a one-time sign-in. Semgrep refreshes access tokens automatically, so you rarely need to sign in again.
      </Step>
    </Steps>

    This integration uses Claude Code [hooks](https://code.claude.com/docs/en/hooks) and [plugins](https://code.claude.com/docs/en/plugins). By default, it uses Semgrep's hosted remote server, so you don't need to install the Semgrep CLI locally.
  </Tab>

  <Tab title="Codex">
    ## Prerequisites

    * A Semgrep account
    * Codex CLI installed (`codex` command)

    ## Set up Guardian

    <Steps>
      <Step title="Install the plugin">
        Add the Semgrep marketplace, then install the Guardian plugin from it:

        ```bash theme={null}
        codex plugin marketplace add https://github.com/semgrep/guardian --sparse .claude-plugin --sparse plugin
        codex plugin add semgrep@semgrep-marketplace
        ```
      </Step>

      <Step title="Start a new Codex session">
        Start a new Codex session so the plugin loads:

        ```bash theme={null}
        codex
        ```
      </Step>

      <Step title="Sign in to Semgrep">
        Ask Codex:

        ```
        Log in to Semgrep Guardian.
        ```

        Complete the sign-in prompts in your browser. This is a one-time sign-in. Semgrep refreshes access tokens automatically, so you rarely need to sign in again.
      </Step>

      <Step title="Confirm you're signed in">
        Ask Codex:

        ```
        Who am I logged in as in Semgrep Guardian?
        ```

        Codex confirms your identity and Semgrep deployment.
      </Step>

      <Step title="Verify the installation">
        From your terminal, run:

        ```bash theme={null}
        codex plugin list --json
        ```
      </Step>
    </Steps>

    By default, this integration uses Semgrep's hosted remote server, so you don't need to install the Semgrep CLI locally.
  </Tab>
</Tabs>

## Next steps

* [Claude Code setup](/semgrep-guardian/ide-setup/claude-code) for the local plugin option, or [Codex setup](/semgrep-guardian/ide-setup/codex) for more information
* [Rules and configuration](/semgrep-guardian/rules-and-configuration) for which rules Guardian scans with
* [Authentication](/semgrep-guardian/authentication) for credential details and how to switch accounts
* [Deploy across your organization](/semgrep-guardian/enterprise-deployment) for fleet-wide deployment
