Skip to content

docs: document additional environment API keys - #4406

Draft
carderne wants to merge 1 commit into
mainfrom
docs/api-keys-overhaul
Draft

docs: document additional environment API keys#4406
carderne wants to merge 1 commit into
mainfrom
docs/api-keys-overhaul

Conversation

@carderne

Copy link
Copy Markdown
Collaborator

Summary

Expands the API key guide to cover root and additional environment keys. It explains how to configure the SDK, create keys with limited access, manage expiration and revocation, rotate the root key, and use keys with public tokens and branch environments.

Design

The guide describes access presets at the product level without exposing authorization internals. It also documents copy-once secrets, immutable access policies, task-selection limits, public-token lifetimes, streamed-batch behavior, and the supported self-hosted configuration.

@changeset-bot

changeset-bot Bot commented Jul 28, 2026

Copy link
Copy Markdown

⚠️ No Changeset found

Latest commit: 11216bf

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

@coderabbitai

coderabbitai Bot commented Jul 28, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

Walkthrough

Rewrites the API keys documentation to describe root and additional keys, SDK and self-hosted configuration, key creation and access presets, expiration and revocation, root-key regeneration, scoped public access tokens, branch targeting, self-hosting limitations, security recommendations, and updated next-step links.

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Description check ⚠️ Warning The description covers summary and design, but misses the required issue link, checklist, testing, changelog, and screenshots sections. Add the missing template sections: Closes #..., checklist items, testing steps, changelog, and screenshots or mark them N/A.
✅ Passed checks (4 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly matches the main change: documenting API keys for environment auth.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch docs/api-keys-overhaul

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 1


ℹ️ Review info
⚙️ Run configuration

Configuration used: Repository UI

Review profile: CHILL

Plan: Pro Plus

Run ID: e03aa6ce-4d84-4347-9824-e9681926906f

📥 Commits

Reviewing files that changed from the base of the PR and between 44eca4d and 11216bf.

📒 Files selected for processing (1)
  • docs/apikeys.mdx
📜 Review details
⏰ Context from checks skipped due to timeout. (4)
  • GitHub Check: code-quality / code-quality
  • GitHub Check: check-broken-links
  • GitHub Check: Analyze (javascript-typescript)
  • GitHub Check: Analyze (actions)
🧰 Additional context used
📓 Path-based instructions (1)
docs/**/*.mdx

📄 CodeRabbit inference engine (docs/CLAUDE.md)

docs/**/*.mdx: MDX documentation pages must include frontmatter with title (required), description (required), and sidebarTitle (optional) in YAML format
Use Mintlify components for structured content: , , , , , , /, /
Always import from @trigger.dev/sdk in code examples (never from @trigger.dev/sdk/v3)
Code examples must be complete and runnable where possible
Use language tags in code fences: typescript, bash, json

Documentation in docs/ uses MDX conventions defined by the documentation guidance.

Files:

  • docs/apikeys.mdx
🧠 Learnings (2)
📚 Learning: 2026-03-10T12:44:14.176Z
Learnt from: nicktrn
Repo: triggerdotdev/trigger.dev PR: 3200
File: docs/config/config-file.mdx:353-368
Timestamp: 2026-03-10T12:44:14.176Z
Learning: In the trigger.dev repo, docs PRs are often companions to implementation PRs. When reviewing docs PRs (MDX files under docs/), check the PR description for any companion/related PR references and verify that the documented features exist in those companion PRs before flagging missing implementations. This ensures docs stay in sync with code changes across related PRs.

Applied to files:

  • docs/apikeys.mdx
📚 Learning: 2026-04-30T20:30:29.458Z
Learnt from: ericallam
Repo: triggerdotdev/trigger.dev PR: 3226
File: docs/ai-chat/quick-start.mdx:13-13
Timestamp: 2026-04-30T20:30:29.458Z
Learning: In this repo’s documentation MDX files (`docs/**/*.mdx`), use `ts` and `tsx` (not `typescript`) as the code-fence language tags for TypeScript/TSX snippets. Do not flag `ts`/`tsx` code-fence language tags as incorrect in any docs MDX file, since this is the site-wide Mintlify-compatible convention.

Applied to files:

  • docs/apikeys.mdx
🔇 Additional comments (1)
docs/apikeys.mdx (1)

3-52: LGTM!

Also applies to: 54-188

Comment thread docs/apikeys.mdx

To configure the SDK in code, pass the key to `configure`:

```ts Your backend code

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

📐 Maintainability & Code Quality | 🟡 Minor | ⚡ Quick win

🧩 Analysis chain

🏁 Script executed:

#!/bin/bash
set -euo pipefail

echo "== locate file =="
git ls-files | grep -F 'docs/apikeys.mdx' || true

echo "== surrounding lines =="
if [ -f docs/apikeys.mdx ]; then
  nl -ba docs/apikeys.mdx | sed -n '45,60p'
fi

echo "== all ts fenced markdown/code tags in docs apikeys =="
if [ -f docs/apikeys.mdx ]; then
  python3 - <<'PY'
from pathlib import Path
p=Path('docs/apikeys.mdx')
text=p.read_text()
for i,line in enumerate(text.splitlines(),1):
    x=line.strip()
    if x.startswith('```') and (x.startswith('```ts') or x.startswith('```typescript') or x.startswith('```js') or x.startswith('```typescript') or x.startswith('```bash')):
        print(f"{i}: {x}")
PY
fi

echo "== docs guidelines references =="
rg -n "language tag|typescript|ts" docs -g '*.md' -g '*.mdx' | head -100 || true

Repository: triggerdotdev/trigger.dev

Length of output: 262


🏁 Script executed:

#!/bin/bash
set -euo pipefail

echo "== file exists and size =="
wc -l docs/apikeys.mdx

echo "== surrounding lines with wc/cut =="
cut -n -f45-60 docs/apikeys.mdx | sed -n '45,60p'
awk '{printf "%6d\t%s\n", NR, $0}' docs/apikeys.mdx | awk 'NR>=45 && NR<=60'

echo "== fence tags in docs/apikeys.mdx =="
awk '{if (/^```[A-Za-z0-9_-]*[[:space:]]?.*/) printf "%6d\t%s\n", NR, $0}' docs/apikeys.mdx

echo "== imports/other tags nearby context =="
rg -n "```(typescript|ts|javascript|js|bash)" docs/apikeys.mdx
awk '{if (/trigger\.dev\/sdk|```/) printf "%6d\t%s\n", NR, $0}' docs/apikeys.mdx

Repository: triggerdotdev/trigger.dev

Length of output: 1345


Use the required TypeScript fence tag.

Change line 53 from ts to typescript. MDX code examples must use language tags from GitHub’s known languages list.

Source: Coding guidelines

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