Set Up the Y2 Command Line
Install the native harness and run your first Agent Y2 prompt
Use Y2 Information Dominance for interactive agent work and single prompts. For direct API requests, use the curl recipes.
You need macOS or Linux on x86-64 or arm64. Agent Y2 requires an API key with agent:y2.
Install the native harness
The installer verifies the release checksum and installs y2 in ~/.y2/bin.
macOS binaries have SHA-256 checksums. They are not Developer ID signed or Apple notarized.
export PATH="$HOME/.y2/bin:$PATH" && curl -fsSL https://y2.dev/harness/install.sh | shThe command adds y2 to this terminal and your shell profile.
Pass --no-modify-path to leave shell profiles unchanged.
Check the installed version:
export PATH="$HOME/.y2/bin:$PATH"
y2 --versionPin an exact release when you need a reproducible install:
export PATH="$HOME/.y2/bin:$PATH" && curl -fsSL https://y2.dev/harness/install.sh | sh -s -- v0.0.7Upgrade an installed harness on the stable channel:
y2 upgradeSave a Y2 API key
Create a key with agent:y2.
Run y2 auth to open API Keys in your browser and enter the key at the prompt:
y2 authThe harness saves the key in local credential storage.
Use y2 setup to enter an existing key without opening the browser.
For temporary shells or CI, set Y2_API_KEY in the environment:
export Y2_API_KEY="y2_..."Keep the key out of shell history, logs, prompts, tool arguments, and browser bundles.
Run Agent Y2
Start an interactive session from the project you want the harness to use as its workspace:
cd your-project
y2Run one noninteractive prompt with y2 ask:
y2 ask "Summarize the changes in this repository"The assistant returns a summary in your terminal. Local commands and file changes follow the configured permission policy.
The CLI reads applicable AGENTS.md files. Local tools run on your machine.
Agent Y2 is the default route. Check the configuration and local requirements without printing the key:
y2 status --json
y2 doctorUse another endpoint
Set the provider URL, key, and model:
export OPENAI_BASE_URL="https://your-provider.example/v1"
export OPENAI_API_KEY="your-provider-api-key"
export Y2_MODEL="your-model-id"
y2OPENAI_BASE_URL may include /chat/completions. Otherwise, y2 appends it. See the
Agent Y2 API guide for the default endpoint and streaming contract.