Skip to content

docs: document generated CLI .env loading and default auth env vars - #6507

Closed
devin-ai-integration[bot] wants to merge 1 commit into
mainfrom
devin/1785769805-cli-generator-auth-env
Closed

docs: document generated CLI .env loading and default auth env vars#6507
devin-ai-integration[bot] wants to merge 1 commit into
mainfrom
devin/1785769805-cli-generator-auth-env

Conversation

@devin-ai-integration

Copy link
Copy Markdown
Contributor

Summary

The CLI generator's Authentication page already covered credential sources and the device-code OAuth generators.yml config, but two things customers asked about weren't stated: how end users supply credentials via a .env file, and which environment variable a scheme reads when none is declared.

Additions to fern/products/cli-generator/authentication.mdx:

  • Default environment variables subsection: a scheme with no declared env var derives one from the uppercased binary name (<BINARY>_TOKEN for bearer, <BINARY>_API_KEY for header API key, <BINARY>_USERNAME/<BINARY>_PASSWORD for basic, <BINARY>_CLIENT_ID/<BINARY>_CLIENT_SECRET for OAuth client credentials), and the note that a header API-key scheme also gets an --api-key flag that wins over its env var.
  • .env files subsection: the generated CLI auto-loads a .env file from the working directory or any parent at startup; a .env value never overrides an already-set env var. Credential precedence: explicit CLI flag → environment variable → .env.
  • Device-code flow: clarified client-id must be a literal public client ID and added client-id-env to the list of rejected fields (alongside redirect-uri and pkce).

No new page or section was created — these fold into the existing canonical auth page.

Checks

  • pre-commit run --files fern/products/cli-generator/authentication.mdx → Vale passed, 0 errors.
  • fern check --warnings → 0 errors (6 pre-existing, unrelated warnings).

Link to Devin session: https://app.devin.ai/sessions/7958e622b9224604a134e001984b4239

Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
@devin-ai-integration
devin-ai-integration Bot requested a review from devalog as a code owner August 3, 2026 15:10
@devin-ai-integration

Copy link
Copy Markdown
Contributor Author

🤖 Devin AI Engineer

I'll be helping with this pull request! Here's what you should know:

✅ I will automatically:

  • Address comments on this PR. Add '(aside)' to your comment to have me ignore it.
  • Look at CI failures and help fix them

Note: I can only respond to comments from users who have write access to this repository.

⚙️ Control Options:

  • Disable automatic comment, CI, and merge conflict monitoring

@github-actions

github-actions Bot commented Aug 3, 2026

Copy link
Copy Markdown
Contributor

@devalog devalog closed this Aug 3, 2026
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