Install SnapCode in Kiro
Install SnapCode as a Kiro power for Kiro CLI or Kiro IDE.
SnapCode installs as a Kiro power: the SnapCode skills plus a setup script that connects Kiro to SnapLogic. You install the power, then Kiro sets up the rest the first time you ask it for something. These steps work with Kiro CLI and Kiro IDE on macOS and Windows.
Prerequisites
Install these tools on your machine before you install SnapCode:
| Tool | Why | How to check |
|---|---|---|
| Kiro (CLI v3+ or IDE) | Runs the power | kiro-cli --version (Kiro CLI) |
| Python 3.8+ | Runs the power's setup script |
macOS / Linux: Windows: |
| uv | Installs the slpy CLI. If not already installed, refer to
Install uv. |
uv --version |
python3. On Windows, use
python. Install Python from python.org
with Add python.exe to PATH selected, because python3 on Windows is
often a Microsoft Store stub that isn't a real interpreter.Set your control plane
Set your SnapLogic control plane URL, written as
https://host with no trailing /, so
that every terminal and Kiro session has it.
- macOS / Linux: Add this line to your shell profile
(
~/.zshrcor~/.bashrc) and run it in the current terminal:export SNAPLOGIC_BASE_URL='https://elastic.snaplogic.com' - Windows (PowerShell): Run these commands to set the variable for this terminal
and later ones:
$env:SNAPLOGIC_BASE_URL = 'https://elastic.snaplogic.com' [Environment]::SetEnvironmentVariable('SNAPLOGIC_BASE_URL', $env:SNAPLOGIC_BASE_URL, 'User')
Kiro reads the environment when it starts, so restart Kiro if it is already open. If you start Kiro CLI from a terminal that has the variable, that is enough.
Install the power in Kiro IDE
The power is the kiro/snapcode folder of the SnapCode repository.
In the Powers panel, choose Add Custom Power, then Import power from a repository URL (Import power from GitHub before Kiro IDE 1.4.236). Enter this URL and click Install:
https://github.com/Snap-Developers/SnapCode-CC-Plugin/tree/main/kiro/snapcode
If you use Kiro IDE, install and remove powers from this panel only. For the reason, refer to the Kiro section of Troubleshoot SnapCode.
Install the power in Kiro CLI
Download the repository and install the power from it. Kiro copies the power, so you don't need the download afterwards.
- macOS / Linux:
curl -fsSL https://github.com/Snap-Developers/SnapCode-CC-Plugin/archive/refs/heads/main.tar.gz | tar -xz kiro-cli powers install "$PWD/SnapCode-CC-Plugin-main/kiro/snapcode" - Windows (PowerShell):
curl.exe -fsSL -o snapcode.tar.gz https://github.com/Snap-Developers/SnapCode-CC-Plugin/archive/refs/heads/main.tar.gz tar -xzf snapcode.tar.gz kiro-cli powers install "$PWD\SnapCode-CC-Plugin-main\kiro\snapcode"
Check that Kiro copied all six skills. On macOS / Linux, run
ls ~/.kiro/powers/installed/snapcode/skills. On Windows, run
ls "$HOME/.kiro/powers/installed/snapcode/skills".
Ask Kiro for something
Open a chat and ask for what you want, for example:
Generate a SnapLogic pipeline that reads a CSV file and converts it to JSON.
In Kiro CLI, start the chat from the terminal where you set
SNAPLOGIC_BASE_URL:
kiro-cli chat
The first time, Kiro sets SnapCode up before it starts. Approve its commands as it asks. It
adds the SnapLogic Model Context Protocol (MCP) server to your Kiro MCP settings
(~/.kiro/settings/mcp.json) and installs the snaplogic
CLI. Then it asks you to sign in twice:
- SnapLogic CLI: This opens your browser. If it asks for a default organization,
pick the one you work in.
- Kiro CLI: Type this line in Kiro. The
!runs it as a shell command:!snaplogic auth login - Kiro IDE: Run
snaplogic auth loginin a terminal. - Windows: If
snaplogicisn't recognized, Kiro was started before the CLI was installed. Use the command Kiro gives you, which has the CLI's full path, for example!& "$env:LOCALAPPDATA\snaplogic\bin\snaplogic.exe" auth login, and paste it as one line.
- Kiro CLI: Type this line in Kiro. The
- SnapLogic MCP server: This is a browser sign-in on the same machine.
- Kiro CLI: Run
/mcp, authenticatesnapcode-snaplogic, and open the URL Kiro prints. The URL works one time. If sign-in fails, run/mcpagain for a new one. - Kiro IDE: Open the Kiro panel (the Kiro icon in the activity bar), find
snapcode-snaplogicunder MCP Servers, and click Authenticate.
- Kiro CLI: Run
Tell Kiro when you're done. It installs slpy, shows a checklist where
every line should read [ok], and goes back to your request.
Verify the installation
Start a new Kiro session and ask for the SnapCode checklist. Every line should read
[ok]:
Check my SnapLogic setup
From then on, SnapCode checks itself the first time a session does SnapLogic work. It
reinstalls what is missing, upgrades slpy once a day, and tells you when a
new SnapCode version is out.
If something goes wrong, refer to the Kiro section of Troubleshoot SnapCode.
Set up from a terminal instead
To do the whole setup in a terminal before you start Kiro, run this command after you install the power. It does the same as the first chat and opens the browser for the CLI sign-in itself. Then sign in to the MCP server as described in Ask Kiro for something.
- macOS / Linux:
python3 ~/.kiro/powers/installed/snapcode/bootstrap.py setup - Windows (PowerShell):
python "$HOME/.kiro/powers/installed/snapcode/bootstrap.py" setup
Update SnapCode
Kiro doesn't update powers by itself. When SnapCode says a new version is out, ask Kiro to "update SnapCode", or run this command:
- macOS / Linux:
python3 ~/.kiro/powers/installed/snapcode/bootstrap.py update - Windows (PowerShell):
python "$HOME/.kiro/powers/installed/snapcode/bootstrap.py" update
Uninstall SnapCode
Ask Kiro to "remove SnapCode", or run the following commands. They remove the SnapLogic MCP
server from your Kiro settings, the power, SnapCode's saved data, and the
snaplogic and slpy CLIs. Claude Code's SnapCode plugin
shares the CLIs, so skip the last three lines if you use it. The first line must run before
you uninstall the power, because the script comes with the power.
- macOS / Linux:
python3 ~/.kiro/powers/installed/snapcode/bootstrap.py mcp remove kiro-cli powers uninstall snapcode rm -rf ~/.kiro/snapcode-data snaplogic slpy uninstall snaplogic auth logout rm "$(command -v snaplogic)" - Windows (PowerShell):
python "$HOME/.kiro/powers/installed/snapcode/bootstrap.py" mcp remove kiro-cli powers uninstall snapcode Remove-Item -Recurse -Force "$HOME/.kiro/snapcode-data" -ErrorAction SilentlyContinue snaplogic slpy uninstall snaplogic auth logout Remove-Item (Get-Command snaplogic).Source
In Kiro IDE, remove the power from the Powers panel instead of
running the kiro-cli powers uninstall line.
If snaplogic auth logout says you aren't signed in although you are,
SNAPLOGIC_BASE_URL points at a different control plane from the one you
signed in to. Set it to that one and run the logout again.
To check that nothing is left, run the following commands. which should
find none of the three CLIs, ls should list no snapcode,
and cat should show no snapcode-snaplogic server (or say
the file doesn't exist):
which snaplogic slpy pcc
ls ~/.kiro/powers/installed/
cat ~/.kiro/settings/mcp.json
On Windows (PowerShell), the Get-Command command should print
nothing:
Get-Command snaplogic, slpy, pcc -ErrorAction SilentlyContinue
ls "$HOME/.kiro/powers/installed/" -ErrorAction SilentlyContinue
Get-Content "$HOME/.kiro/settings/mcp.json" -ErrorAction SilentlyContinue
The MCP sign-in stays in Kiro's ~/.kiro/secrets.json, under keys that
start with kiro.mcp.. A later install might reuse it instead of asking you
to sign in to the MCP server again. To force a new sign-in, quit Kiro and remove those
keys.