Skip to content

docs(env): document Quickstart env file handling - #59

Open
sunshinexcode wants to merge 2 commits into
mainfrom
docs/improve-env-local-guide
Open

docs(env): document Quickstart env file handling#59
sunshinexcode wants to merge 2 commits into
mainfrom
docs/improve-env-local-guide

Conversation

@sunshinexcode

Copy link
Copy Markdown
Collaborator

Summary

Documents how Agora CLI produces Quickstart env files. The previous docs did not
explain where .env.local comes from, so users assumed it had to be downloaded
from Console. This adds docs/env-local.md describing the actual behavior: the
CLI creates or updates the runtime-specific env file from the Quickstart's
example file plus the selected project's App ID and App Certificate.

Type of change

  • Documentation only

Public-contract impact

  • No public-contract impact.

Test plan

Documentation-only change; no Go code touched.

  • go test ./... passes locally.
  • make lint passes locally.
  • New behavior is covered by a JSON-mode integration test.
  • Edge cases are covered by unit tests.

Verified the documented behavior manually against a CN test project:
agora init <name> --template nextjs --project <id> created .env.local with
NEXT_PUBLIC_AGORA_APP_ID and NEXT_AGORA_APP_CERTIFICATE, and
agora quickstart env write . --project <id> recreated it after removal.
Credential values were not printed or captured.

Documentation

  • README.md updated with a link to the new env file guide.
  • CHANGELOG.md updated (no behavior change).
  • docs/automation.md updated (no JSON, env var, or flag change).
  • docs/error-codes.md updated (N/A).
  • AGENTS.md updated (N/A).

Security checklist

  • No credentials, App Certificates, tokens, or PII added to fixtures, logs, or test output.
  • No new outbound network call.
  • No new file written under user $HOME.
  • No new unsafe import.

Additional notes

The original report stated that .env.local comes from a Console download or
export. Code review of seedQuickstartEnv and the Quickstart template layouts
showed no such flow exists today, so the doc describes CLI-side generation
instead. Docs also note that Python and Go Quickstarts target
server/.env.local, not a root-level .env.local.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant