-
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathaiwb_headless
More file actions
executable file
·39 lines (35 loc) · 1.59 KB
/
aiwb_headless
File metadata and controls
executable file
·39 lines (35 loc) · 1.59 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
#!/usr/bin/env bash
# aiwb_headless — AIworkbench headless entry point for bot/CI/script use
#
# Runs aiwb in fully non-interactive mode: no gum TUI, no confirmation prompts,
# no "what's next?" menus. Designed for automation, bots, and CI pipelines.
#
# Usage:
# aiwb_headless --mode make --prompt "build a REST API for users"
# aiwb_headless --mode tweak --instruct /path/to/instructions.md
# aiwb_headless --mode debug --prompt "fix the login bug"
#
# Options (same as 'aiwb headless'):
# --mode make|tweak|debug (required)
# --prompt inline prompt text
# --instruct path to instruction file (alternative to --prompt)
# --model provider:name e.g. gemini:gemini-2.0-flash-exp
# --provider model provider name
# --model-name model name
# --verifier provider:name for verification step
# --check-instruct path to check instruction file
# --context path to context file or directory
# --output copy output to this file path
# --timeout pipeline timeout in seconds (default: $AIWB_HEADLESS_TIMEOUT or 300)
#
# Environment variables:
# TMPDIR temp directory (Termux: set to writable path, e.g. $HOME/.clide/tmp)
# AIWB_HEADLESS_TIMEOUT default timeout for the full headless pipeline (seconds)
export AIWB_HEADLESS=1
# Ensure CWD exists (Termux may have a stale CWD after app switches)
if ! pwd >/dev/null 2>&1; then
cd "${HOME}" 2>/dev/null || cd / 2>/dev/null || true
fi
# Resolve real path to aiwb sibling script
SCRIPT_DIR="$(cd "$(dirname "$(realpath "${BASH_SOURCE[0]}")")" && pwd)"
exec "${SCRIPT_DIR}/aiwb" headless "$@"