Initial CST-Agent: portable Linux/Termux/Windows coding agent.

Vendored sashidown, OpenAI-compatible env (OPENAI_*), and bootstrap scripts.

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
WHC
2026-09-07 22:42:32 +08:00
co-authored by Cursor
commit 1f1fcba7ad
75 changed files with 14940 additions and 0 deletions
+31
View File
@@ -0,0 +1,31 @@
#!/data/data/com.termux/files/usr/bin/bash
# One-shot: clone + build CST-Agent on Android Termux.
set -euo pipefail
REPO_URL="${CST_AGENT_REPO:-https://git.whcself.xyz/WHC/CST-agent.git}"
DIR="${1:-CST-agent}"
echo "==> Termux packages"
pkg install -y git clang make cmake libcurl ncurses-ui-libs 2>/dev/null \
|| pkg install -y git clang make cmake curl ncurses
if [[ ! -f "$DIR/Makefile" ]]; then
echo "==> git clone $REPO_URL -> $DIR"
git clone "$REPO_URL" "$DIR"
fi
cd "$DIR"
echo "==> cmake build (TUI)"
cmake -B build -DCMAKE_C_COMPILER=clang -DCST_BUILD_TUI=ON
cmake --build build -j"$(nproc 2>/dev/null || echo 4)"
# Also keep Makefile binary path convenience
cp -f build/cst-agent ./cst-agent 2>/dev/null || true
echo
echo "OK: ./cst-agent (or ./build/cst-agent)"
echo "OpenAI-compatible:"
echo " export OPENAI_API_KEY=sk-..."
echo " export OPENAI_BASE_URL=https://api.openai.com/v1"
echo " export OPENAI_MODEL=gpt-4.1-mini"
echo " ./cst-agent --workspace \$HOME"
echo "Docs: docs/env_openai.md"