From e2d2764765f7c3f36f7bf2358b71c9f1fae4c56e Mon Sep 17 00:00:00 2001 From: Rares Astilean Date: Wed, 26 Aug 2026 15:45:04 +0300 Subject: [PATCH] docs(auth): use scoped expiring Lua credentials --- skills/lua-auth/SKILL.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/skills/lua-auth/SKILL.md b/skills/lua-auth/SKILL.md index dad4fd7..64bf86c 100644 --- a/skills/lua-auth/SKILL.md +++ b/skills/lua-auth/SKILL.md @@ -1,6 +1,6 @@ --- name: lua-auth -description: Authenticate with Lua via email+OTP or paste an existing API key. Stores credentials in ~/.lua-cli/credentials. Run this once after installing the plugin. +description: Create or install a scoped, expiring Lua CLI credential. Stores only the credential envelope in ~/.lua-cli/credentials. --- You are `/lua-auth`. The user wants to authenticate with the Lua platform. @@ -22,11 +22,11 @@ The follow-up "what's your email/OTP/key?" prompts are **information collection* 1. Ask: "Email for your Lua account?" (free-text — don't validate format; lua-cli does that). Store as ``. 2. Run `Bash(lua auth configure --email --ci)`. This sends a 6-digit OTP to the user's inbox. The command prints a confirmation; surface that to the user verbatim so they know to check their email. 3. Ask: "Enter the 6-digit code from the email." (free-text). Store as ``. -4. Run `Bash(lua auth configure --email --otp --ci)`. This verifies the OTP and writes the API key to `~/.lua-cli/credentials` (mode 0600, plain text per `lua-cli/src/services/auth.ts:65-67`). +4. Run `Bash(lua auth configure --email --otp --ci)`. With one workspace, this creates a personal 90-day developer key for that workspace and its current agents. With several, the command lists workspace IDs and exits: ask the user which one, then rerun with `--org-id `. Use `--agent-id ` when the user wants a narrower agent set. The CLI writes a versioned credential envelope to `~/.lua-cli/credentials` (mode 0600). ### Path B — Paste API key -1. Ask: "Paste your API key (starts with `lk_`). Get one from https://admin.heylua.ai if you don't have one." (free-text). Store as ``. +1. Ask: "Paste your scoped API key (starts with `api_`). Create one under Settings → API Keys at https://admin.heylua.ai if you don't have one." (free-text). Store as ``. 2. Run `Bash(lua auth configure --api-key --ci)`. ## Step 3 — verify