Skip to content

Commit 59d4743

Browse files
docs: add 'For AI agents' section, fix health URL, update QUICKSTART
- README.md: add 'For AI agents' section with exact non-interactive command - docs/llms-full.txt: create AI agent runbook with correct health URL (/api/actuator/health not /actuator/health) - docs/llms.txt: create short version for quick reference - docs/QUICKSTART.md: rewrite for current install flow (was stale: Java 17, start-backend.sh, NEXT_PUBLIC_API_URL) Fixes P1 item: llms-full.txt health URL 404s. Co-authored-by: Venkat SF <venkatesh.sakamuri@stayflexi.com>
1 parent d7beba5 commit 59d4743

4 files changed

Lines changed: 390 additions & 56 deletions

File tree

‎README.md‎

Lines changed: 37 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -29,13 +29,47 @@ DeepSQL Desktop first ship + Agent/Brain/Editor hardening. Notes:
2929
curl -fsSL https://deepsql.ai/install.sh | bash
3030
```
3131

32-
This checks prerequisites, clones the latest release to `~/deepsql`, and guides you
33-
through configuration. See [`scripts/self-host/remote-install.sh`](scripts/self-host/remote-install.sh)
34-
for options (`--yes` for noninteractive, `--branch` for a specific version).
32+
This clones the latest release to `~/deepsql`, runs the full install, and prints the
33+
login URL and credentials location. The only input you need is an LLM API key — or skip
34+
it and configure the key later in **Settings → AI Provider**.
35+
36+
**Options:** `--non-interactive`, `--fresh` (clean install), `--no-seed-demo`,
37+
`--ref v1.3.0` (specific version). See
38+
[`scripts/self-host/remote-install.sh`](scripts/self-host/remote-install.sh) for the
39+
full list.
3540

3641
> The script source of truth is [`scripts/self-host/remote-install.sh`](scripts/self-host/remote-install.sh)
3742
> in this repository. `deepsql.ai/install.sh` serves a copy for the homepage CTA.
3843
44+
### For AI agents
45+
46+
If you are a coding agent (Claude, Cursor, Codex) setting up DeepSQL for a user:
47+
48+
1. **Ask the user for one input:** their LLM API key (OpenAI `sk-...`, Azure, etc.).
49+
This is optional — the stack runs without a key and the user can add it later.
50+
51+
2. **Run the install:**
52+
```bash
53+
DEEPSQL_CHAT_API_KEY=<key> curl -fsSL https://deepsql.ai/install.sh | bash
54+
```
55+
Or without a key:
56+
```bash
57+
DEEPSQL_INITIAL_ADMIN_EMAIL=admin@example.com curl -fsSL https://deepsql.ai/install.sh | bash
58+
```
59+
60+
3. **Verify the install:**
61+
```bash
62+
curl -fsS http://localhost:8080/api/actuator/health
63+
```
64+
65+
4. **Tell the user:**
66+
- Login URL: **http://localhost:3000**
67+
- Login email and password: stored in `~/deepsql/.env`
68+
- If no LLM key was provided: configure it in **Settings → AI Provider**
69+
70+
The installer prints `NEEDS_USER_INPUT: ...` lines for any missing optional inputs,
71+
then exits 0 with all services running.
72+
3973
### Step-by-step
4074

4175
Five steps, in order. Budget about fifteen minutes, most of it waiting on the first build.

‎docs/QUICKSTART.md‎

Lines changed: 69 additions & 53 deletions
Original file line numberDiff line numberDiff line change
@@ -1,90 +1,106 @@
11
# Quick Start Guide
22

3-
## ✅ Frontend Status
4-
**Frontend is currently running on:** http://localhost:3000
3+
## One-liner install
54

6-
You can access it in your browser now!
5+
```bash
6+
curl -fsSL https://deepsql.ai/install.sh | bash
7+
```
8+
9+
This runs the complete install: clones the repo, builds the stack from source, and
10+
starts all services. The only input needed is an LLM API key — or skip it and
11+
configure later in Settings → AI Provider.
712

8-
## 🚀 Starting the Backend
13+
## What you need
914

10-
The backend requires Java 17+ and Maven. Here's how to set it up:
15+
- **Docker** with Compose v2 and buildx >= 0.17.0
16+
- **~4 GB of memory** available to Docker
17+
- **An LLM API key** (optional — can configure later)
1118

12-
### Step 1: Install Java 17
19+
On a fresh Ubuntu/Debian server:
1320

14-
**macOS (using Homebrew):**
1521
```bash
16-
brew install openjdk@17
22+
curl -fsSL https://raw.githubusercontent.com/DeepSQLAI/deepsql/main/scripts/self-host/bootstrap-server.sh | sudo bash
1723
```
1824

19-
**Or download from:**
20-
- https://adoptium.net/ (recommended)
21-
- Select Java 17 LTS for macOS
25+
## With an LLM key
2226

23-
**Verify installation:**
2427
```bash
25-
java -version
26-
# Should show: openjdk version "17.x.x"
28+
DEEPSQL_CHAT_API_KEY=sk-your-key curl -fsSL https://deepsql.ai/install.sh | bash
2729
```
2830

29-
### Step 2: Install Maven
31+
## Without an LLM key (keyless start)
3032

31-
**macOS (using Homebrew):**
3233
```bash
33-
brew install maven
34+
DEEPSQL_INITIAL_ADMIN_EMAIL=admin@example.com curl -fsSL https://deepsql.ai/install.sh | bash
3435
```
3536

36-
**Verify installation:**
37-
```bash
38-
mvn -version
39-
```
37+
Chat and AI features are disabled until you configure a key in Settings → AI Provider.
4038

41-
### Step 3: Start the Backend
39+
## After install
4240

43-
**Option A: Using the helper script**
44-
```bash
45-
./start-backend.sh
46-
```
41+
1. **Open** http://localhost:3000
42+
2. **Log in** with the email and password from `~/deepsql/.env`
43+
3. **Connect a database** (Postgres or MySQL)
44+
4. **Start asking questions** in the Agent tab
45+
46+
## Verify the install
4747

48-
**Option B: Manual start**
4948
```bash
50-
cd backend
51-
mvn spring-boot:run
49+
curl -fsS http://localhost:8080/api/actuator/health
5250
```
5351

54-
The backend will start on: **http://localhost:8080**
52+
## Options
5553

56-
### Step 4: Verify Both Services
54+
- `--non-interactive` — never prompt (use with env vars)
55+
- `--fresh` — remove existing volumes before install
56+
- `--no-seed-demo` — skip demo database seeding
57+
- `--ref v1.3.0` — install a specific version
5758

58-
1. **Backend**: Open http://localhost:8080/api/connections
59-
- Should return: `[]` (empty array)
59+
Example:
6060

61-
2. **Frontend**: Already running at http://localhost:3000
62-
- You should see the DBA Agent interface
61+
```bash
62+
curl -fsSL https://deepsql.ai/install.sh | bash -s -- --fresh --ref v1.3.0
63+
```
6364

64-
## 🎯 Next Steps
65+
## Ports
6566

66-
1. Open http://localhost:3000 in your browser
67-
2. Click the Settings icon (⚙️) in the left panel
68-
3. Connect to your MySQL or PostgreSQL database
69-
4. View schema visualizations and DBA stats!
67+
| Service | Port | Override |
68+
|----------|------|-------------------------|
69+
| Frontend | 3000 | `DEEPSQL_FRONTEND_PORT` |
70+
| Backend | 8080 | `DEEPSQL_BACKEND_PORT` |
71+
| Postgres | 5432 | `DEEPSQL_POSTGRES_PORT` |
72+
| Valkey | 6379 | `DEEPSQL_VALKEY_PORT` |
7073

71-
## 📝 Notes
74+
## Troubleshooting
7275

73-
- The frontend is already running in the background
74-
- You need to start the backend separately in a new terminal
75-
- Both services need to be running for full functionality
76-
- Backend stores encrypted credentials in `backend/data/vault.mv.db`
76+
**Docker permission denied:**
77+
```bash
78+
sudo usermod -aG docker $USER
79+
newgrp docker
80+
```
7781

78-
## 🐛 Troubleshooting
82+
**buildx too old:**
83+
```bash
84+
curl -fsSL https://raw.githubusercontent.com/DeepSQLAI/deepsql/main/scripts/self-host/bootstrap-server.sh | sudo bash
85+
```
7986

8087
**Backend won't start:**
81-
- Ensure Java 17+ is installed: `java -version`
82-
- Ensure Maven is installed: `mvn -version`
83-
- Check if port 8080 is available: `lsof -i :8080`
88+
Check `docker compose logs backend` — usually a missing secret or port conflict.
89+
90+
## Development
91+
92+
For local development without Docker:
93+
94+
```bash
95+
docker compose up -d postgres valkey
96+
cd backend && ./mvnw spring-boot:run # http://localhost:8080/api
97+
npm install && npm run dev # http://localhost:3000
98+
```
8499

85-
**Frontend can't connect to backend:**
86-
- Ensure backend is running on port 8080
87-
- Check browser console for errors
88-
- Verify `.env.local` has: `NEXT_PUBLIC_API_URL=http://localhost:8080`
100+
Requires **JDK 25** and **Node 22**.
89101

102+
## Next steps
90103

104+
- [README.md](../README.md) — full documentation
105+
- [docs/llms-full.txt](llms-full.txt) — AI agent setup runbook
106+
- [mcp/README.md](../mcp/README.md) — CLI and MCP server

0 commit comments

Comments
 (0)