Install SnapCode in the Claude Code CLI

Install SnapCode as a single Claude Code plugin. No repository to clone, no container, and no GitHub or AWS account required.

Prerequisites

Install these tools on your machine before you install SnapCode:

Tool Why How to check
Claude Code CLI v2.1.195 or later Runs the plugin claude --version
Python 3.8+ Runs the plugin's bootstrap and auth helper

macOS / Linux: python3 --version

Windows: python --version

uv Installs the slpy CLI. If not already installed, refer to Install uv. uv --version
Tip: On macOS, use python3. On Windows, use python, because python3 is often a Microsoft Store stub that isn't a real interpreter. The plugin finds whichever one works, so either is fine as long as one of them runs Python 3.

Install or update the Claude Code CLI

If you don't have Claude Code yet, install it:

  • macOS / Linux / WSL:
    curl -fsSL https://claude.ai/install.sh | bash
  • Windows (PowerShell):
    irm https://claude.ai/install.ps1 | iex
  • Any platform, with npm:
    npm install -g @anthropic-ai/claude-code

If you already have Claude Code, plugin marketplaces need v2.1.195 or later. Native installs update automatically. To update now, run:

claude update

With Homebrew, run brew upgrade claude-code. With npm, run npm install -g @anthropic-ai/claude-code@latest.

To check your version, run claude --version, which prints X.Y.Z (Claude Code). If the claude plugin commands aren't recognized or the version is below 2.1.195, update first.

Install the plugin

Run these two commands to install SnapCode:

claude plugin marketplace add Snap-Developers/SnapCode-CC-Plugin
claude plugin install snapcode@snapcode

These commands only install the plugin. The plugin sets itself up the first time you start Claude Code.

Set your SnapLogic credentials

SnapCode signs in to SnapLogic with your existing SnapLogic account, not GitHub or AWS. SnapCode supports the following sign-in methods. If you set a password and also sign in through the browser, the password takes priority. Therefore, it is recommended to use one method, not both:

Set up username and password

Set the following variables in your shell environment:

Variable What it is
SNAPLOGIC_API_USER Your SnapLogic platform login email. Also authenticates the SnapLogic Model Context Protocol (MCP) server.
SNAPLOGIC_API_PASS Your SnapLogic platform password. Also authenticates the SnapLogic MCP server.
SNAPLOGIC_BASE_URL Your control plane URL: the address in your browser when you use SnapLogic. Use one of: https://elastic.snaplogic.com (US), https://elastic2.snaplogic.com (US-East), or https://emea.snaplogic.com (EU). Write it exactly as shown: lowercase, no trailing /. Other forms are rejected at the start of the session in both sign-in methods.
SNAPLOGIC_ORG_NAME Your SnapLogic organization name, usually your company or team name. Required with a username and password, to install the slpy CLI. If you're unsure of the exact name, ask your SnapLogic admin.
Important: Set these variables before you start Claude Code. If you change any of them later, restart Claude Code.
  • macOS / Linux: Add these lines to your shell profile (~/.zshrc on macOS, or ~/.bashrc on most Linux) so they persist across terminals:
    export SNAPLOGIC_API_USER='[email protected]'
    export SNAPLOGIC_API_PASS='your-password'
    export SNAPLOGIC_BASE_URL='https://elastic.snaplogic.com'
    export SNAPLOGIC_ORG_NAME='your-org-name'
    Tip: Single quotes keep the values literal, so a $, !, \, or backtick in your password isn't expanded by the shell. If your password contains a single quote, use 'pa'\''ss' for pa'ss.

    After saving, run source ~/.zshrc (or open a new terminal) to load the values. Restart Claude Code or your editor if it was already open.

  • Windows (PowerShell): Run these commands to set the variables at the user level so they persist across new terminals:
    [Environment]::SetEnvironmentVariable('SNAPLOGIC_API_USER', '[email protected]', 'User')
    [Environment]::SetEnvironmentVariable('SNAPLOGIC_API_PASS', 'your-password', 'User')
    [Environment]::SetEnvironmentVariable('SNAPLOGIC_BASE_URL', 'https://elastic.snaplogic.com', 'User')
    [Environment]::SetEnvironmentVariable('SNAPLOGIC_ORG_NAME', 'your-org-name', 'User')
    Tip: Single-quoted values stay literal, so a $ or backtick in your password isn't treated as a PowerShell variable or escape. If your password contains a single quote, use 'pa''ss' for pa'ss. After running SetEnvironmentVariable, open a new terminal and restart Claude Code or your editor for the values to take effect.

    To confirm the new terminal can see the variable, run:

    $env:SNAPLOGIC_BASE_URL

    If it prints your SnapLogic environment URL, the variable is visible to the current terminal. If it returns an empty value, open another new terminal and try again.

