Replicate CLI
$ replicate Official Med RiskThe official Replicate CLI (replicate/cli) lets developers and agents inspect model schemas (replicate model schema --json), run predictions (replicate run), stream/wait for outputs, and automatically emit JSON when stdout is non-TTY.
brew install replicate/tap/replicate Stateless replicate model schema --json and replicate run commands work directly in bash with non-TTY JSON auto-serialization.
Agent-Readiness Checklist
Static evaluation (not yet probed on this host). Run npm run data:probe locally to capture live verification.
FCRS-1.0 6-Dimension Breakdown
Supports --json on schema/prediction subcommands and auto-serializes JSON when stdout is non-TTY, though auth login expects a browser/TTY.
- Supports
--jsonand non-TTY JSON auto-serialization
model schema is read-only; replicate run and train incur remote GPU billing against REPLICATE_API_TOKEN.
- Prediction runs bill to Replicate account via
REPLICATE_API_TOKEN
Single Go binary via brew tap (replicate/tap/replicate), go install, and GitHub Releases.
- Static Go binary via Homebrew tap and GitHub Releases
Schema-first discovery (model schema --json) pairs cleanly with one-line cloud model execution.
- OpenAPI schema inspection plus hosted prediction execution
Official replicate/cli repository under Apache-2.0.
- Official
replicate/clirepository
Clear README and subcommand --help.
- README at github.com/replicate/cli
Security, Auth & Guardrails
Reads REPLICATE_API_TOKEN env var or stores credentials locally via replicate auth login.
Apache-2.0 open-source Go CLI; model predictions bill per-second/per-output to your Replicate account.
# Replicate CLI Agent Rules - Always run `replicate model schema <owner/model> --json` before calling `replicate run` so input key names and types are exact. - Authenticate via `REPLICATE_API_TOKEN` in CI/agent environments instead of interactive browser `auth login`.
Agent-Ready Command Recipes
Safe Read-Only Queries
replicate model schema black-forest-labs/flux-schnell --json
Fetches the model's exact parameter schema as JSON (--json) before running a prediction.
Controlled Writes & Previews
replicate run black-forest-labs/flux-schnell prompt='Minimalist geometric logo' --json
Submits a billed prediction job and outputs the resulting asset URLs/metadata as JSON.
Strengths for Agents
- +
replicate model schema <model> --jsonprevents guessing model input parameter names. - + Automatically outputs JSON when piped/run in non-TTY agent shells.
Caveats & Pitfalls
- ! Requires
REPLICATE_API_TOKENand incurs per-run cloud GPU billing. - ! Requires custom Homebrew tap (
replicate/tap/replicate) rather than Homebrew core.