setup

setup is a command for coding agents from vast-ai/vast-claude-plugin. It costs 16 tokens per session (904 once invoked), scanned C, original, MIT.

A first-time setup command for Vast.ai, a service that provides rented GPU computers. It stores an API key, registers an SSH key, and checks that authentication works.

In plain words
What is it for?
It helps configure the Vast.ai command-line tool, detect a conflicting environment key, register SSH access, and verify the user account.
Why use it?
It guides the credentials and access steps needed before using Vast.ai from Claude Code.

Command

Part of the vastai plugin — 2 skills, 5 commands 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/vast-ai/vast-claude-plugin/setup
Clone the repo
git clone --depth 1 https://github.com/vast-ai/vast-claude-plugin

Or install vastai, the plugin that ships this one along with the rest of its 2 skills, 5 commands.

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/vast-ai/vast-claude-plugin/setup.svg)](https://agentmods.dev/commands/vast-ai/vast-claude-plugin/setup)
Your own site
<a href="https://agentmods.dev/commands/vast-ai/vast-claude-plugin/setup"><img src="https://agentmods.dev/badge/commands/vast-ai/vast-claude-plugin/setup.svg" alt="Measured on agentmods" height="20"></a>
Per session 16 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 904 The whole file, excluding the scripts and references it only reads on demand.
Security scan C 1 finding. 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.00016 $0.00904
Opus 5 $0.00008 $0.00452
Sonnet 5 $0.00003 $0.00181
Haiku 4.5 $0.00002 $0.00090

Measured 3d ago against content hash c5f3e8fb18e5, 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 1 finding 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.

Reaches for credential fileshighPrivilege escalation

SSH keys, cloud credentials, git-credentials, .npmrc, /etc/shadow: reading these is how a config file becomes a credential leak.

3. **Register an SSH key BEFORE the first instance launch.** Check `~/.ssh/id_ed25519.pub` (preferred) then `~/.ssh/id_rsa.pub`. If neither exists, instruct the user to run `ssh-keygen -t ed25519 -N "" -f ~/.ssh/id_ed255
commands/setup.md · 54 lines

How it starts

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

/vast:setup

First-time setup for the Vast.ai CLI inside Claude Code. Runs the three onboarding steps documented in the vastai skill's Quick Start: store the API key, register an SSH key, and verify the credential by querying the user record.

Steps

  1. Check for an existing VAST_API_KEY env var first. Run:

    env | grep ^VAST_API_KEY= || echo "not set"
    

    If it IS set, warn the user: "$VAST_API_KEY is already set in your shell. It will silently override any key I store with vastai set api-key. If you want the stored key to be the active one, run unset VAST_API_KEY before continuing." Wait for the user's decision before proceeding.

  2. Store the API key. Get the key from https://console.vast.ai/manage-keys/ (NOT cloud.vast.ai/account — that URL doesn't exist).

    • If $ARGUMENTS is non-empty, treat it as the API key. But the value is already in the transcript by that point, so warn the user it's been logged and they should rotate it after setup.
    • If $ARGUMENTS is empty, ask the user to paste the command themselves with the ! prefix so the key stays out of the conversation history:
      !vastai set api-key <YOUR_KEY>
      
      Explain that ! runs the command in their shell without sending the line to Claude. Do not ask them to paste the key into chat.
  3. Register an SSH key BEFORE the first instance launch. Check ~/.ssh/id_ed25519.pub (preferred) then ~/.ssh/id_rsa.pub. If neither exists, instruct the user to run ssh-keygen -t ed25519 -N "" -f ~/.ssh/id_ed25519 and re-run /vast:setup. Once a key file is found, register it (public key is POSITIONAL — there is no --ssh-key flag):

    vastai create ssh-key "$(cat ~/.ssh/id_ed25519.pub)" --raw
    

    This step is critical — launching an instance before registering a key produces an unreachable host.

  4. Verify authentication. Run:

    vastai show user --raw
    

    On success, report the user's email and current balance.

Read the full file on GitHub · 54 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 · 54 lines · 16 tokens per session scan C c5f3e8fb18e5

Subscribe to this mod's changes

setup is a command published in the GitHub repository vast-ai/vast-claude-plugin (3 stars, last pushed 2mo ago), licensed MIT. It adds 16 tokens to every session and 904 once invoked, about $0.0001 per session on Opus 5. A static security scan graded it C with 1 finding (reaches for credential files). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.