Native Agora CLI for authentication, project management, quickstart setup, and developer onboarding.
curl -fsSL https://raw.githubusercontent.com/AgoraIO/cli/main/install.sh | sh -s -- --add-to-pathRun 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. - If the installer says
agorais not on your PATH, re-run with--add-to-pathor add the printed install directory to your shell profile. - 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.
agora login
agora init my-nextjs-demo --template nextjs- 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
- Stable error codes: docs/error-codes.md
- Telemetry controls: docs/telemetry.md
- Contributor and agent guide: AGENTS.md
Command examples use agora for an installed CLI. Use ./agora when running a local binary built from this repository with go build -o agora ..
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/updatefor package-manager-specific upgrade guidance
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.
Prints build metadata. Release binaries include version, commit, and build date.
./agora login
./agora init my-nextjs-demo --template nextjs./agora quickstart create my-go-demo --template go --project my-existing-project
./agora quickstart env write my-go-demo --project my-existing-project./agora project use my-agent-demo
./agora quickstart env write my-go-demo./agora project doctor
./agora project doctor --json./agora 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-demo./agora --help --allquickstart env write is different from project env write, but both keep dotenv files limited to runtime credentials.
project env writewrites onlyAGORA_APP_IDandAGORA_APP_CERTIFICATEquickstart 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 ...
It stores durable non-secret metadata:
projectIdprojectNameregiontemplateenvPath
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 like
v0.1.4triggers 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.
Try:
./agora login --no-browserYou can also inspect the current auth state:
./agora whoamiquickstart create and init shell out to git clone. Install git and retry.
Check:
- network access to GitHub
- that the target directory does not already exist
- that the quickstart repo URL is reachable
Quickstart env injection requires a project with an app certificate. If the selected project has no certificate, quickstart create --project, quickstart env write, and init cannot seed the env file.
If a command needs a project and none is currently selected, either:
./agora quickstart env write my-go-demo --project my-project
./agora project use my-projector run it inside a repo that already has .agora/project.json.
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.
This project mirrors the agora-cli-ts command surface in a native Go binary so the CLI no longer depends on the Node.js runtime.