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.
agora login
agora init my-nextjs-demo --template nextjs| Goal | Command | What You Get |
|---|---|---|
| Next.js video app | agora init my-nextjs-demo --template nextjs |
A cloned Next.js quickstart, project binding, and .env.local |
| Python voice agent | agora init my-python-demo --template python |
A Python quickstart with Agora credentials written for the backend |
| Go token service | agora init my-go-demo --template go |
A Go server quickstart with project metadata and env wiring |
- macOS 12+, Linux (glibc 2.31+ or musl), or Windows 10+ for the prebuilt binaries.
gitonPATHforagora initandagora quickstart create(they shell out togit clone).- For the npm install path, Node.js 18 or newer.
- For the source build, the Go toolchain pinned in
go.mod.
curl -fsSL https://raw.githubusercontent.com/AgoraIO/cli/main/install.sh | shRun the CLI:
agora --helpAlternative install paths:
# npm (Node 18+, signed with npm provenance)
npm install -g agoraio-cli
# Windows PowerShell
irm https://raw.githubusercontent.com/AgoraIO/cli/main/install.ps1 | iexNotes:
- 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://raw.githubusercontent.com/AgoraIO/cli/main/install.sh | sh -s -- --help. - Pinned versions, dry runs, custom install directories, npm details, and source builds are documented in docs/install.md.
Every release ships with a SHA-256 checksums.txt and a Cosign keyless signature. The official installers verify the SHA-256 automatically. You can also verify manually:
# Verify SHA-256 against the published checksums.txt
curl -fsSLO https://github.com/AgoraIO/cli/releases/download/vX.Y.Z/checksums.txt
sha256sum -c checksums.txt --ignore-missingFor Cosign signature verification and the SBOM workflow, see the Security section of docs/install.md. Vulnerability disclosures: see SECURITY.md.
agora login
agora init my-nextjs-demo --template nextjs- 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
Command examples use agora for the installed CLI. Local source builds are covered in Build From Source.
The command model is intentionally layered:
initfor the recommended onboarding pathquickstartfor standalone starter reposprojectfor remote Agora resources and env exportauthfor 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)
Discover the full command tree:
agora --help
agora --help --all
agora introspect --jsonRecommended onboarding command. It creates or binds a project, clones a quickstart, writes env, persists context, and prints next steps.
Manages standalone official starter repos and their runtime-specific env files.
Use this when you want to:
- 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
- inspect project readiness with
project doctor
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.
agora login
agora init my-nextjs-demo --template nextjsagora 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 doctor
agora project doctor --jsonagora 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-demoagora --help --allquickstart env write is different from project env write, but both keep dotenv files limited to runtime credentials.
project env writewrites only App ID and App Certificate keys for the detected or--template-selected layout (for exampleAGORA_*for standard Node,NEXT_PUBLIC_*/NEXT_*for Next.js, orAPP_ID/APP_CERTIFICATEfor Python and Go). See docs/automation.md for the full matrix and JSON fields.quickstart env writeunderstands the quickstart type and writes only the App ID and App Certificate variable names the cloned repo expects- existing
.envand.env.localfiles are preserved; the CLI appends missing credentials, updates existing credential keys, and comments out duplicate or stale Agora credential aliases for the selected runtime
Template-specific behavior:
- Generic project env writes use
AGORA_APP_IDplusAGORA_APP_CERTIFICATE - Next.js quickstarts write
.env.localand useNEXT_PUBLIC_AGORA_APP_IDplusNEXT_AGORA_APP_CERTIFICATE - Python quickstarts copy
server/env.exampletoserver/.env, then useAPP_IDplusAPP_CERTIFICATE - Go quickstarts copy
server-go/env.exampletoserver-go/.env, then useAPP_IDplusAPP_CERTIFICATE
The CLI also writes repo-local project metadata to:
.agora/project.json
That allows the CLI to detect which Agora project a cloned demo is bound to even when you are working inside the repo later.
Project resolution precedence is consistent across commands:
- 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 --jsonFor 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 - use low-level commands when the workflow must be decomposed or resumed in stages
- use
agora --help --allto inspect the full command tree - use
quickstart env writeto re-sync env files after changing project selection - use
project doctor --jsonfor readiness checks - rely on the same JSON envelope for both success and failure
Examples:
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 --jsonThe JSON envelope and stable result shapes are documented in docs/automation.md. auth status --json exits 3 with error.code set to AUTH_UNAUTHENTICATED when no local session exists.
GitHub Actions are configured for:
- push and pull request validation on Linux, macOS, and Windows
- automated tag-driven releases for
v*tags - cross-platform release artifacts for Linux, macOS, and Windows
Release workflow behavior:
- a pushed tag matching
v*(for examplev0.2.0) triggers the release workflow - the workflow runs tests, builds release binaries, packages them, and publishes a GitHub release automatically
- release artifacts include checksums
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. The fastest first step is always:
agora doctor --json
agora project doctor --jsonThe 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: pass
--project <name>, runagora project use <name>, or run from a repo that already has.agora/project.json.
Full guide with debug logging, CI tips, completion troubleshooting, and the --debug flag: docs/troubleshooting.md.
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.