setup

setup is a command for coding agents from zapat-ai/zapat. It costs 0 tokens per session (5,125 once invoked), scanned C, a copy of zapat, MIT.

An interactive setup guide for Zapat, an autonomous development pipeline powered by Claude Code.

In plain words
What is it for?
Use it to locate or install Zapat, choose its installation path, and set its shell environment variable.
Why use it?
It helps determine whether Zapat is installed and guides the user through installing and configuring it when needed.

Command

Part of the zapat plugin — 1 command shipped together

Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

agentmods
npx agentmods add commands/zapat-ai/zapat/setup
Clone the repo
git clone --depth 1 https://github.com/zapat-ai/zapat

Or install zapat, the plugin that ships this one along with the rest of its 1 command.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for setup

README.md
[![agentmods](https://agentmods.dev/badge/commands/zapat-ai/zapat/setup.svg)](https://agentmods.dev/commands/zapat-ai/zapat/setup)
Your own site
<a href="https://agentmods.dev/commands/zapat-ai/zapat/setup"><img src="https://agentmods.dev/badge/commands/zapat-ai/zapat/setup.svg" alt="Measured on agentmods" height="20"></a>
Per session 0 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 5,125 The whole file, excluding the scripts and references it only reads on demand.
Security scan C 3 findings. Scan, not verified.
Origin 91% copy Near-identical to another mod in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5 $0.00000 $0.05125
Opus 5 $0.00000 $0.02563
Sonnet 5 $0.00000 $0.01025
Haiku 4.5 $0.00000 $0.00513

Measured 3d ago against content hash db597c419ab4, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade C, and why

setup scanned grade C with 3 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 3d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Asks for rootmediumPrivilege escalation

A mod that escalates privileges can change anything on the machine, not only the project.

sudo apt-get update && sudo apt-get install -y tmux jq gh nodejs npm git curl

Reads agent configuration directoriesmediumAgent snooping

.claude/, .codex/, .gemini/ hold keys, settings and other credentials a mod has no legitimate need for.

cat ~/.claude/settings.json 2>/dev/null | jq -r '.env.CLAUDE_CODE_EXPERIMENTAL_AGENT_TEAMS // empty'

Makes network callslowCapability

Not a fault in itself. Listed so you know the mod talks to something, and to what.

curl --version
Origin

This is a copy

91% identical to zapat — 122 lines differ, which has more behind it and is treated as the original. This page carries a canonical link to it rather than competing with it.

plugins/zapat/commands/setup.md · 580 lines

How it starts

The opening of the file, as written. The whole thing — 580 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Zapat Setup Wizard

You are guiding a user through setting up Zapat, an autonomous dev pipeline powered by Claude Code. Walk through each step interactively, asking questions and validating as you go.

Step 0 — Locate or Install Zapat

First, determine where Zapat is installed.

# Check for existing installation
if [ -n "$ZAPAT_HOME" ] && [ -d "$ZAPAT_HOME" ]; then
  echo "FOUND:$ZAPAT_HOME"
elif [ -d "$HOME/.zapat" ]; then
  echo "FOUND:$HOME/.zapat"
elif [ -f "./bin/zapat" ] && [ -f "./package.json" ] && grep -q '"name": "zapat"' ./package.json 2>/dev/null; then
  echo "FOUND:$(pwd)"
else
  echo "NOT_FOUND"
fi

If NOT_FOUND:

Tell the user: "Zapat isn't installed yet. Let me set it up."

Ask where to install:

  • ~/.zapat (recommended — keeps it out of your project directories)
  • Custom path (let them specify)

Clone the repository:

git clone https://github.com/zapat-ai/zapat.git <chosen_path>

Then set ZAPAT_HOME for the current session:

export ZAPAT_HOME=<chosen_path>

And add it to their shell profile for persistence:

# Detect shell profile
SHELL_PROFILE="$HOME/.zshrc"
[ -f "$HOME/.bashrc" ] && [ ! -f "$HOME/.zshrc" ] && SHELL_PROFILE="$HOME/.bashrc"

# Add ZAPAT_HOME if not already there
grep -q 'ZAPAT_HOME' "$SHELL_PROFILE" 2>/dev/null || echo 'export ZAPAT_HOME="<chosen_path>"' >> "$SHELL_PROFILE"

If FOUND:

Set ZAPAT_HOME to the found path for the rest of this session. Change into that directory:

cd $ZAPAT_HOME

If .env already exists in $ZAPAT_HOME, inform the user that Zapat is already configured and ask whether they want to:

  • Re-run setup from scratch (backs up existing config first)
  • Update specific sections (jump to that step)
  • Cancel

All subsequent commands in this wizard should run from $ZAPAT_HOME.


Step 1 — System Prerequisites

Check that all required tools are installed. Run each check and report results:

tmux -V
jq --version
gh --version
node --version    # Must be 18+
npm --version
git --version     # Must be 2.20+
curl --version
claude --version

Read the full file on GitHub · 580 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 3d ago First seen · 580 lines · 0 tokens per session scan C db597c419ab4

Subscribe to this mod's changes

setup is a command published in the GitHub repository zapat-ai/zapat (11 stars, last pushed 6mo ago), licensed MIT. It costs nothing until one of its globs matches a file; then it loads 5,125 tokens. A static security scan graded it C with 3 findings (asks for root, reads agent configuration directories, makes network calls). It is 91% identical to zapat, differing in 122 lines, and is treated as a copy.