my xfce4 dotfiles
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

45 lines
2.6 KiB

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