3 This plugin adds convenient aliases to work with [Hanami](https://hanamirb.org/) via console.
4 It's inspired by Rails plugin, so if you've used it, you'll feel like home.
6 To use it, add `hanami` to the plugins array in your zshrc file:
14 For example, type `hc` into your console when you're within Hanami project directory to run
15 the application console. Have a look at available shortcuts below. You can read more about
16 these commands [on the official website](https://hanamirb.org/guides/command-line/applications/).
20 | Alias | Command | Description |
21 |-------|-----------------------------|---------------------------------------------------------|
22 | HED\* | `HANAMI_ENV=development` | Set environment variable HANAMI_ENV to development |
23 | HEP\* | `HANAMI_ENV=production` | Set environment variable HANAMI_ENV to production |
24 | HET\* | `HANAMI_ENV=test` | Set environment variable HANAMI_ENV to test |
25 | hc | `hanami console` | Run application console |
26 | hd | `hanami destroy` | Remove specified hanami resource |
27 | hg | `hanami generate` | Create specified hanami resource |
28 | hgm | `hanami generate migration` | Create migration file |
29 | hs | `hanami server` | Launch server with hanami application |
30 | hsp | `hanami server -p` | Launch server with specified port |
31 | hr | `hanami routes` | List application routes |
32 | hdc | `hanami db create` | Create application database |
33 | hdd | `hanami db drop` | Delete application database |
34 | hdp | `hanami db prepare` | Prepare database for the current environment |
35 | hda | `hanami db apply` | Recreates a fresh schema after migrations (destructive) |
36 | hdv | `hanami db version` | Print current database version |
37 | hdrs | `hdd && hdp` | Drop and recreate application database |
38 | hdtp | `HET hdp` | Actualize test environment database |
39 | hrg | `hr | grep` | Grep hanami routes with specified pattern |
41 \* You should use these at the beginning of a command, for example:
44 $ HED hdd # equivalent to 'HANAMI_ENV=development hanami db drop'