docs: document additional environment API keys - #4406
Conversation
|
WalkthroughRewrites 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)
✅ Passed checks (4 passed)
✨ Finishing Touches🧪 Generate unit tests (beta)
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. Comment |
There was a problem hiding this comment.
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
📒 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/sdkin 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,jsonDocumentation 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
|
|
||
| To configure the SDK in code, pass the key to `configure`: | ||
|
|
||
| ```ts Your backend code |
There was a problem hiding this comment.
📐 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 || trueRepository: 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.mdxRepository: 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
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.