class AmberCLI::Documentation::DevelopmentTools

Overview

Development Tools

Amber CLI provides several tools to streamline development workflow.

Watch Mode

The watch command starts a development server that automatically rebuilds and restarts your application when files change.

Usage

amber watch [options]

Options

Examples

Basic watch mode:

amber watch

Custom build and run commands:

amber watch --build "crystal build src/my_app.cr --release" --run "./my_app"

Show current configuration:

amber watch --info

Code Execution

The exec command allows you to execute Crystal code within your application's context, similar to Rails console.

Usage

amber exec [CODE_OR_FILE] [options]

Options

Examples

Execute inline code:

amber exec 'puts "Hello from Amber!"'

Execute a Crystal file:

amber exec my_script.cr

Open editor for interactive session:

amber exec --editor nano

Defined in:

amber_cli/documentation.cr