Skip to content

Commit 9162149

Browse files
committed
Devstack: auto-fetch GITHUB_TOKEN from gh CLI
lpb.conf.env now uses $(gh auth token 2>/dev/null || true) to dynamically fetch the GitHub token if gh CLI is installed and the user is logged in. Falls back to empty (MCP server won't start without a token).
1 parent 4df56ae commit 9162149

1 file changed

Lines changed: 6 additions & 0 deletions

File tree

lpb.conf.env

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -58,6 +58,12 @@ LPB_AGENT_BROWSER_IDLE_TIMEOUT_MS=300000
5858
# ─── API Keys ───────────────────────────────────────────────────────────
5959
# Exa MCP search API key
6060
LPB_EXA_API_KEY=
61+
# Context7 MCP server API key (optional — improves rate limits)
62+
LPB_CONTEXT7_API_KEY=
63+
# ─── GitHub MCP Server Token ──────────────────────────────────────────────
64+
# Dynamic: fetched from `gh auth token` if gh CLI is installed & logged in.
65+
# Fallback: set LPB_GITHUB_TOKEN manually or via shell env (highest priority).
66+
LPB_GITHUB_TOKEN=$(gh auth token 2>/dev/null || true)
6167

6268
# ─── Misc ───────────────────────────────────────────────────────────────
6369
# Persist gh CLI auth to ~/.config/gh inside container

0 commit comments

Comments
 (0)