- Core captain_claude.py orchestrator - Context manager with SQL schemas - Provider adapters (Anthropic, OpenAI) - Execution scripts
30 lines
660 B
Bash
Executable File
30 lines
660 B
Bash
Executable File
#!/bin/bash
|
|
# Captain Claude - Quick Execute
|
|
# Usage: ./execute.sh "your task here"
|
|
|
|
SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
|
|
VENV_DIR="$SCRIPT_DIR/venv"
|
|
PYTHON="$VENV_DIR/bin/python"
|
|
|
|
if [ -z "$1" ]; then
|
|
echo "Usage: $0 \"task description\""
|
|
echo "Example: $0 \"Create a Python script to monitor disk usage\""
|
|
exit 1
|
|
fi
|
|
|
|
TASK="$1"
|
|
|
|
$PYTHON -c "
|
|
import asyncio
|
|
import sys
|
|
sys.path.insert(0, '$SCRIPT_DIR')
|
|
from captain_claude import CaptainClaude
|
|
|
|
async def main():
|
|
captain = CaptainClaude('$SCRIPT_DIR/captain_output')
|
|
result = await captain.execute('''$TASK''')
|
|
print(result['final_output'])
|
|
|
|
asyncio.run(main())
|
|
"
|