fix: align API key guidance links to project keys page (#519)

Co-authored-by: Letta Code <noreply@letta.com>
This commit is contained in:
Cameron
2026-03-06 15:24:27 -08:00
committed by GitHub
parent 77fc7005e8
commit b3634d0f29
3 changed files with 6 additions and 2 deletions

View File

@@ -817,6 +817,9 @@ const portalHtml = `<!DOCTYPE html>
.auth label { display: block; font-size: 13px; color: #888; margin-bottom: 8px; } .auth label { display: block; font-size: 13px; color: #888; margin-bottom: 8px; }
.auth input { width: 100%; padding: 10px 12px; background: #0a0a0a; border: 1px solid #333; border-radius: 6px; color: #fff; font-size: 14px; font-family: monospace; } .auth input { width: 100%; padding: 10px 12px; background: #0a0a0a; border: 1px solid #333; border-radius: 6px; color: #fff; font-size: 14px; font-family: monospace; }
.auth input:focus { outline: none; border-color: #555; } .auth input:focus { outline: none; border-color: #555; }
.auth-help { margin-top: 10px; font-size: 12px; color: #888; }
.auth-help a { color: #fff; text-decoration: underline; }
.auth-help a:hover { color: #ddd; }
.auth button { margin-top: 12px; padding: 8px 20px; background: #fff; color: #000; border: none; border-radius: 6px; font-size: 13px; font-weight: 500; cursor: pointer; } .auth button { margin-top: 12px; padding: 8px 20px; background: #fff; color: #000; border: none; border-radius: 6px; font-size: 13px; font-weight: 500; cursor: pointer; }
.auth button:hover { background: #ddd; } .auth button:hover { background: #ddd; }
@@ -889,6 +892,7 @@ const portalHtml = `<!DOCTYPE html>
<div class="auth" id="auth"> <div class="auth" id="auth">
<label for="key">API Key</label> <label for="key">API Key</label>
<input type="password" id="key" placeholder="Paste your LETTABOT_API_KEY" autocomplete="off" onkeydown="if(event.key==='Enter')login()"> <input type="password" id="key" placeholder="Paste your LETTABOT_API_KEY" autocomplete="off" onkeydown="if(event.key==='Enter')login()">
<div class="auth-help">Find your API key at <a href="https://app.letta.com/projects/default-project/api-keys" target="_blank" rel="noopener noreferrer">app.letta.com/projects/default-project/api-keys</a>.</div>
<button onclick="login()">Connect</button> <button onclick="login()">Connect</button>
</div> </div>

View File

@@ -527,7 +527,7 @@ const globalConfig = {
// Validate LETTA_API_KEY is set for API mode (docker mode doesn't require it) // Validate LETTA_API_KEY is set for API mode (docker mode doesn't require it)
if (!isDockerServerMode(yamlConfig.server.mode) && !process.env.LETTA_API_KEY) { if (!isDockerServerMode(yamlConfig.server.mode) && !process.env.LETTA_API_KEY) {
log.error('LETTA_API_KEY is required for Letta API.'); log.error('LETTA_API_KEY is required for Letta API.');
log.error(' Get your API key from https://app.letta.com and set it as an environment variable.'); log.error(' Get your API key from https://app.letta.com/projects/default-project/api-keys and set it as an environment variable.');
log.error('Or use docker mode: run "lettabot onboard" and select "Enter Docker server URL".'); log.error('Or use docker mode: run "lettabot onboard" and select "Enter Docker server URL".');
process.exit(1); process.exit(1);
} }

View File

@@ -1403,7 +1403,7 @@ export async function onboard(options?: { nonInteractive?: boolean }): Promise<v
// Validate required fields // Validate required fields
if (!config.apiKey && isLettaApiUrl(config.baseUrl)) { if (!config.apiKey && isLettaApiUrl(config.baseUrl)) {
console.error('❌ Error: LETTA_API_KEY is required'); console.error('❌ Error: LETTA_API_KEY is required');
console.error(' Get your API key from: https://app.letta.com/settings'); console.error(' Get your API key from: https://app.letta.com/projects/default-project/api-keys');
console.error(' Then run: export LETTA_API_KEY="letta_..."'); console.error(' Then run: export LETTA_API_KEY="letta_..."');
console.error(''); console.error('');
console.error(' Or use a Docker server:'); console.error(' Or use a Docker server:');