Skip to content

Latest commit

 

History

History
209 lines (152 loc) · 7.35 KB

File metadata and controls

209 lines (152 loc) · 7.35 KB

Scripts Reference

Authoritative catalogue of repository-level scripts under scripts/.

Table of Contents

Overview

Repository scripts live under scripts/ at the project root. Subdirectories group related scripts by lifecycle stage (deployment, backup, docker, systemd, monitoring, trading). This reference catalogues every script available in the platform repo; extension-specific scripts that live under extensions/*/scripts/ are documented inside the relevant extension.

Code Quality

Script Description
add-frozen-string-literals.sh Add # frozen_string_literal: true pragma to Ruby files
audit-role-access-control.sh Audit frontend code for forbidden role-based access control
cleanup-all-console-logs.sh Remove console.log statements from frontend code
convert-relative-imports.sh Convert relative imports to path aliases (@/)
enhanced-pattern-cleanup.sh Pattern cleanup with advanced fixes
fix-hardcoded-colors.sh Convert hardcoded colors to theme classes
generate-pattern-stats.sh Generate statistics on pattern compliance
pattern-validation.sh Full pattern audit across codebase
quick-pattern-check.sh Quick pattern compliance check
refined-pattern-validation.sh Refined pattern validation with detailed output

Pre-Commit & Validation

Script Description
pre-commit-pattern-check.sh Git pre-commit hook for pattern checks
pre-commit-quality-check.sh Git pre-commit hook for quality checks
validate.sh Full validation suite (RSpec + TypeScript + patterns). Use --skip-tests for TS + patterns only
install-git-hooks.sh Install git hooks (quality + pattern + secret scan) for the repository

Security

Script Description
security-cleanup.sh Clean up security-related issues
security-history-scan.sh Full git history secret scan (main repo + submodules, all branches). Run on demand before audits or contributor changes
security-scan.sh Run security scanning tools (gitleaks + ancillary checks)

Git

Script Description
git-flow-init.sh Initialise git-flow branching model

Service Lifecycle

Script Description
reload-backend.sh Clear bootsnap cache and soft-restart Puma via SIGUSR2. Used by the Claude Code Stop hook for mid-turn reloads after .rb edits
health-check.sh Headless service health check for the running platform (backend / worker / frontend)

Controller Analysis

Script Description
categorize-controllers.sh Categorise controllers by namespace and function
update-api-responses.sh Update controllers to use standard API response methods

Version Management

Script Description
version-bump.sh Bump version numbers across the project
version-manager.sh Version management utilities

Testing

Script Description
run-file-integration-tests.sh Run file storage integration tests

MCP Testing

Script Description
mcp-smoke-test.sh MCP tool execution smoke test

Deployment

Top-level deployment helpers:

Script Description
deploy-remote.sh Remote Docker Swarm deployment ([environment] [version])
setup-remote-deployment.sh One-shot setup script for remote Docker Swarm deployment

Inside scripts/deployment/:

Script Description
deploy.sh Main deployment script
backup.sh Pre-deployment backup
environment-setup.sh Environment configuration setup
health-check.sh Local health check after deployment
health-check-remote.sh Remote server health check
rollback.sh Deployment rollback
setup-secrets.sh Configure production secrets
smoke-tests.sh Post-deployment smoke tests

Backup

Inside scripts/backup/:

Script Description
backup-database.sh PostgreSQL database backup (supports S3 upload)
restore-database.sh Database restore from backup

Docker

Inside scripts/docker/:

Script Description
powernode-build.sh Build Docker images for all services
powernode-deploy.sh Deploy via Docker Compose
powernode-package.sh Package Docker images for distribution

Systemd

Inside scripts/systemd/:

Script Description
powernode-installer.sh Install / manage systemd units. Commands: install, add-instance, status
powernode-backend.sh Backend service wrapper
powernode-frontend.sh Frontend service wrapper
powernode-worker.sh Worker service wrapper
powernode-worker-web.sh Sidekiq Web dashboard wrapper
powernode-reverse-proxy.sh Reverse-proxy service wrapper (Traefik)

Companion directories used by the installer:

  • scripts/systemd/configs/ — sample environment-conf files copied into /etc/powernode/
  • scripts/systemd/units/ — systemd unit templates installed under /etc/systemd/system/
  • scripts/systemd/nginx/ — nginx configuration assets

Monitoring

Inside scripts/monitoring/:

Script Description
tmux-monitor.sh tmux-based multi-pane service monitor
ws-monitor.sh WebSocket connection monitor

Infrastructure

Script Description
manage-proxy-hosts.sh Manage reverse-proxy trusted hosts and generate .mcp.json. Commands: add, remove, list, sync, generate-mcp, status

Extensions

Script Description
setup-extension-frontend-symlinks.sh Symlink each extension's frontend/node_modules to the parent for Jest test resolution. Run once after a fresh frontend/ install

Marketing

Script Description
capture-marketing-screenshots.js Capture marketing-site screenshots via Playwright (Node.js, not shell)

Trading (extension)

Inside scripts/trading/ (only meaningful when the trading extension is enabled):

Script Description
setup_dual_overseers.rb One-shot Ruby runner to configure dual Trading Overseers for an account

Related docs

Materials previously at

  • docs/infrastructure/SCRIPTS_REFERENCE.md

Last verified: 2026-05-17