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 (ecronly in V2)--type=TYPE- Application type (websupported,nativepreview)-y, --assume-yes- Skip interactive prompts--no-deps- Don't install dependencies
Examples
Create a basic application:
amber new my_blog
Record a database choice for future persistence tooling:
amber new my_api -d mysql -t ecr
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
The web template pins Amber 2.0.0-beta.2, uses ECR, and intentionally
does not add an ORM or database driver. Model, scaffold, API-resource,
authentication, and native generators are preview surfaces during the beta.