Native Agora CLI for authentication, project management, quickstart setup, and developer onboarding. Use it to go from an Agora account to a runnable app with one command.
- macOS 12+, Linux (glibc 2.31+ or musl), or Windows 10+ for the prebuilt binaries.
gitonPATHforagora initandagora quickstart create(they shell out togit clone).- PowerShell 7+ (
pwsh) for the native Windows installer. - For the source build, the Go toolchain pinned in
go.mod.
curl -fsSL https://dl.agora.io/cli/install.sh | shRun the CLI:
agora --helpThe script is served from the Agora CDN (dl.agora.io, CloudFront). Binaries download from GitHub by default and automatically fall back to the CDN mirror if GitHub is unreachable; downloads are verified against checksums.txt regardless of source.
Windows PowerShell 7+:
irm https://dl.agora.io/cli/install.ps1 | iexIf execution policy blocks the installer, download it to disk and launch it in a new PowerShell 7 process with a process-scoped bypass:
Invoke-WebRequest -Uri https://dl.agora.io/cli/install.ps1 -OutFile .\install.ps1
pwsh -NoProfile -ExecutionPolicy Bypass -File .\install.ps1An organization-level MachinePolicy or UserPolicy can override the process setting. In that case, ask an administrator to allow the script or use a verified release archive instead.
Alternative install paths (GitHub-hosted; use install.ps1 for PowerShell):
# GitHub Pages
curl -fsSL https://agoraio.github.io/cli/install.sh | sh
# raw GitHub
curl -fsSL https://raw.githubusercontent.com/AgoraIO/cli/main/install.sh | shLocked-down environments that block curl | sh can download a release archive from GitHub or mirror the binary internally. Every release includes checksums.txt, a Cosign keyless signature, and an SBOM; see docs/install.md for manual tarball, checksum, and Cosign verification steps. The npm distribution is currently paused; the package on npm may be stale and should not be used.
Notes:
- The shell installer supports macOS, Linux, and Windows POSIX shells such as Git Bash. Use
install.ps1for native PowerShell installs on Windows. - Shell setup is auto-on: the installer wires the install directory onto your
PATH(when needed) and writes a shell completion script for the detected shell (bash, zsh, fish, or PowerShell). Pass--no-path,--no-completion, or the umbrella--skip-shell(PowerShell:-NoPath/-NoCompletion/-SkipShell) to opt out granularly. - Installer help is always available with
curl -fsSL https://dl.agora.io/cli/install.sh | sh -s -- --help. - Pinned versions, dry runs, custom install directories, and source builds are documented in docs/install.md.
- Release artifacts and checksums: GitHub Releases. Vulnerability disclosures: SECURITY.md.
The default command already fetches the install script from the Agora CDN (dl.agora.io), so it works even where GitHub is blocked. Binaries still download from GitHub first (with automatic fallback to the mirror); in a fully-blocked region, add AGORA_INSTALL_SOURCE=s3 to skip GitHub entirely and avoid the failover delay:
# macOS, Linux, and Windows POSIX shells
curl -fsSL https://dl.agora.io/cli/install.sh | AGORA_INSTALL_SOURCE=s3 sh
# Windows PowerShell
$env:AGORA_INSTALL_SOURCE = 's3'; irm https://dl.agora.io/cli/install.ps1 | iexDownloads are still SHA-256 verified against checksums.txt regardless of source. AGORA_INSTALL_SOURCE accepts auto (default; GitHub then mirror), github, or s3. See docs/install.md for details.
go build -o agora .
./agora --helpRequires the Go toolchain pinned in go.mod. For direct installer options and source install notes, see docs/install.md.
Recommended path: install the CLI, log in, then run agora init. The CLI binds a project, clones an official quickstart or recipe, writes the runtime env file (App ID and App Certificate), and creates .agora/project.json. You do not need to download an env file from Agora Console for this flow.
# 1) Log in
agora login
# 2) Create a local demo bound to a project
# Interactive (TTY): reuses "Default Project" if present; otherwise prompts to pick or create
agora init my-nextjs-demo --template nextjs
# Or initialize an official recipe from recipes.agora.io
# agora init my-agent --recipe tool-calling
# For deterministic non-interactive / --json / CI runs, select or create explicitly
# agora init my-nextjs-demo --template nextjs --project <project-id-or-name>
# agora init my-nextjs-demo --template nextjs --new-project
# 3) Install deps and start the app (follow nextSteps from init; Next.js example:)
cd my-nextjs-demo
pnpm install
# Newer pnpm may block dependency build scripts (ERR_PNPM_IGNORED_BUILDS). If so:
# pnpm approve-builds --all
# pnpm rebuild
pnpm dev
# Other templates print their own commands, e.g. python: bun run setup && bun run dev
# go: make setup && make dev
# 4) Open the app in a browser (Next.js default: http://localhost:3000)
open http://localhost:3000
# Linux: xdg-open http://localhost:3000
# Windows: start http://localhost:3000
# 5) Optional: check project/workspace readiness
agora project doctor --jsoninit also prints template-specific next steps in its output. Refresh credentials or rebind the repo later with:
cd my-nextjs-demo
agora quickstart env write . --project <project-id-or-name>If an env or project command reports No project selected, pass --project, run agora project use <project>, or work inside a directory that already has .agora/project.json. That is expected when none of those contexts existβnot a missing Console env download. agora init uses the onboarding selection flow described above instead.
Command examples use agora for the installed CLI. Local source builds use ./agora from the repo root.
| Goal | Command | What You Get |
|---|---|---|
| Next.js video app | agora init my-nextjs-demo --template nextjs |
A cloned Next.js quickstart, .agora binding, and .env.local |
| Python voice agent | agora init my-python-demo --template python |
A Python quickstart with server/.env credentials |
| Go voice agent | agora init my-go-demo --template go |
A Go quickstart with server/.env credentials |
| Android voice AI app | agora init my-android-demo --template android |
An Android client with credentials written only to the included Python server |
| Official recipe | agora init my-agent --recipe tool-calling |
The recipe repository, API-defined env file, and .agora binding |
Android follows the same project binding and env-writing flow as the web quickstarts. Its nextSteps additionally cover starting the Python server, opening a temporary HTTPS tunnel, writing that public URL to local.properties, and assembling the Android client. The App Certificate remains only in server/.env.local.
By default init reuses a project named Default Project when present. In an interactive TTY without that project, it prompts you to pick an existing project or create a new one. Non-interactive/--json/CI runs fall back to the most recent project (or create one when none exist). Pass --project <id-or-name> or --new-project to control selection explicitly. Run agora quickstart list to see all available templates.
The command model is intentionally layered:
initfor the recommended onboarding path (project + clone + env)quickstartfor local cloned starter repos (requiresgit)recipesfor read-only discovery of official recipes fromrecipes.agora.ioprojectfor remote Agora control-plane resources (does not clone scaffolds)authfor login and session inspectionconfigfor local CLI defaultstelemetryfor telemetry preferencesupgrade/update/self-updatefor in-place upgrade or package-manager-specific guidanceopento open the Console, published CLI docs (human or/md/Markdown), or product docs in a browserdoctorfor an install self-test (PATH, version, network, auth, MCP host)env-helpto list everyAGORA_*environment variable the CLI honorsskillsto browse curated workflow recipes for humans and AI agentsmcpto run the CLI as a local MCP server (agora mcp serve) for agent integrationscompletionfor shell completion scripts (auto-installed by the installer; seeagora completion --helpfor manual setup)
| Goal | Command |
|---|---|
| New user, one shot | agora init <name> --template <id> or --recipe <slug> (reuses Default Project / interactive picker; or --project / --new-project) |
| List available templates | agora quickstart list |
| List official recipes | agora recipes list |
| Clone a starter only | agora quickstart create ... --template-only |
| Re-sync / rebind env in a cloned quickstart | agora quickstart env write [dir] (optional --project to rebind) |
| Write env to an arbitrary path / non-quickstart repo | agora project env write <path> |
| Set global CLI project context | agora project use <project> |
| Install self-test | agora doctor --json |
| Project/workspace readiness | agora project doctor --json (add --deep in a bound repo) |
| Manage feature webhooks | agora project webhook ... --json |
agora init <name> # recommended: project + clone + env
βββ project
β βββ env Print project env values (no file write)
β βββ env write <path> Generic dotenv block (AGORA_* or NEXT_*)
βββ quickstart
βββ env write [dir] Template-specific env file and key names
Discover the full command tree:
agora --help
agora --help --all
agora introspect --jsonRecommended onboarding command. By default it reuses a project named Default Project when present. In an interactive TTY without that project, it prompts you to pick or create one. Non-interactive/--json/CI runs fall back to the most recent project (or create one when none exist). Prefer --project <id-or-name> or --new-project for explicit selection. It clones either a built-in quickstart (--template) or an official catalog recipe (--recipe), writes credentials using that source's env contract, writes .agora/project.json, updates global context, and prints next steps.
Lists and inspects the official recipes published by recipes.agora.io. Use
recipes list --type all|ai|rtc to discover slugs and recipes show <slug> to
inspect the repository, recipe document, and optional CLI initialization
metadata. Recipe discovery is read-only; init --recipe performs the clone.
Manages standalone official starter repos and their runtime-specific env files.
Use this when you want to:
- list available templates with
quickstart list - clone a quickstart without creating a project
- bind a quickstart to an existing project
- re-sync env files after changing project selection
Manages remote Agora project resources.
Use this when you want to:
- create or inspect projects directly
- switch the default project context
- export project env values with
project env - write credentials to a dotenv file with
project env write - inspect project readiness with
project doctor - manage feature-scoped webhook endpoints with
project webhook
Handles login, logout, and current session inspection.
Reads and updates local CLI defaults such as output mode, log level, and browser behavior.
Reads and updates telemetry preferences. DO_NOT_TRACK=1 disables telemetry at runtime.
Opens curated URLs: Console (--target console), human CLI docs on GitHub Pages (docs), raw Markdown tree for agents (docs-md), and Agora product docs (product-docs). Use --no-browser to print the resolved URL.
Runs the CLI as a local MCP server so MCP-capable clients can call Agora workflows as tools. Authenticate with agora login on the host first; OAuth is not exposed through MCP.
Prints build metadata. Release binaries include version, commit, and build date.
Env files hold runtime credentials. Project selection is separate: use --project, .agora/project.json, or agora project use. The CLI writes App ID and App Certificate from the selected project's API response into the template env file. It does not download a ready-made dotenv from Agora Console.
Prefer agora quickstart env write inside official quickstarts. Use agora project env write <path> only when you need a specific dotenv path outside that layout.
| Command | Env path | Key names |
|---|---|---|
agora init / quickstart env write |
Template-defined (.env.local, server/.env, or server/.env.local) |
Template-specific (NEXT_PUBLIC_*, AGORA_*, β¦) |
agora project env write <path> |
User-supplied path | AGORA_* or NEXT_* only |
Quickstart template behavior:
- Next.js quickstarts write
.env.localwithNEXT_PUBLIC_AGORA_APP_IDplusNEXT_AGORA_APP_CERTIFICATE - Python quickstarts copy
server/.env.exampletoserver/.env, then useAGORA_APP_IDplusAGORA_APP_CERTIFICATE - Go quickstarts copy
server/.env.exampletoserver/.env, then useAGORA_APP_IDplusAGORA_APP_CERTIFICATE - Existing Python and Go quickstarts keep their recorded env path when reconfigured, while legacy
APP_ID/APP_CERTIFICATEassignments are commented out and replaced withAGORA_APP_ID/AGORA_APP_CERTIFICATE.
project env write auto-detects Next.js workspaces (or accepts --template nextjs|standard) and writes AGORA_APP_ID / AGORA_APP_CERTIFICATE or the Next.js equivalents.
Existing .env and .env.local files are preserved: the CLI appends missing credentials, updates existing credential keys, and comments out duplicate or stale Agora credential aliases for the selected runtime.
See Using .env.local for how the CLI creates and updates env files from Quickstart examples and the selected project's credentials.
See docs/automation.md for JSON fields and the full credential matrix.
.agora/project.json is the repo-local project binding (not the env file). It lets the CLI know which Agora project a cloned demo uses when you work inside that repo later. agora project use only sets the global CLI context and does not rewrite .agora/project.json.
Commands that resolve an existing project context, including env-write commands, use this precedence:
- explicit
--projector positional project argument - repo-local
.agora/project.jsonresolved from the target repo path - global CLI context from
agora project use
The .agora/project.json file is created or updated by:
agora initagora quickstart create ... --project ...agora quickstart env write ...agora project env write ...(fills missingprojectType/envPathwhen applicable)
It stores durable non-secret metadata:
projectIdprojectNameregiontemplateprojectType(framework hint used for env layout when present)envPath
Examples:
# Inside a bound quickstart repo
agora project show --json
# From any directory, target a repo path directly
agora quickstart env write /abs/path/to/my-go-demo --json
# Rebind a repo to a different project
agora quickstart env write /abs/path/to/my-go-demo --project my-other-project --jsonagora quickstart create my-go-demo --template go --project my-existing-project
agora quickstart env write my-go-demo --project my-existing-projectagora project use my-agent-demo
agora quickstart env write my-go-demoagora project create my-agent-demo --feature rtc --feature convoai
agora quickstart create my-go-demo --template go --project my-agent-demo
agora quickstart env write my-go-demo --project my-agent-demoFor scripts, CI, and agentic workflows:
- prefer
--jsonfor machine consumption - set
AGORA_HOMEto an isolated temporary directory in CI or multi-agent runs - prefer
initfor end-to-end setup; decompose with lower-level commands when a workflow must be resumed in stages - use
agora introspect --jsonand AGENTS.md for agent discovery; docs/automation.md for the JSON envelope contract
Example:
export AGORA_HOME="$(mktemp -d)"
agora init my-nextjs-demo --template nextjs --json
agora quickstart create my-python-demo --template python --project my-project --json
agora quickstart env write my-python-demo --json
agora project doctor --json
agora auth status --jsonauth status --json exits 3 with error.code set to AUTH_UNAUTHENTICATED when no local session exists.
The CLI stores config, session, context, and logs under the Agora CLI config directory for the current machine.
Useful commands:
agora config path
agora config getBuilt-in default config values are documented in config.example.json.
For a full troubleshooting guide with diagnostic commands, see docs/troubleshooting.md.
Start with the right doctor command:
agora doctor --jsonβ install self-test (PATH, version, network, auth, MCP host)agora project doctor --jsonβ project and workspace readiness (credentials,.agorabinding, env consistency; add--deepfor repo-local checks)
The most common issues:
agoranot found after install: the installer wires PATH automatically by default; if you ran with--no-pathor--skip-shell, re-run without it (or add the install directory to your shell profile manually).- OAuth browser does not open:
agora login --no-browserprints the URL so you can open it elsewhere; oragora config update --browser-auto-open=false. gitis missing:agora initandagora quickstart createshell out togit clone. Installgitand retry.- Project has no app certificate:
quickstart env write,init, andproject env --with-secretsneed a project with an App Certificate. Pick another project or enable one in Agora Console. - No project selected: the command has no project context. Pass
--project <name>, runagora project use <name>, or work inside a repo with.agora/project.json(created byinit/quickstart env write). Do not expect the CLI to infer a project from.env.localalone. - Wrong or stale credentials in a quickstart: re-run
agora quickstart env write . --project <id>from the demo directory instead of pasting a Console-downloaded env file.
Full guide with debug logging, CI tips, completion troubleshooting, and the --debug flag: docs/troubleshooting.md.
- Human docs (GitHub Pages): https://agoraio.github.io/cli/
- Agent-friendly Markdown mirror: https://agoraio.github.io/cli/md/
- Release notes: CHANGELOG.md
- Install options (direct installer, Windows, source): docs/install.md
- Full command reference (auto-generated): docs/commands.md
- Automation and JSON contract: docs/automation.md
- JSON envelope schema (machine-readable): docs/schema/envelope.v1.json
- Stable error codes: docs/error-codes.md
- Telemetry controls: docs/telemetry.md
- Troubleshooting: docs/troubleshooting.md
- Security policy: SECURITY.md
- Support and contact channels: SUPPORT.md
- Contributor and agent guide: AGENTS.md, plus CONTRIBUTING.md