Skip to main content

Overview

Anysite CLI is agent-native — it auto-detects when stdout is a pipe or subprocess (non-TTY) and switches all output to structured JSON. No flags, no configuration. AI agents like Claude Code, n8n, Make, and custom scripts get machine-readable responses out of the box. Every command returns:
  • A JSON envelope with ok, result/error, hints, and meta
  • Exit codes for programmatic flow control
  • Error codes with retryable flag and suggestions
  • Next-step hints so agents discover follow-up commands without documentation

Auto-Detection

The --non-interactive flag disables interactive prompts (confirmations, selections). It is auto-enabled when stdin is not a TTY.

JSON Envelope

Success Response

Error Response

Always check the ok field first. Use error.code for programmatic handling, error.retryable to decide whether to retry, and error.suggestions for recovery steps.

Exit Codes

Error Codes

Hints

Every command returns next-step hints — suggested follow-up commands based on what you just did. In JSON mode, hints appear in the hints array. In human mode, they are printed as dim text on stderr. Agents use hints to discover follow-up actions without consulting documentation:

Discovery Payload

Run anysite with no arguments in a pipe to get a full discovery payload describing all CLI capabilities:
The discovery payload includes: This allows an agent to introspect the CLI on first run and plan its workflow without any prior knowledge.

Built-in Guide

The CLI includes a comprehensive dataset configuration guide accessible via the command line:
Agents can use anysite dataset guide --json to get a structured reference of all dataset pipeline features, source types, and configuration options.

Integration Examples

Pipe to jq

Shell Script with Error Handling

Agent Workflow

A typical AI agent workflow with the CLI:

Next Steps

Data Agent

AI agent for automated data collection using the agent protocol

Installation

Install the CLI and configure global options