Skip to content

Commit 8c836fc

Browse files
authored
fix: setup tokens on ui (#52)
* fix: setup tokens on ui * fix
1 parent a5e9fd4 commit 8c836fc

File tree

24 files changed

+2587
-49
lines changed

24 files changed

+2587
-49
lines changed

.env.example

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -6,9 +6,6 @@
66
# REQUIRED - You must set these before running
77
# =============================================================================
88

9-
# Anthropic API key for Claude models (get from console.anthropic.com)
10-
ANTHROPIC_API_KEY=sk-ant-...
11-
129
# Convex deployment URL (from your Convex dashboard)
1310
# Apps reference this as NEXT_PUBLIC_CONVEX_URL
1411
CONVEX_URL=https://your-deployment.convex.cloud
@@ -21,8 +18,8 @@ SQUADHUB_TOKEN=your-secure-token-here
2118
# OPTIONAL
2219
# =============================================================================
2320

24-
# OpenAI API key (for image generation, optional)
25-
# OPENAI_API_KEY=sk-...
21+
# NOTE: API keys (Anthropic, OpenAI) are managed via the UI during onboarding
22+
# and in Settings > General > API Keys. They are stored in the Convex tenant record.
2623

2724
# Environment: dev or prod
2825
ENVIRONMENT=dev

CLAUDE.md

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,6 @@ Core models: `agents`, `tasks`, `messages` (see `packages/backend/convex/schema.
5454
## Environment Variables
5555

5656
- `NEXT_PUBLIC_CONVEX_URL`: Convex deployment URL (required)
57-
- `ANTHROPIC_API_KEY`: Anthropic API key for AI operations (required, passed to squadhub)
5857
- `SQUADHUB_TOKEN`: Authentication token for squadhub gateway (required)
5958
- `SQUADHUB_URL`: SquadHub gateway URL (set in `.env.development` / `.env.production`)
6059
- `NODE_ENV`: local (`development`) vs deployed (`production`) — controls dev tooling

README.md

Lines changed: 7 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -44,12 +44,10 @@ Edit `.env`:
4444

4545
```bash
4646
# Required
47-
ANTHROPIC_API_KEY=sk-ant-...
4847
SQUADHUB_TOKEN=your-secure-token
4948
CONVEX_URL=https://your-deployment.convex.cloud
5049

51-
# Optional
52-
OPENAI_API_KEY=sk-... # For image generation
50+
# API keys (Anthropic, OpenAI) are configured via the UI during onboarding
5351
```
5452

5553
### 3. Deploy Convex Backend
@@ -281,9 +279,9 @@ pnpm convex:deploy
281279

282280
## Environment Variables
283281

284-
| Variable | Required | Description |
285-
| ------------------- | -------- | --------------------------------- |
286-
| `ANTHROPIC_API_KEY` | Yes | Anthropic API key for Claude |
287-
| `SQUADHUB_TOKEN` | Yes | Auth token for squadhub gateway |
288-
| `CONVEX_URL` | Yes | Convex deployment URL |
289-
| `OPENAI_API_KEY` | No | OpenAI key (for image generation) |
282+
| Variable | Required | Description |
283+
| ---------------- | -------- | ------------------------------- |
284+
| `SQUADHUB_TOKEN` | Yes | Auth token for squadhub gateway |
285+
| `CONVEX_URL` | Yes | Convex deployment URL |
286+
287+
API keys (Anthropic, OpenAI) are managed via the UI during onboarding and in Settings > General > API Keys.

apps/web/CLAUDE.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,7 @@ import type { Agent, Tenant } from "@clawe/backend/types";
7474
**Environment variables:**
7575

7676
- `NEXT_PUBLIC_CONVEX_URL` → Convex deployment URL (required)
77-
- `ANTHROPIC_API_KEY`Anthropic API key (passed to squadhub container)
77+
- API keys (Anthropic, OpenAI) → managed via the UI, stored in Convex tenant record
7878
- `SQUADHUB_URL` → SquadHub gateway URL
7979
- `SQUADHUB_TOKEN` → SquadHub authentication token (from root `.env`)
8080

apps/web/src/app/(dashboard)/_components/nav-settings.tsx

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ import {
77
Settings2,
88
AlertTriangle,
99
Globe,
10+
KeyRound,
1011
Plug,
1112
} from "lucide-react";
1213
import {
@@ -25,6 +26,11 @@ const settingsItems = [
2526
url: "/settings/general",
2627
icon: Settings2,
2728
},
29+
{
30+
title: "API Keys",
31+
url: "/settings/api-keys",
32+
icon: KeyRound,
33+
},
2834
{
2935
title: "Business",
3036
url: "/settings/business",

0 commit comments

Comments
 (0)