AIGuardian
Back to Home

Commands

AIGuardian Documentation

Loading update info...
View on GitHub

Command Reference

This document provides a comprehensive reference for all AIGuardian commands and options.

Basic Commands

aiguardian

The main command to run AIGuardian. Without any options, it will:

  1. 1. Detect your project type
  1. 2. Display available tasks
  1. 3. Prompt you to select tasks to run
  2. bash
    aiguardian
    

    aiguardian --all

    Run all available tasks for the detected project type.

    bash
    aiguardian --all
    

    aiguardian --version

    Display the current version of AIGuardian.

    bash
    aiguardian --version
    

    aiguardian --help

    Display help information and available commands.

    bash
    aiguardian --help
    

    Task Selection Options

    --tasks

    Run specific tasks by their IDs, separated by commas.

    bash
    aiguardian --tasks clean-temp,format-code
    

    --exclude

    Run all tasks except the specified ones.

    bash
    aiguardian --all --exclude js-to-ts,format-code
    

    --category

    Run all tasks in a specific category.

    bash
    aiguardian --category common
    

    Execution Options

    --dry-run

    Preview changes without applying them.

    bash
    aiguardian --dry-run
    

    --verbose

    Display detailed information during execution.

    bash
    aiguardian --verbose
    

    --silent

    Suppress all output except errors.

    bash
    aiguardian --silent
    

    --no-backup

    Skip creating backups before making changes (not recommended).

    bash
    aiguardian --no-backup
    

    --backup-dir

    Specify a custom directory for backups.

    bash
    aiguardian --backup-dir ./my-backups
    

    Project Options

    --project-type

    Manually specify the project type instead of auto-detection.

    bash
    aiguardian --project-type javascript
    

    Available project types:

    • javascript
    • typescript
    • python
    • java
    • generic

    --config

    Specify a custom configuration file.

    bash
    aiguardian --config ./aiguardian.config.js
    

    Advanced Options

    --ignore

    Specify patterns to ignore (in addition to .gitignore).

    bash
    aiguardian --ignore "/.bak,/.tmp"
    

    --include

    Force inclusion of files that would otherwise be ignored.

    bash
    aiguardian --include "/*.min.js"
    

    --concurrency

    Set the maximum number of concurrent tasks.

    bash
    aiguardian --concurrency 4
    

    Environment Variables

    AIGuardian also respects the following environment variables:

    • AIGUARDIAN_CONFIG: Path to a configuration file
    • AIGUARDIAN_BACKUP_DIR: Directory for backups
    • AIGUARDIAN_VERBOSE: Set to true for verbose output
    • AIGUARDIAN_NO_COLOR: Set to true to disable colored output

    Exit Codes

    • 0: Success
    • 1: General error
    • 2: Configuration error
    • 3: Task execution error
    • 4: Project detection error

Was this page helpful?