Automation

Run Kodezi CLI in non-interactive mode for scripting, CI/CD pipelines, and automated workflows.

Automation mode allows you to execute Kodezi CLI commands without starting interactive mode. This is useful when you need consistent, predictable results for:

  • CI/CD pipelines
  • Shell scripts
  • Batch file operations
  • Automated code reviews
  • Repeated scheduled tasks

It is the fastest way to run Kodezi for single shot instructions.

Run Command

Use kodezi run to execute a single instruction:

# One-off task
kodezi run "Generate a README for this project"

# Pipe input from another command
echo "Explain this code" | kodezi run

# Quiet mode for clean CI logs
kodezi run -q "Run tests and report results"

What These Do

  • One-off task: Executes exactly one instruction and exits.
  • Pipe input: Useful for automation scripts or when feeding external text.
  • Quiet mode: Removes animations/spinners so CI logs stay clean and readable.

Features

Automation mode offers:

  • Auto Approval Automatically approves permissions without prompting. Essential in CI environments.
  • Streaming Output Displays results instantly as they are generated.
  • Exit Codes Ensures pipelines can detect success or failure using standard exit codes.
  • Pipe Support Accepts input from stdin, enabling command chaining and scripting.

Use Cases

Continuous Integration

Integrate Kodezi directly into CI pipelines for automated code review, cleanup, or documentation tasks.

# GitHub Actions example
- name: Code Review
  run: |
    kodezi run "Review code changes and suggest improvements" \
      --yolo

This will automatically review code changes during the CI build process.

Shell Scripts

You can use Kodezi inside shell scripts to automate regular tasks.

# Daily code review script
cd /path/to/project
kodezi run -q "Check for code quality issues"

This script navigates to your project and runs a daily code quality check quietly.

Task Automation

Automate repetitive tasks, for example, updating all TypeScript files with JSDoc comments:

# Batch operations
for file in src/*.ts; do
  kodezi run "Add JSDoc comments to $file"
done

This loop processes every .ts file in the src folder automatically.