Commit ef9044c7 authored by Marc Cornellà's avatar Marc Cornellà
Browse files

Fix styling and format of hanami README

parent 7c62c57b
# Hanami Plugin # # Hanami Plugin #
This plugin adds convinient ways to work with [Hanami](http://hanamirb.org/) via console. It's inspired by Rails plugin, so if you've used it, you'll be like home. This plugin adds convenient ways to work with [Hanami](http://hanamirb.org/) via console.
It's inspired by Rails plugin, so if you've used it, you'll feel like home.
## Usage ## ## Usage ##
For example, type `hc` into your console when you're within Hanami project directory to run application console.
You can read about available commands [here](http://hanamirb.org/guides/command-line/applications/), almost all of them have shortcut aliases with this plugin. For example, type `hc` into your console when you're within Hanami project directory to run
the application console. Have a look at available shortcuts below. You can read more about
these commands [on the official website](http://hanamirb.org/guides/command-line/applications/).
## Aliases ## ## Aliases ##
| Alias | Description | Command | | Alias | Command | Description |
|-------|------------------------------------------|------------------------------------------------| |-------|---------------------------|---------------------------------------------------------|
| HED | Set environment variable HANAMI_ENV to development | HANAMI_ENV=development | | HED | HANAMI_ENV=development | Set environment variable HANAMI_ENV to development |
| HEP | Set environment variable HANAMI_ENV to production | HANAMI_ENV=production | | HEP | HANAMI_ENV=production | Set environment variable HANAMI_ENV to production |
| HET | Set environment variable HANAMI_ENV to test | HANAMI_ENV=test | | HET | HANAMI_ENV=test | Set environment variable HANAMI_ENV to test |
| hc | Run application console | hanami console | | hc | hanami console | Run application console |
| hd | Remove specified hanami resource (model, action, migration, etc.) | hanami destroy | | hd | hanami destroy | Remove specified hanami resource |
| hg | Create specified hanami resource (model, action, migration, etc.) | hanami generate | hanami generate | | hg | hanami generate | Create specified hanami resource |
| hgm | Create migration file | hanami generate migration | | hgm | hanami generate migration | Create migration file |
| hs | Launch server with hanami application | hanami server | | hs | hanami server | Launch server with hanami application |
| hsp | Launch server with specified port | hanami server -p | | hsp | hanami server -p | Launch server with specified port |
| hr | List application routes | hanami routes | | hr | hanami routes | List application routes |
| hdc | Create application database | hanami db create | | hdc | hanami db create | Create application database |
| hdd | Delete application database | hanami db drop | | hdd | hanami db drop | Delete application database |
| hdp | Create application database, load schema (if any), run pending migrations | hanami db prepare | | hdp | hanami db prepare | Prepare database for the current environment |
| hda | Run pending migrations, dump schema, delete all migration files | hanami db apply | | hda | hanami db apply | Recreates a fresh schema after migrations (destructive) |
| hdv | Print current database version (timestamp of last applied migration) | hanami db version | | hdv | hanami db version | Print current database version |
| hdrs | Drop and recreate application database | hdd && hdp | | hdrs | hdd && hdp | Drop and recreate application database |
| hdtp | Actualize test environment database | HET hdp | | hdtp | HET hdp | Actualize test environment database |
| hrg | Grep hanami routes with specified pattern | hr | grep | | hrg | hr | grep | Grep hanami routes with specified pattern |
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment