Directory Compare FCRS-1.0 /llms.txt
← Back to Directory

Cog

$ cog Official Med Risk
Replicate · AI & Media · Apache-2.0 · macos / linux

Cog (cog) packages Python ML/AI models into reproducible, CUDA-matched Docker containers with an automatic OpenAPI/JSON HTTP prediction server. The Go CLI handles project scaffolding (cog init), local inference (cog predict -i ...), image builds (cog build), and registry pushes (cog push).

FCRS-1.0 Score
83 /100
Good
Medium Confidence
Zero-Friction Install
brew install cog
CLI vs MCP Decision CLI Only

cog builds local Docker images from cog.yaml and runs containerized GPU/CPU predictions on the host Docker daemon.

Agent-Readiness Checklist

— JSON Output
— Field Filtering
✓ Non-Interactive
— Dry-Run
— Read-Only Mode
✓ NO_COLOR Clean
✓ Self-Describing
— Official SKILL.md

Static evaluation (not yet probed on this host). Run npm run data:probe locally to capture live verification.

FCRS-1.0 6-Dimension Breakdown

Agent-Readiness 19 / 25

Single-binary Go CLI with --no-color, --debug, non-interactive -i key=val inputs on cog predict, and OpenAPI JSON schema generation.

  • Global --no-color flag and non-interactive cog predict -i ...
  • Generates OpenAPI JSON schemas automatically for predictors
Trust & Safety 21 / 25

Runs predictions inside Docker containers; cog build stays local while cog push is explicit.

  • Containerized execution; explicit separation between build and push
Setup & Portability 12 / 15

Easy install via brew install cog or binary release on macOS and Linux, though Docker daemon is required.

  • Single Go binary distributed via Homebrew (brew install cog)
Utility & Efficiency 13 / 15

Eliminates CUDA/cuDNN dependency hell via declarative cog.yaml and --separate-weights layer caching.

  • cog.yaml handles CUDA/Python matrix and --separate-weights
Maintenance & Lineage 9 / 10

Official Replicate (replicate/cog) tool under Apache-2.0 license.

  • Official replicate/cog repository (Apache-2.0)
Docs & Verifiability 9 / 10

Concise, well-maintained docs at cog.run and clean Go CLI --help output.

  • Official docs at cog.run

Security, Auth & Guardrails

Auth Modes
No Auth Config File
Credential Storage

cog login stores Replicate/Docker registry credentials in ~/.docker/config.json; local cog build and cog predict need no auth.

Side Effects
Read-Only Local Write Remote Write
Cost & Quotas

Apache-2.0 open-source CLI from Replicate; requires Docker locally and a Replicate/OCI registry account only for cog push.

Copyable Guardrail for CLAUDE.md / AGENTS.md
# Cog Agent Rules
- Pass `--no-color` for clean log capture and verify Docker is running before `cog build` or `cog predict`.
- Never run `cog push` without explicit user approval and target registry confirmation.

Agent-Ready Command Recipes

Safe Read-Only Queries

Inspect Cog CLI and build flags
cog --help && cog build --help

Prints global --no-color, --debug, and cog build options without invoking Docker.

Run a local model prediction with key-value inputs
cog predict -i prompt="hello world" --no-color

Builds/runs the local cog.yaml container once and prints the prediction output cleanly.

Controlled Writes & Previews

Build a tagged ML container image locally
cog build -t my-model:local --no-color

Compiles cog.yaml into a local Docker image tagged my-model:local without pushing remotely.

Strengths for Agents

  • + Clean Go CLI with --no-color, declarative cog.yaml, and automatic OpenAPI schema generation.
  • + cog predict -i key=val runs deterministic local containerized inference in one command.

Caveats & Pitfalls

  • ! Requires a running Docker daemon (and NVIDIA Container Toolkit for local GPUs).
  • ! Docker image builds for CUDA ML models can consume tens of gigabytes of disk space.

Tested Agent Hosts

Claude Code Codex CLI Gemini CLI