thrivekit 2.0.10 → 2.0.12

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -4,6 +4,8 @@
4
4
 
5
5
  A toolkit for implementing [RALPH](https://ghuntley.com/ralph/) with [Claude Code](https://docs.anthropic.com/en/docs/claude-code) that helps you go from idea to shipped code.
6
6
 
7
+ > **Optimized for:** Python, TypeScript, React, and Docker projects. Auto-detects ports from `docker-compose.yml`, Vite, Next.js, and FastAPI.
8
+
7
9
  > You focus on what matters: your ideas. Brainstorm with `/idea`, then let Ralph handle the rest - coding, testing, and committing in an iterative loop until everything passes.
8
10
 
9
11
  ### This repo helps you customize your code output, run autonomous coding loops, and adds guardrails to ensure good code little and often:
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "thrivekit",
3
- "version": "2.0.10",
3
+ "version": "2.0.12",
4
4
  "description": "Tools to thrive with agentic coding - RALPH autonomous loop, Claude Code hooks, PRD-driven development",
5
5
  "author": "Allie Jones <allie@allthrive.ai>",
6
6
  "license": "MIT",
package/ralph/init.sh CHANGED
@@ -189,15 +189,31 @@ auto_configure_project() {
189
189
  # 2. Detect testUrlBase from common patterns
190
190
  local base_url=""
191
191
 
192
- # Check for Vite config (uses port 5173 by default)
193
- for vite_config in "vite.config.ts" "vite.config.js" "apps/web/vite.config.ts" "apps/web/vite.config.js" \
194
- "apps/frontend/vite.config.ts" "frontend/vite.config.ts"; do
195
- if [[ -f "$vite_config" ]]; then
196
- base_url="http://localhost:5173"
197
- break
192
+ # Check docker-compose.yml for frontend/web service port mappings
193
+ for compose_file in "docker-compose.yml" "docker-compose.yaml" "compose.yml" "compose.yaml"; do
194
+ if [[ -f "$compose_file" && -z "$base_url" ]]; then
195
+ # Look for web/frontend service port mapping
196
+ local web_port
197
+ web_port=$(grep -A 20 -E '^\s*(web|frontend|client|ui):' "$compose_file" 2>/dev/null | \
198
+ grep -E '^\s*-\s*"?[0-9]+:[0-9]+"?' | head -1 | \
199
+ grep -oE '[0-9]+:' | head -1 | tr -d ':')
200
+ if [[ -n "$web_port" ]]; then
201
+ base_url="http://localhost:$web_port"
202
+ fi
198
203
  fi
199
204
  done
200
205
 
206
+ # Check for Vite config (uses port 5173 by default)
207
+ if [[ -z "$base_url" ]]; then
208
+ for vite_config in "vite.config.ts" "vite.config.js" "apps/web/vite.config.ts" "apps/web/vite.config.js" \
209
+ "apps/frontend/vite.config.ts" "frontend/vite.config.ts"; do
210
+ if [[ -f "$vite_config" ]]; then
211
+ base_url="http://localhost:5173"
212
+ break
213
+ fi
214
+ done
215
+ fi
216
+
201
217
  # Check for Next.js (uses port 3000 by default)
202
218
  if [[ -z "$base_url" ]]; then
203
219
  for next_config in "next.config.js" "next.config.ts" "next.config.mjs" \
@@ -278,7 +294,22 @@ auto_configure_project() {
278
294
 
279
295
  # 4. Detect API baseUrl based on backend type
280
296
  local api_url=""
281
- if [[ -n "$backend_dir" ]]; then
297
+
298
+ # Check docker-compose.yml for API service port mappings (most common)
299
+ for compose_file in "docker-compose.yml" "docker-compose.yaml" "compose.yml" "compose.yaml"; do
300
+ if [[ -f "$compose_file" && -z "$api_url" ]]; then
301
+ # Look for api/backend service port mapping like "8000:8000" or "3001:3000"
302
+ local api_port
303
+ api_port=$(grep -A 20 -E '^\s*(api|backend|server|app):' "$compose_file" 2>/dev/null | \
304
+ grep -E '^\s*-\s*"?[0-9]+:[0-9]+"?' | head -1 | \
305
+ grep -oE '[0-9]+:' | head -1 | tr -d ':')
306
+ if [[ -n "$api_port" ]]; then
307
+ api_url="http://localhost:$api_port"
308
+ fi
309
+ fi
310
+ done
311
+
312
+ if [[ -n "$backend_dir" && -z "$api_url" ]]; then
282
313
  # Check Dockerfile for EXPOSE directive
283
314
  if [[ -f "$backend_dir/Dockerfile" ]]; then
284
315
  local docker_port
@@ -403,6 +434,9 @@ ralph_help() {
403
434
  cat <<'EOF'
404
435
  thrivekit - Tools to thrive with agentic coding
405
436
 
437
+ Optimized for Python, TypeScript, React, and Docker projects.
438
+ Auto-detects ports from docker-compose.yml, Vite, Next.js, and FastAPI.
439
+
406
440
  What is this?
407
441
  thrivekit helps you build features using two terminals working together.
408
442