Set up browser sign-in (SSO)

Set only SNAPLOGIC_BASE_URL. Use one of the values listed in the table in Set up username and password, written exactly as shown: lowercase, no trailing /. Don't set SNAPLOGIC_API_USER and SNAPLOGIC_API_PASS. If you set them for username and password before, remove both, because sign-in refuses while either is set.

SNAPLOGIC_ORG_NAME is optional. Without it, you pick the organization when you sign in. Set it to skip the prompt.

Tip: Multi-factor authentication (MFA) is also supported through browser sign-in. Clear the values of SNAPLOGIC_API_USER and SNAPLOGIC_API_PASS before signing in so the browser sign-in path is used. On the first sign-in with MFA, the browser might not return to Claude Code. If it doesn't, sign in again, or copy the sign-in URL from the terminal into your browser.
  • macOS / Linux: Add this line to your shell profile (~/.zshrc or ~/.bashrc), then run source ~/.zshrc or open a new terminal:
    export SNAPLOGIC_BASE_URL='https://elastic.snaplogic.com'
  • Windows (PowerShell): Run this command, then open a new terminal:
    [Environment]::SetEnvironmentVariable('SNAPLOGIC_BASE_URL', 'https://elastic.snaplogic.com', 'User')

First run

Start Claude Code from any directory where your credentials are set:

claude

The first session downloads the snaplogic CLI and installs slpy, which takes about 5 to 20 seconds. Every session opens with a startup checklist: one line per component shows [ok] (ready) or [x] (needs attention) for the snaplogic CLI, slpy, sign-in, MCP server, and skills. When local example search is installed, it gets a line too. For username and password users, every line shows [ok] on the first session. For SSO users, the first session shows [x] for Sign-in, slpy, and the MCP server. This behavior is expected.

If you signed in using browser sign-in (SSO), complete the following steps:

  1. The checklist shows [x] for Sign-in and includes the sign-in command. Run it in the Claude Code session:

    ! snaplogic auth login

    You pick the organization when you sign in, or set SNAPLOGIC_ORG_NAME to skip the question. Approve Authorize SnapLogic CLI in the browser, then run /mcp to reconnect the SnapLogic MCP server.

  2. Start a new Claude Code session. The plugin installs slpy, and every checklist line now shows [ok]. In a session that is still open, running slpy finishes the setup too.

Important: The sign-in renews itself while you use it. Sign in again when it has gone unused for a while, reaches its maximum lifetime, or after you sign out of SnapLogic. Run ! snaplogic auth status to see both limits. Only one control plane can be signed in at a time. To switch, run ! snaplogic auth logout, exit Claude Code, update SNAPLOGIC_BASE_URL to the new control plane, start Claude Code again, and sign in.

To confirm that SnapCode is correctly installed, type /mcp and press Enter. The plugin:snapcode:snaplogic server should be listed and show Connected. The checklist can't see this, because the MCP server connects after the session starts.

The checklist confirms the rest: the skills it found, and slpy with its version. If a line shows [x], refer to Troubleshoot SnapCode, which also lists manual checks.

You're now ready to send your first prompt, such as:
Generate a pipeline that reads from a csv and writes to json.

Every session

On every session, the plugin loads the SnapCode skills, connects to the SnapLogic MCP server, and has the slpy CLI ready.

The SnapLogic MCP server uses your password when it is set, and otherwise your browser sign-in, the same as the snaplogic CLI. With several Claude Code sessions on the same SnapLogic address, it follows the one started last. On the first session, the server might not be connected yet. Run /mcp and reconnect, or start a new session. If it still shows as not connected, refer to Troubleshoot SnapCode. The cause is usually a credential or variable-name issue.

