setup

A setup guide for Newton, a system that generates physics videos. It covers creating the Python environment, installing PyTorch and other packages, and configuring service keys.

In plain words
What is it for?
Use it to create the Newton environment, install the required software, check GPU support, and fill in the needed API settings.
Why use it?
It reduces the manual work and configuration mistakes involved in preparing Newton to run.

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

Made for: Claude Code.

Per session 34 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 692 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 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.00034 $0.00692
Opus 5 $0.00017 $0.00346
Sonnet 5 $0.00007 $0.00138
Haiku 4.5 $0.00003 $0.00069

Measured 2d ago against content hash 55e1df4ac824, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

setup scanned grade A with 0 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 2d 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.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

.claude/commands/setup.md · 62 lines

How it starts

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

You are helping the user set up the Newton physics-video generation system. Walk through each step below. If a step is already done, skip it and say so.

Step 1 — Conda environment

Check if a conda env named newton exists (conda env list). If not, create it:

conda create -n newton python=3.10 -y

Then activate it. Confirm Python 3.10 is active.

Step 2 — PyTorch

Check if PyTorch is installed (python -c "import torch; print(torch.__version__, torch.cuda.is_available())").

If not installed, detect the CUDA version (nvidia-smi or nvcc --version) and install the matching PyTorch build. Example for CUDA 12.8:

pip install torch torchvision torchaudio --index-url https://download.pytorch.org/whl/cu128

If no GPU is available, install the CPU build.

Step 3 — Python dependencies

pip install -r requirements.txt

Step 4 — API keys

Check if .env exists in the project root. If not, copy from .env.template:

cp .env.template .env

Then ask the user for each API key group, one at a time. Explain what each service is used for, and write the values into .env. The groups are:

  1. Planner LLM (PLANNER_API_KEY, PLANNER_BASE_URL, PLANNER_MODEL) — the agent brain, any OpenAI-compatible endpoint. Ask the user which provider they use (OpenAI, Azure, or a third-party gateway) and set PLANNER_AUTH accordingly (bearer or api-key).
  2. Gemini (GEMINI_API_KEY) — used for the video verifier (blind A/B scoring) and optionally for image generation. Get a key at https://ai.google.dev/gemini-api/docs.
  3. Seedance (SEEDANCE_API_KEY, SEEDANCE_HOST) — the video generation backend. Get access at https://seed.bytedance.com/en/seedance2_0.
  4. Serper (SERPER_API_KEY) — web image search. Get a key at https://serper.dev/.
  5. Img_create (IMG_CREATE_API_KEY, IMG_CREATE_BASE_URL, IMG_CREATE_MODEL, IMG_CREATE_API) — image generation/editing. Can share credentials with the Planner or Gemini endpoint. Ask the user which provider they want to use.

Read the full file on GitHub · 62 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. 2d ago First seen · 62 lines · 34 tokens per session scan A 55e1df4ac824

Subscribe to this mod's changes

setup is a command published in the GitHub repository CUTEPKQ/NEWTON (143 stars, last pushed 1mo ago), licensed MIT. It adds 34 tokens to every session and 692 once invoked, about $0.0002 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.