Prerequisites:
- Golang 1.16 or higher
The Landscaper CLI can be installed by cloning the landscaper-cli github repository and call the following commands in the root folder of the repo:
export GO111MODULE=on
# install binary
make install-cli
The executable landscaper-cli is added to your ...go/bin folder. Make sure that the ...go/bin path
is added to your $PATH
env var: export PATH=$PATH:$GOPATH/bin
Attention: Currently the installation via go get ...
does not work due to dependency problems.
If this problem is resolved also the installation with the following commands is possible:
export GO111MODULE=on
go get github.com/gardener/landscapercli/landscaper-cli
# or with a specific version
go get github.com/gardener/landscapercli/[email protected]
Depending on your shell, do the following:
source <(landscaper-cli completion bash)
# To load completions for each session, execute once:
# Linux:
landscaper-cli completion bash > /etc/bash_completion.d/landscaper-cli
# macOS:
landscaper-cli completion bash > /usr/local/etc/bash_completion.d/landscaper-cli
# you will need to enable it. You can execute the following once:
echo "autoload -U compinit; compinit" >> ~/.zshrc
# To load completions for each session, execute once or add to .zshrc:
landscaper-cli completion zsh > "${fpath[1]}/_landscaper-cli"
# You will need to start a new shell for this setup to take effect.
landscaper-cli completion fish | source
# To load completions for each session, execute once:
landscaper-cli completion fish > ~/.config/fish/completions/landscaper-cli.fish
PS> landscaper-cli completion powershell | Out-String | Invoke-Expression
# To load completions for every new session, run:
PS> landscaper-cli completion powershell > landscaper-cli.ps1
# and source this file from your PowerShell profile.