Update SnapCode

New plugin versions ship with SnapLogic's monthly platform release.

Auto-update is off by default. To enable it, use one of the following methods:

  • In Claude Code: Run /plugin, navigate to Marketplaces > snapcode, and select Enable auto-update.
  • Settings file: Add "autoUpdate": true under extraKnownMarketplaces.snapcode in ~/.claude/settings.json (macOS/Linux) or %USERPROFILE%\.claude\settings.json (Windows):
    {
      "extraKnownMarketplaces": {
        "snapcode": {
          "source": { "source": "github", "repo": "Snap-Developers/SnapCode-CC-Plugin" },
          "autoUpdate": true
        }
      }
    }

With auto-update on, Claude Code checks for a new version within 10 minutes of the first message in each session. When it installs one, it shows Plugin updated: snapcode · Run /reload-plugins to apply. Run /reload-plugins to use it now, or it loads on your next launch.

To update manually:

  • Inside a Claude Code session:
    1. Run /plugin.
    2. Open Installed, select snapcode, then Update now.

    The plugin reloads in this session automatically. To see the welcome message and checklist for the new version, run /clear, which clears the conversation. Otherwise they appear in your next session.

  • Outside Claude Code, in a terminal: Run these two commands. The first fetches the latest from the repo, the second installs it:
    claude plugin marketplace update snapcode
    claude plugin update snapcode@snapcode

    After the update succeeds, start a new Claude Code session. The new session uses the updated version and shows it in the welcome message and checklist.

Either way, other Claude Code sessions that are already open keep the old version until you run /reload-plugins in them or restart them.

Tip: The slpy and snaplogic CLIs update independently of the plugin. At session start, the plugin checks for a newer slpy version no more than once every 24 hours and installs it automatically. The snaplogic CLI also updates itself when a newer version is out.

CLI usage identification

When SnapCode runs the snaplogic CLI, it sets SNAPLOGIC_CLIENT=snapcode/plugin-version on that call. The CLI adds the value to the User-Agent of the request, so SnapLogic can tell SnapCode's usage apart. Nothing is written to your files, and running the CLI outside Claude Code isn't tagged.

To opt out on macOS / Linux, set the variable to an empty value before you start Claude Code:

export SNAPLOGIC_CLIENT=

On Windows, an empty variable counts as not set, so set it to another value such as none. Requests then carry that value instead of snapcode.

Uninstall SnapCode

If you signed in through the browser (SSO), sign out first from inside Claude Code while the plugin is still installed:

! snaplogic auth logout

Then run these two commands to remove the plugin and the marketplace entry:

claude plugin uninstall snapcode@snapcode
claude plugin marketplace remove snapcode

To also remove files written outside the plugin directory, run the following cleanup commands. They're safe to run, and the plugin regenerates the files on reinstall. The snapcode-snapcode data directory holds the installed slpy and snaplogic CLIs, which can be large. The snapcode folder holds the auth helper's copy of your credentials.

  • macOS / Linux:
    rm -rf ~/.claude/plugins/cache/snapcode
    rm -rf ~/.claude/plugins/data/snapcode-snapcode
    rm -rf ~/.claude/snapcode
  • Windows (PowerShell):
    Remove-Item -Recurse -Force "$env:USERPROFILE\.claude\plugins\cache\snapcode"
    Remove-Item -Recurse -Force "$env:USERPROFILE\.claude\plugins\data\snapcode-snapcode"
    Remove-Item -Recurse -Force "$env:USERPROFILE\.claude\snapcode"

If you set the SNAPLOGIC_* environment variables and no longer want them, remove them:

  • macOS / Linux: Remove the export lines from ~/.zshrc or ~/.bashrc.
  • Windows (PowerShell): Clear each user-level variable, and repeat for each variable:
    [Environment]::SetEnvironmentVariable('SNAPLOGIC_API_USER', $null, 'User')

Troubleshooting

Refer to Troubleshoot SnapCode for help with downloading the CLI, sign-in, slpy installation, and MCP connection issues.