This document provides an overview of all development and automation scripts available in the Jiro AI Assistant project.
The scripts/ directory contains various PowerShell (.ps1) and Bash (.sh) scripts for development workflow automation, documentation generation, testing, and release management. All scripts are cross-platform compatible.
Purpose: Automated development environment setup for new contributors
What it does:
- Checks for required development tools (.NET SDK, Git, Node.js, Docker, PowerShell Core)
- Installs global .NET tools (DocFX) and Node.js tools (markdownlint-cli)
- Copies configuration files from examples (
.env,appsettings.json) - Restores .NET project dependencies
- Generates a
DEV-SETUP.mdguide with manual configuration steps
Usage:
# PowerShell
.\scripts\setup-dev.ps1
# With options
.\scripts\setup-dev.ps1 -Force -SkipToolCheck# Bash
./scripts/setup-dev.sh
# With options
./scripts/setup-dev.sh --force --skip-tool-checkParameters:
-SkipToolCheck/--skip-tool-check: Skip checking for required development tools-SkipDependencies/--skip-dependencies: Skip installing project dependencies-Force/--force: Overwrite existing configuration files-Verbose/--verbose: Show detailed output during setup
Purpose: Generate API documentation using DocFX
What it does:
- Builds the DocFX documentation site from
dev/docfx.json - Outputs generated documentation to
src/_site/ - Supports both build-only and build-and-serve modes
Usage:
# PowerShell
.\scripts\docfx-gen.ps1 # Build only
.\scripts\docfx-gen.ps1 -Serve # Build and serve locally# Bash
./scripts/docfx-gen.sh # Build only
./scripts/docfx-gen.sh --serve # Build and serve locallyParameters:
-Serve/--serve: Start a local web server after building documentation
Purpose: Lint markdown files for consistency and quality
What it does:
- Runs markdownlint-cli on all markdown files in the project
- Uses configuration from
src/.markdownlint.json - Ignores generated files and build directories
- Supports fix mode for automatic corrections
Usage:
# PowerShell
.\scripts\markdown-lint.ps1 # Check only
.\scripts\markdown-lint.ps1 -Fix # Check and fix issues# Bash
./scripts/markdown-lint.sh # Check only
./scripts/markdown-lint.sh --fix # Check and fix issuesParameters:
-Fix/--fix: Automatically fix markdown issues where possible
Purpose: Generate and update project structure documentation
What it does:
- Uses
eza(modernlsreplacement) to generate a tree view of the project - Auto-installs
ezaif not present (via cargo or winget) - Outputs structure to
docs/project-structure.md - Filters out common ignore patterns (node_modules, .git, build artifacts)
Usage:
# PowerShell
.\scripts\generate-project-structure.ps1# Bash
./scripts/generate-project-structure.shPurpose: Run the complete CI/CD pipeline locally for testing
What it does:
- Builds the .NET solution
- Runs all unit tests
- Generates documentation
- Lints markdown files
- Validates project structure
- Provides comprehensive error reporting
Usage:
# PowerShell
.\scripts\local-ci-test.ps1 # Run all tests
.\scripts\local-ci-test.ps1 -SkipBuild # Skip build step
.\scripts\local-ci-test.ps1 -SkipTests # Skip unit tests
.\scripts\local-ci-test.ps1 -SkipDocs # Skip documentation tests# Bash
./scripts/local-ci-test.sh # Run all tests
./scripts/local-ci-test.sh --skip-build # Skip build step
./scripts/local-ci-test.sh --skip-tests # Skip unit tests
./scripts/local-ci-test.sh --skip-docs # Skip documentation testsParameters:
-SkipBuild/--skip-build: Skip the build step-SkipTests/--skip-tests: Skip running unit tests-SkipDocs/--skip-docs: Skip documentation generation and linting-Verbose/--verbose: Show detailed output
Purpose: Automate the release process
What it does:
- Validates the current state of the repository
- Updates version numbers in project files
- Creates git tags for releases
- Generates release notes
- Prepares release artifacts
Usage:
# PowerShell
.\scripts\create-release.ps1 -Version "1.2.3"# Bash
./scripts/create-release.sh --version "1.2.3"- .NET SDK: Required for building and running .NET projects
- Git: Required for version control operations
- PowerShell Core (recommended): For cross-platform PowerShell script execution
- Node.js: Required for markdown linting (markdownlint-cli)
- Docker: Required for containerized development and testing
- Cargo (Rust): For installing
ezaon systems without package managers
The following tools are automatically installed by the scripts when needed:
- DocFX: .NET documentation generation tool
- markdownlint-cli: Markdown linting tool (if Node.js is available)
- eza: Modern directory listing tool
All scripts are designed to work across platforms:
- Windows: Use PowerShell scripts (
.ps1) with PowerShell Core or Windows PowerShell - Linux/macOS: Use Bash scripts (
.sh) or PowerShell scripts with PowerShell Core - Path handling: Scripts automatically detect and use appropriate path separators
- Tool installation: Scripts use platform-appropriate package managers (winget, cargo, apt, brew, etc.)
Scripts use and create the following configuration files:
src/.env: Environment variables (copied fromsrc/.env.example)src/Jiro.Kernel/Jiro.App/appsettings.json: Application settings (copied from example)src/.markdownlint.json: Markdown linting configurationdev/docfx.json: DocFX documentation configurationDEV-SETUP.md: Generated development setup guide (ignored by git)
All scripts include comprehensive error handling:
- Validation: Check for required tools and files before execution
- Fallbacks: Provide alternative methods when primary tools are unavailable
- Informative output: Clear success, warning, and error messages with color coding
- Exit codes: Proper exit codes for CI/CD integration
- Cleanup: Automatic cleanup of temporary files and state restoration
The scripts are designed to integrate seamlessly with GitHub Actions and other CI/CD systems:
- GitHub Actions: Used in
.github/workflows/for automated testing and deployment - Exit codes: Proper exit codes for pipeline success/failure detection
- Logging: Structured output compatible with CI/CD log parsing
- Environment detection: Automatic detection of CI/CD environments
When using or modifying these scripts:
- Test locally: Always run
local-ci-testbefore pushing changes - Cross-platform testing: Test scripts on different operating systems when possible
- Error handling: Add appropriate error handling for new functionality
- Documentation: Update this reference when adding new scripts or parameters
- Consistency: Follow the established patterns for parameters and output formatting
- Tool not found: Run
setup-devto install required tools - Permission denied: Make sure Bash scripts are executable (
chmod +x) - Path issues: Use the scripts from the project root directory
- Network issues: Some tools require internet access for installation
- Run any script with
-hor--helpfor usage information - Check the
DEV-SETUP.mdfile generated bysetup-devfor configuration guidance - Review the CI/CD logs in GitHub Actions for debugging pipeline issues
For more detailed information about specific workflows, see Workflow Pipelines.