setup

A setup command for installing PasteAI, optionally running its server, and configuring the connection that lets Claude publish documents.

In plain words
What is it for?
Use it to choose a PasteAI mode, install the binary, start or connect to a server, and configure MCP access.
Why use it?
It guides the machine setup so PasteAI can run locally, as a separate server, or through a remote instance.

Command for Claude Code

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/pasteai/pasteai/setup
Clone the repo
git clone --depth 1 https://github.com/pasteai/pasteai

Made for: Claude Code.

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 1,536 The whole file, excluding the scripts and references it only reads on demand.
Security scan C 2 findings. Scan, not verified.
Origin original No closer match found 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.01536
Opus 5 $0.00000 $0.00768
Sonnet 5 $0.00000 $0.00307
Haiku 4.5 $0.00000 $0.00154

Measured yesterday against content hash af2f922d8514, 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 2 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 yesterday.

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.

Downloads and executes remote codehighSupply chain

curl | sh runs whatever the server returns today, which is not necessarily what it returned when this was reviewed.

curl -sSL https://raw.githubusercontent.com/pasteai/pasteai/main/install.sh | sh

Makes network callslowCapability

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

curl -sSL https://raw.githubusercontent.com/pasteai/pasteai/main/install.sh | sh
.claude/commands/setup.md · 193 lines

How it starts

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

Set up PasteAI on this machine: install the binary, optionally start a persistent server, and configure MCP so Claude can publish documents.

If the user invokes this command with arguments (e.g. /setup remote https://example.com mykey), read mode, URL, and key from the args and skip Step 0. Otherwise work through each step in order.

Use your Bash tool to run commands. Tell the user what you're doing at each step.


Step 0 — Choose mode (skip if args provided)

Ask the user which mode they want:

  • Embedded (default) — pasteai starts a local server automatically on first use. Nothing to configure. Best for Claude Code on your laptop.
  • Local server — you run pasteai serve separately (Docker, systemd, etc.). Best when Claude runs in a container or you want the server always running.
  • Remote — point at an existing PasteAI instance. Ask for the server URL and optionally an API key.

Note the chosen mode (call it PASTEAI_MODE: embedded, local, or remote). If remote, note PASTEAI_URL and PASTEAI_API_KEY. You will use these in Step 3.


Step 1 — Install the binary

First, check if pasteai is already installed anywhere:

which pasteai 2>/dev/null || \
  test -f "$(go env GOPATH 2>/dev/null)/bin/pasteai" && echo "$(go env GOPATH)/bin/pasteai" || \
  test -f "$HOME/.local/bin/pasteai" && echo "$HOME/.local/bin/pasteai"

If found, note the full path — call it PASTEAI_BIN. Skip to Step 2.

If not found, choose an install method:

Option A: go install (if Go is available)

which go

If Go is available:

go install github.com/pasteai/pasteai/cmd/pasteai@latest

Then resolve the path:

PASTEAI_BIN="$(go env GOPATH)/bin/pasteai"
$PASTEAI_BIN version

Option B: prebuilt binary (no Go required)

curl -sSL https://raw.githubusercontent.com/pasteai/pasteai/main/install.sh | sh
PASTEAI_BIN="$HOME/.local/bin/pasteai"
$PASTEAI_BIN version

If neither Go nor curl is available, tell the user:

Install Go from https://go.dev/dl/ or download a prebuilt binary from https://github.com/pasteai/pasteai/releases, then re-run /setup. Then stop.

Read the full file on GitHub · 193 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. yesterday First seen · 193 lines · 0 tokens per session scan C af2f922d8514

Subscribe to this mod's changes

setup is a command published in the GitHub repository pasteai/pasteai (4 stars, last pushed 1mo ago), licensed MIT. It costs nothing until one of its globs matches a file; then it loads 1,536 tokens. A static security scan graded it C with 2 findings (downloads and executes remote code, makes network calls). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.