Skip to content

Commit

Permalink
Add installation docs
Browse files Browse the repository at this point in the history
Signed-off-by: Stefan Prodan <[email protected]>
  • Loading branch information
stefanprodan committed Feb 18, 2023
1 parent eb40901 commit 257f976
Show file tree
Hide file tree
Showing 4 changed files with 124 additions and 2 deletions.
14 changes: 14 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,20 @@ to offer a better experience of creating, packaging and delivering apps to Kuber
> Note that Timoni in under active development and is still in its infancy.
> Its APIs and interfaces may change in a backwards incompatible manner.
## Install

Timoni is available as a binary executable for all major platforms,
the binaries can be downloaded from GitHub [releases](https://github.com/stefanprodan/kustomizer/releases).

Install the latest release on macOS or Linux with Homebrew:

```bash
brew install stefanprodan/tap/timoni
```

For other installation methods,
see [timoni.sh/install](https://timoni.sh/install/).

## Concepts

### Timoni Modules
Expand Down
2 changes: 1 addition & 1 deletion cmd/timoni/completion_fish.go
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ var completionFishCmd = &cobra.Command{
Short: "Generates fish completion scripts",
Example: `To configure your fish shell to load completions for each session write this script to your completions dir:
kustomizer completion fish > ~/.config/fish/completions/timoni.fish
timoni completion fish > ~/.config/fish/completions/timoni.fish
See http://fishshell.com/docs/current/index.html#completion-own for more details`,
Run: func(cmd *cobra.Command, args []string) {
Expand Down
106 changes: 106 additions & 0 deletions docs/install.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,106 @@
# Install

Timoni is available as a binary executable for Linux, macOS and Windows.
The binaries can be downloaded from GitHub [releases](https://github.com/stefanprodan/timoni/releases).

=== "Install with brew"

Install the latest release on macOS or Linux with:

```shell
brew install stefanprodan/tap/timoni
```

Note that the Homebrew formula will setup shell autocompletion for Bash, Fish and Zsh.

=== "Install from source"

Using Go >= 1.17:

```shell
go install github.com/stefanprodan/timoni/cmd/timoni@latest
```

## Shell autocompletion

Configure your shell to load timoni completions:

=== "Bash"

To load completion run:

```shell
. <(timoni completion bash)
```

To configure your bash shell to load completions for each session add to your bashrc:

```shell
# ~/.bashrc or ~/.bash_profile
command -v timoni >/dev/null && . <(timoni completion bash)
```

If you have an alias for timoni, you can extend shell completion to work with that alias:

```shell
# ~/.bashrc or ~/.bash_profile
alias tm=timoni
complete -F __start_timoni tm
```

=== "Fish"

To configure your fish shell to [load completions](http://fishshell.com/docs/current/index.html#completion-own)
for each session write this script to your completions dir:

```shell
timoni completion fish > ~/.config/fish/completions/timoni.fish
```

=== "Powershell"

To load completion run:

```shell
. <(timoni completion powershell)
```

To configure your powershell shell to load completions for each session add to your powershell profile:

Windows:

```shell
cd "$env:USERPROFILE\Documents\WindowsPowerShell\Modules"
timoni completion >> timoni-completion.ps1
```
Linux:

```shell
cd "${XDG_CONFIG_HOME:-"$HOME/.config/"}/powershell/modules"
timoni completion >> timoni-completions.ps1
```

=== "Zsh"

To load completion run:

```shell
. <(timoni completion zsh) && compdef _timoni timoni
```

To configure your zsh shell to load completions for each session add to your zshrc:

```shell
# ~/.zshrc or ~/.profile
command -v timoni >/dev/null && . <(timoni completion zsh) && compdef _timoni timoni
```

or write a cached file in one of the completion directories in your ${fpath}:

```shell
echo "${fpath// /\n}" | grep -i completion
timoni completion zsh > _timoni

mv _timoni ~/.oh-my-zsh/completions # oh-my-zsh
mv _timoni ~/.zprezto/modules/completion/external/src/ # zprezto
```
4 changes: 3 additions & 1 deletion mkdocs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@ markdown_extensions:

nav:
- Introduction: index.md
- Install: install.md
- Command Reference:
- Modules:
- Build: cmd/timoni_build.md
Expand All @@ -48,8 +49,9 @@ nav:
- Apply: cmd/timoni_apply.md
- Delete: cmd/timoni_delete.md
- List: cmd/timoni_list.md
- Inspect Resources: cmd/timoni_inspect_resources.md
- Inspect Module: cmd/timoni_inspect_module.md
- Inspect Values: cmd/timoni_inspect_values.md
- Inspect Resources: cmd/timoni_inspect_resources.md
- Completion:
- Bash: cmd/timoni_completion_bash.md
- Fish: cmd/timoni_completion_fish.md
Expand Down

0 comments on commit 257f976

Please sign in to comment.