class
AmberCLI::Documentation::NewCommand
- AmberCLI::Documentation::NewCommand
- Reference
- Object
Overview
Creating New Applications
The new command creates a new Amber V2 application with a complete directory
structure and configuration files.
Usage
amber new [NAME] [options]
Options
-d, --database=DATABASE- Database engine (pg, mysql, sqlite)-t, --template=TEMPLATE- Template engine (ecr, slang)-y, --assume-yes- Skip interactive prompts--no-deps- Don't install dependencies
Examples
Create a basic application:
amber new my_blog
Create with specific database and template:
amber new my_api -d mysql -t slang
Create in current directory:
amber new . -d sqlite
Generated Structure
The new command creates:
- src/ - Application source code (controllers, models, schemas, jobs, mailers, channels)
- config/ - Configuration files (application.cr, routes.cr, environments/)
- db/ - Database migrations and seeds
- spec/ - Test files for all component types
- public/ - Static assets (css, js, img)
- shard.yml - Dependency configuration
- .amber.yml - Project configuration
- .gitignore - Git ignore rules