Documentation ¶
Overview ¶
Package bootstrap handles initial installation for Thelma. It will: * Create skeleton config.yaml with `home` set to THELMA_HOME * Prompt the user for options:
- Prepend PATH with thelma’s bundled tools (this includes kubectl, helm, helmfile, vault client, and more)? Y/n
- Enable shell completion for Thelma commands? Y/n
* Generate ~/.thelma/shell/completion.zsh
- This is trivial thanks to Cobra’s neat shell completion feature!
* Generate ~/.thelma/shell/thelma.zsh, which
- Includes a “Warning: auto-generated by Thelma’s bootstrap process; do not manually edit this file!” comment
- Adds ~/.thelma/releases/current/bin to PATH
- Adds ~/.thelma/releases/current/tools/bin to PATH (if user answered “yes”)
- Enables shell completion (if user answered “yes”)
- source ~/.thelma/shell/completion.zsh && compdef _thelma thelma
* Add the following line to ~/.zshrc if it does not exist:
- [ -f ~/.thelma/shell/thelma.zsh ] && source .thelma/shell/thelma.zsh
- .zshrc will backed up to ~/.zshrc.bak before writing changes
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Bootstrapper ¶
type Bootstrapper interface { // Bootstrap will bootstrap a thelma installation, including: // * creating skeleton config.yaml with `home` set to THELMA_HOME // * generating shell scripts that: // * add `thelma` to path // * optionally add thelma's bundled tools to PATH // * optionally set up shell completion for thelma // * updating user's ~/.zshrc to source thelma's shell init script Bootstrap() error }
Click to show internal directories.
Click to hide internal directories.