Skip to content

feat(webapp): seed a local CLI personal access token#4135

Merged
1stvamp merged 2 commits into
mainfrom
wes/seed-local-cli-pat
Jul 3, 2026
Merged

feat(webapp): seed a local CLI personal access token#4135
1stvamp merged 2 commits into
mainfrom
wes/seed-local-cli-pat

Conversation

@1stvamp

@1stvamp 1stvamp commented Jul 3, 2026

Copy link
Copy Markdown
Member

Summary

Getting the CLI talking to a local instance meant the browser magic-link login, which is no good when you're driving things headlessly (an agent, a container, or just no browser to hand). The seed already prints dev secret keys for the batch-limit orgs, so it now also mints a personal access token for the seeded local@trigger.dev user and prints a ready-to-run export TRIGGER_ACCESS_TOKEN=... next to them.

Re-seeding stays idempotent: it decrypts and reprints the existing local-dev-cli token rather than piling up a new one on every run.


This is part 2 of 2 in a stack made with GitButler:

@changeset-bot

changeset-bot Bot commented Jul 3, 2026

Copy link
Copy Markdown

⚠️ No Changeset found

Latest commit: 1598414

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 3, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Repository UI

Review profile: CHILL

Plan: Pro

Run ID: a47b5f8b-10a8-496b-a1ae-54c10f3095d1

📥 Commits

Reviewing files that changed from the base of the PR and between 4cf861c and 1598414.

📒 Files selected for processing (1)
  • apps/webapp/seed.ts
🚧 Files skipped from review as they are similar to previous changes (1)
  • apps/webapp/seed.ts
📜 Recent review details
⏰ Context from checks skipped due to timeout. (16)
  • GitHub Check: webapp / 🧪 Unit Tests: Webapp (10, 10)
  • GitHub Check: webapp / 🧪 Unit Tests: Webapp (9, 10)
  • GitHub Check: webapp / 🧪 Unit Tests: Webapp (8, 10)
  • GitHub Check: webapp / 🧪 Unit Tests: Webapp (7, 10)
  • GitHub Check: webapp / 🧪 Unit Tests: Webapp (6, 10)
  • GitHub Check: webapp / 🧪 Unit Tests: Webapp (2, 10)
  • GitHub Check: webapp / 🧪 Unit Tests: Webapp (4, 10)
  • GitHub Check: webapp / 🧪 Unit Tests: Webapp (5, 10)
  • GitHub Check: webapp / 🧪 Unit Tests: Webapp (1, 10)
  • GitHub Check: webapp / 🧪 Unit Tests: Webapp (3, 10)
  • GitHub Check: typecheck / typecheck
  • GitHub Check: e2e-webapp / 🧪 E2E Tests: Webapp
  • GitHub Check: code-quality / code-quality
  • GitHub Check: audit
  • GitHub Check: audit
  • GitHub Check: Analyze (javascript-typescript)

Walkthrough

The seed script now detects local instances, mints or reuses a local-dev-cli Personal Access Token for the seeded admin user, and prints the plaintext token along with TRIGGER_ACCESS_TOKEN and TRIGGER_API_URL instructions. The token is stored with encrypted, hashed, and obfuscated metadata, and re-seeding decrypts and reprints the existing token when present. A changelog note documents the local seeding behavior.

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Description check ⚠️ Warning The description covers the change summary but misses required template sections like Closes #, Checklist, Testing, Changelog, and Screenshots. Add the issue link and fill in the checklist, Testing, Changelog, and Screenshots sections to match the repository template.
✅ Passed checks (4 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly summarizes the main change: seeding a local CLI personal access token.
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 docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch wes/seed-local-cli-pat

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.

@1stvamp 1stvamp force-pushed the wes/seed-local-cli-pat branch from 60a819e to e4a9c00 Compare July 3, 2026 10:05
coderabbitai[bot]

This comment was marked as resolved.

@1stvamp 1stvamp force-pushed the wes/seed-local-cli-pat branch 2 times, most recently from 7feda32 to 1d81ae1 Compare July 3, 2026 11:00
@1stvamp 1stvamp changed the base branch from main to fix/db-seed July 3, 2026 11:00
Base automatically changed from fix/db-seed to main July 3, 2026 11:45
Getting the CLI talking to a local instance meant the browser magic-link
login, which is no good when you're driving things headlessly (an agent, a
container, or just no browser to hand). The seed already prints dev secret
keys for the batch-limit orgs, so it now also mints a personal access token
for the seeded local@trigger.dev user and prints a ready-to-run
TRIGGER_ACCESS_TOKEN export next to them.

Re-seeding stays idempotent: it decrypts and reprints the existing
local-dev-cli token rather than piling up a new one on every run.
@1stvamp 1stvamp force-pushed the wes/seed-local-cli-pat branch from 1d81ae1 to 4cf861c Compare July 3, 2026 11:49
@pkg-pr-new

pkg-pr-new Bot commented Jul 3, 2026

Copy link
Copy Markdown

Open in StackBlitz

@trigger.dev/build

npm i https://pkg.pr.new/@trigger.dev/build@4cf861c

trigger.dev

npm i https://pkg.pr.new/trigger.dev@4cf861c

@trigger.dev/core

npm i https://pkg.pr.new/@trigger.dev/core@4cf861c

@trigger.dev/python

npm i https://pkg.pr.new/@trigger.dev/python@4cf861c

@trigger.dev/react-hooks

npm i https://pkg.pr.new/@trigger.dev/react-hooks@4cf861c

@trigger.dev/redis-worker

npm i https://pkg.pr.new/@trigger.dev/redis-worker@4cf861c

@trigger.dev/rsc

npm i https://pkg.pr.new/@trigger.dev/rsc@4cf861c

@trigger.dev/schema-to-json

npm i https://pkg.pr.new/@trigger.dev/schema-to-json@4cf861c

@trigger.dev/sdk

npm i https://pkg.pr.new/@trigger.dev/sdk@4cf861c

commit: 4cf861c

@1stvamp 1stvamp marked this pull request as ready for review July 3, 2026 11:51
@1stvamp 1stvamp self-assigned this Jul 3, 2026
coderabbitai[bot]

This comment was marked as resolved.

Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>

@devin-ai-integration devin-ai-integration 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.

✅ Devin Review: No Issues Found

Devin Review analyzed this PR and found no bugs or issues to report.

Open in Devin Review

@1stvamp 1stvamp merged commit 58b114f into main Jul 3, 2026
31 checks passed
@1stvamp 1stvamp deleted the wes/seed-local-cli-pat branch July 3, 2026 13:10
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.

2 participants