Skip to content

Commit b7e4f6e

Browse files
committed
Some more template tweaks
1 parent 46d637c commit b7e4f6e

File tree

4 files changed

+42
-4
lines changed

4 files changed

+42
-4
lines changed

experimental/apps-mcp/lib/providers/clitools/explore.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -81,6 +81,7 @@ func generateExploreGuidance(ctx context.Context, warehouse *sql.EndpointInfo, c
8181
"WarehouseName": warehouseName,
8282
"WarehouseID": warehouseID,
8383
"ProfilesInfo": profilesInfo,
84+
"Profile": currentProfile,
8485
}
8586

8687
// Render base explore template

experimental/apps-mcp/templates/appkit/databricks_template_schema.json

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,13 +12,18 @@
1212
"description": "SQL Warehouse ID",
1313
"order": 2
1414
},
15+
"profile": {
16+
"type": "string",
17+
"description": "Profile Name",
18+
"default": "",
19+
"order": 3
20+
},
1521
"app_description": {
1622
"type": "string",
1723
"description": "App Description (Optional)",
1824
"default": "A Databricks App powered by Databricks AppKit",
19-
"order": 3
25+
"order": 4
2026
}
21-
2227
},
23-
"success_message": "\nYour new project has been created in the '{{.project_name}}' directory!"
28+
"success_message": "\nYour new project has been created in the '{{.project_name}}' directory!\nYOU MUST read {{.project_name}}/CLAUDE.md immediately. It is STRONGLY RECOMMENDED to immediately run `npm install`, run `npm run dev` in the background, and open http://localhost:8000 in your browser before making changes to the app."
2429
}

experimental/apps-mcp/templates/appkit/template/{{.project_name}}/.env.tmpl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
DATABRICKS_HOST={{workspace_host}}
1+
{{if ne .profile ""}}DATABRICKS_CONFIG_PROFILE={{.profile}}{{else}}DATABRICKS_HOST={{workspace_host}}{{end}}
22
DATABRICKS_WAREHOUSE_ID={{.sql_warehouse_id}}
33
DATABRICKS_APP_PORT=8000
44
DATABRICKS_APP_NAME=minimal

experimental/apps-mcp/templates/appkit/template/{{.project_name}}/CLAUDE.md

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,38 @@ TypeScript full-stack template powered by **Databricks AppKit** with tRPC for ad
55
- config/queries/: SQL query files for analytics
66
- shared/: Shared TypeScript types
77

8+
## NPM Scripts
9+
10+
### Development
11+
- `npm run dev` - Start dev server with hot reload (use during active development)
12+
- `npm start` - Start production server (requires `npm run build` first)
13+
14+
### Build
15+
- `npm run build` - Full build (server + client) - use before deployment
16+
- `npm run build:server` - Compile server TypeScript only
17+
- `npm run build:client` - Compile and bundle React app only
18+
19+
### Code Quality
20+
- `npm run typecheck` - Type-check without building (fast validation)
21+
- `npm run lint` - Check for linting issues
22+
- `npm run lint:fix` - Auto-fix linting issues
23+
- `npm run format` - Check code formatting
24+
- `npm run format:fix` - Auto-format code with Prettier
25+
26+
### Testing
27+
- `npm test` - Run unit tests (vitest) + smoke test
28+
- `npm run test:e2e` - Run all Playwright tests
29+
- `npm run test:e2e:ui` - Run Playwright with interactive UI (for debugging)
30+
- `npm run test:smoke` - Run smoke test only (quick validation)
31+
32+
### Utility
33+
- `npm run clean` - Remove all build artifacts and node_modules (requires `npm install` after)
34+
35+
**Common workflows:**
36+
- Development: `npm run dev` → make changes → `npm run typecheck``npm run lint:fix`
37+
- Pre-commit: `npm run typecheck && npm run lint:fix && npm run format:fix && npm test`
38+
- Pre-deploy: `npm run build && npm start` (test locally) → `npm test`
39+
840
## App Naming Constraints
941

1042
App names must not exceed 30 characters total (including target prefix).

0 commit comments

Comments
 (0)