Vania CLI
The command line for Vania: create a project, run it while you code, generate the boilerplate, migrate the database, and ship a binary.
vania_cli is the tool you'll live in day to day. It scaffolds a new app from the official starter, runs a dev server that reloads as you edit, generates controllers/models/migrations/and more so you don't hand-write boilerplate, and compiles your app to a single native executable for deployment.
Install
dart pub global activate vania_cli
That adds the vania command globally. If your shell can't find it, add Dart's global bin (usually ~/.pub-cache/bin) to your PATH.
Start a project
vania create my_app
cd my_app
vania serve
create clones the starter template, renames it, generates an APP_KEY, and installs dependencies. serve boots the app on http://localhost:8000 and hot-reloads on file changes.
Commands
Project
| Command | What it does |
|---|---|
vania create <name> |
Scaffold a new project |
vania serve |
Dev server with hot reload (--host, --port, --no-reload) |
vania down |
Stop the running dev server |
vania build |
Compile to a native executable |
vania update |
Update the CLI |
vania key:generate |
Generate and write a new APP_KEY |
vania route:list |
Print every registered route |
Generators
| Command | What it makes |
|---|---|
vania make:controller <name> |
A resource controller |
vania make:model <name> |
A model |
vania make:middleware <name> |
A middleware |
vania make:migration <name> |
A migration |
vania make:seeder <name> |
A seeder |
vania make:provider <name> |
A service provider |
vania make:mail <name> |
A mailable |
vania make:auth |
The personal access tokens migration |
Database
| Command | What it does |
|---|---|
vania migrate |
Run pending migrations |
vania migrate:fresh |
Drop everything and re-run migrations |
vania migrate:seed |
Run seeders |
Ship it
vania build
You get a self-contained binary at bin/server that runs without the Dart SDK on the target machine. Deploy it alongside your .env, public/, and storage/ folders.
Links
- Documentation: vdart.dev/docs
- Source & issues: github.com/vania-dart/framework
License
MIT
Libraries
- commands/auth_command
- commands/build_command
- commands/command
- commands/command_runner
- commands/create_alter_table_migration_command
- commands/create_controller_command
- commands/create_database_seeder_command
- commands/create_mail_command
- commands/create_middleware_command
- commands/create_migration_command
- commands/create_model_command
- commands/create_service_provider_command
- commands/key_generate_command
- commands/migrate_command
- commands/migrate_database_seeder_command
- commands/migrate_fresh_command
- commands/new_project
- commands/route_list_command
- commands/serve_command
- commands/serve_down_command
- commands/stub_command
- commands/terminate_port_command
- commands/update_command
- common/console
- common/constants
- common/env
- common/recase
- common/stubs
- service/hot_reload_service
- service/service
- utils/_pluralize
- utils/functions
- utils/process_runner
- vania_cli
- Command-line tooling for Vania applications.