Command reference
For an existing WSL deployment, these scripts live in /opt/devsecops-ai/scripts. Run cd /opt/devsecops-ai before the relative commands below. Read the complete CLI walkthrough for examples, model routing, and execution behavior.
| Entry point | Shell | Purpose / scope |
|---|---|---|
scripts/ask.sh | WSL Bash | Interactive API query; reads environment file and saves thread state |
scripts/devai.sh | WSL Bash | Development CLI, including memory/ingestion modes |
scripts/plan_exec.sh | WSL Bash | Planning/execution workflow; choose mode deliberately |
scripts/wsl-manage.ps1 | Windows PowerShell | Control an existing WSL installation |
scripts/validate-router.sh | WSL Bash | Registry, syntax, and routing checks; requires local dependencies |
scripts/validate-catalogs.py | Project Python | Prompt/playbook catalog validation |
scripts/backup.sh | WSL Bash | Partial backup; see coverage limitations |
scripts/deploy-to-wsl.sh | WSL Bash | State-changing deployment; known revision/rollback limitations |
CLI settings and paths
Section titled “CLI settings and paths”| Setting | Script | Meaning / default |
|---|---|---|
DEVAI_API_URL | All three | Backend URL; http://localhost:8000 |
MODEL_SELECTION | ask.sh | Explicit model request; empty means automatic |
TASK_TYPE | ask.sh | Optional task hint |
DEPLOY_PATH | ask.sh | Looks for .env here first; /opt/devsecops-ai |
DEVAI_MODEL | devai.sh | Explicit model request; empty means automatic |
DEVAI_TASK_TYPE | devai.sh | Optional task hint |
DEVAI_API_KEY | devai.sh, plan_exec.sh | Optional key override, otherwise read the script’s project-root .env |
DEVAI_PYTHON | devai.sh | Memory helper interpreter; project .venv/bin/python |
PLAN_MODEL | plan_exec.sh | Planner model; qwen3.5:2b |
EXEC_MODEL | plan_exec.sh | Implementation model; qwen2.5-coder:3b |
PLAN_STYLE | plan_exec.sh | schema by default; also draft or twopass |
SCHEMA_FILE | plan_exec.sh | Project scripts/handoff-schema.yaml |
TMP_DIR | devai.sh, plan_exec.sh | Generated code/plan location; /tmp/devai |
LOG_FILE | devai.sh, plan_exec.sh | Project logs/devai_history.log or logs/plan_exec_history.log |
ask.sh reads the deployment .env, then falls back to its own project-root .env; an exported API_KEY alone does not override that code path. The other two helpers use DEVAI_API_KEY first. All have an insecure default-key fallback, which should not be relied upon. Keep credentials out of command examples and shell history.
| State | Location / behavior |
|---|---|
| ask.sh thread pointer | /tmp/devsecops_conversation_${USER}.txt |
| devai.sh thread pointer | /tmp/devai_conversation_${USER}.txt; --clear removes this pointer only |
| Planner output | /tmp/devai/current_plan.txt; overwritten by a new plan |
| Generated code | gen_* or exec_* files under TMP_DIR |
| Knowledge memory | Project vector-store, shared with backend RAG when roots match |
plan_exec.sh does not persist a conversation ID in the way the other helpers do. It passes plan text between phases rather than isolating the YAML handoff field. If the plan exceeds 6,000 shell-counted characters, the implementation sends its first 6,000 bytes with a truncation notice; the complete plan remains on disk. Review whether important requirements were cut off, particularly with non-ASCII text. The complete request must still fit the API’s 20,000-character limit.
Flags and task text
Section titled “Flags and task text”Put flags before the task: bash scripts/plan_exec.sh --plan-only "task", not after it. The same applies to devai.sh --execute. Neither helper currently implements a general --model flag; use the variables above. ask.sh reads the question interactively.
Documentation commands
Section titled “Documentation commands”npm run docs:checknpm run buildnpm run docs:linksnpm run previewThe source check validates navigation, redirects, and page metadata. The built-link check inspects generated HTML and fragment targets. Neither command runs the backend or deploys the site.
Next: Use the CLI or contribute documentation.