Skip to content

Commit

Permalink
wip
Browse files Browse the repository at this point in the history
  • Loading branch information
jdx committed Feb 10, 2024
1 parent ad8b535 commit 0781c40
Show file tree
Hide file tree
Showing 63 changed files with 980 additions and 416 deletions.
7 changes: 5 additions & 2 deletions .mise.toml
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,9 @@ depends = ['test', 'lint']
[tasks.render]
depends = ['render:*']

[tasks."render:example-md-inline"]
[tasks."render:example-md"]
depends = ['build']
run = "usage g md examples/docs/MISE_INLINE.md"
run = [
"usage g md examples/docs/MISE_INLINE.md",
"usage g md examples/docs/MISE_MULTI.md",
]
19 changes: 10 additions & 9 deletions examples/docs/MISE_MULTI.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,10 +18,10 @@ Usage: mise [OPTIONS] <COMMAND>
<!-- [USAGE] -->
## Global Flags
<!-- [USAGE] global_flags -->
- `-C,--cd <DIR>`: Change directory before running command
- `-q,--quiet`: Suppress non-error messages
- `-v,--verbose`: Show extra output (use -vv for even more)
- `-y,--yes`: Answer yes to all confirmation prompts
- `-C --cd <DIR>`: Change directory before running command
- `-q --quiet`: Suppress non-error messages
- `-v --verbose...`: Show extra output (use -vv for even more)
- `-y --yes`: Answer yes to all confirmation prompts
<!-- [USAGE] -->
## Config
<!-- [USAGE] config -->
Expand Down Expand Up @@ -102,11 +102,11 @@ foooooooo
* [`sync`](./cli-reference/sync.md)
* [`sync node`](./cli-reference/sync/node.md)
* [`sync python`](./cli-reference/sync/python.md)
* [`task`](./cli-reference/task.md)
* [`task deps`](./cli-reference/task/deps.md)
* [`task edit`](./cli-reference/task/edit.md)
* [`task ls`](./cli-reference/task/ls.md)
* [`task run`](./cli-reference/task/run.md)
* [`tasks`](./cli-reference/tasks.md)
* [`tasks deps`](./cli-reference/tasks/deps.md)
* [`tasks edit`](./cli-reference/tasks/edit.md)
* [`tasks ls`](./cli-reference/tasks/ls.md)
* [`tasks run`](./cli-reference/tasks/run.md)
* [`trust`](./cli-reference/trust.md)
* [`uninstall`](./cli-reference/uninstall.md)
* [`unset`](./cli-reference/unset.md)
Expand All @@ -117,5 +117,6 @@ foooooooo
* [`watch`](./cli-reference/watch.md)
* [`where`](./cli-reference/where.md)
* [`which`](./cli-reference/which.md)
* [`zzz`](./cli-reference/zzz.md)

<!-- [USAGE] -->
33 changes: 24 additions & 9 deletions examples/docs/cli-reference/activate.md
Original file line number Diff line number Diff line change
@@ -1,13 +1,5 @@
# `mise activate`
#### Args

* `[SHELL_TYPE]` – Shell type to generate the script for

#### Flags

* `-s,--shell <SHELL>` – Shell type to generate the script for
* `--status` – Show "mise: <PLUGIN>@<VERSION>" message when changing directories
* `-q,--quiet` – Suppress non-error messages
Initializes mise in the current shell session

This should go into your shell's rc file.
Expand All @@ -26,7 +18,30 @@ However, this requires that "mise" is in your PATH. If it is not, you need to
specify the full path like this:

echo 'eval "$(/path/to/mise activate)"' >> ~/.zshrc
Examples:

Customize status output with `status` settings.

###### Arg `[SHELL_TYPE]`

Shell type to generate the script for

##### Flag `-s --shell <SHELL>`

Shell type to generate the script for

##### Flag `--status`

Show "mise: <PLUGIN>@<VERSION>" message when changing directories

##### Flag `--shims`

Use shims instead of modifying PATH
Effectively the same as:
PATH="$HOME/.local/share/mise/shims:$PATH"

##### Flag `-q --quiet`

Suppress non-error messagesExamples:
$ eval "$(mise activate bash)"
$ eval "$(mise activate zsh)"
$ mise activate fish | source
Expand Down
21 changes: 17 additions & 4 deletions examples/docs/cli-reference/alias.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,21 @@
# `mise alias`
* Aliases: `a`

#### Flags
###### Aliases: `a`

* `-p,--plugin <PLUGIN>` – filter aliases by plugin
* `--no-header` – Don't show table header
Manage aliases
## Subcommands

* `get [args]` - Show an alias for a plugin
* `ls [args] [flags]` - List aliases
Shows the aliases that can be specified.
These can come from user config or from plugins in `bin/list-aliases`.
* `set [args]` - Add/update an alias for a plugin
* `unset [args]` - Clears an alias for a plugin

##### Flag `-p --plugin <PLUGIN>`

filter aliases by plugin

##### Flag `--no-header`

Don't show table header
13 changes: 8 additions & 5 deletions examples/docs/cli-reference/alias/get.md
Original file line number Diff line number Diff line change
@@ -1,12 +1,15 @@
# `mise alias get`
#### Args

* `<PLUGIN>` – The plugin to show the alias for
* `<ALIAS>` – The alias to show

Show an alias for a plugin

This is the contents of an alias.<PLUGIN> entry in ~/.config/mise/config.toml
Examples:

###### Arg `<PLUGIN>`

(required)The plugin to show the alias for

###### Arg `<ALIAS>`

(required)The alias to showExamples:
$ mise alias get node lts-hydrogen
20.0.0
16 changes: 9 additions & 7 deletions examples/docs/cli-reference/alias/ls.md
Original file line number Diff line number Diff line change
@@ -1,12 +1,7 @@
# `mise alias ls`
* Aliases: `list`
#### Args

* `[PLUGIN]` – Show aliases for <PLUGIN>
###### Aliases: `list`

#### Flags

* `--no-header` – Don't show table header
List aliases
Shows the aliases that can be specified.
These can come from user config or from plugins in `bin/list-aliases`.
Expand All @@ -15,6 +10,13 @@ For user config, aliases are defined like the following in `~/.config/mise/confi

[alias.node]
lts = "20.0.0"
Examples:

###### Arg `[PLUGIN]`

Show aliases for <PLUGIN>

##### Flag `--no-header`

Don't show table headerExamples:
$ mise aliases
node lts-hydrogen 20.0.0
19 changes: 13 additions & 6 deletions examples/docs/cli-reference/alias/set.md
Original file line number Diff line number Diff line change
@@ -1,13 +1,20 @@
# `mise alias set`
* Aliases: `add`, `create`
#### Args

* `<PLUGIN>` – The plugin to set the alias for
* `<ALIAS>` – The alias to set
* `<VALUE>` – The value to set the alias to
###### Aliases: `add`, `create`

Add/update an alias for a plugin

This modifies the contents of ~/.config/mise/config.toml
Examples:

###### Arg `<PLUGIN>`

(required)The plugin to set the alias for

###### Arg `<ALIAS>`

(required)The alias to set

###### Arg `<VALUE>`

(required)The value to set the alias toExamples:
$ mise alias set node lts-hydrogen 18.0.0
14 changes: 9 additions & 5 deletions examples/docs/cli-reference/alias/unset.md
Original file line number Diff line number Diff line change
@@ -1,12 +1,16 @@
# `mise alias unset`
* Aliases: `rm`, `remove`, `delete`, `del`
#### Args

* `<PLUGIN>` – The plugin to remove the alias from
* `<ALIAS>` – The alias to remove
###### Aliases: `rm`, `remove`, `delete`, `del`

Clears an alias for a plugin

This modifies the contents of ~/.config/mise/config.toml
Examples:

###### Arg `<PLUGIN>`

(required)The plugin to remove the alias from

###### Arg `<ALIAS>`

(required)The alias to removeExamples:
$ mise alias unset node lts-hydrogen
3 changes: 3 additions & 0 deletions examples/docs/cli-reference/cache.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,3 +3,6 @@
Manage the mise cache

Run `mise cache` with no args to view the current cache directory.
## Subcommands

* `clear [args]` - Deletes all cache files in mise
8 changes: 5 additions & 3 deletions examples/docs/cli-reference/cache/clear.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,9 @@
# `mise cache clear`
* Aliases: `c`
#### Args

* `[PLUGIN]...` – Plugin(s) to clear cache for e.g.: node, python
###### Aliases: `c`

Deletes all cache files in mise

###### Arg `[PLUGIN]...`

Plugin(s) to clear cache for e.g.: node, python
13 changes: 7 additions & 6 deletions examples/docs/cli-reference/completion.md
Original file line number Diff line number Diff line change
@@ -1,13 +1,14 @@
# `mise completion`
#### Args

* `[SHELL]` – Shell type to generate completions for
Generate shell completions

#### Flags
###### Arg `[SHELL]`

* `-s,--shell <SHELL_TYPE>` – Shell type to generate completions for
Generate shell completions
Examples:
Shell type to generate completions for

##### Flag `-s --shell <SHELL_TYPE>`

Shell type to generate completions forExamples:
$ mise completion bash > /etc/bash_completion.d/mise
$ mise completion zsh > /usr/local/share/zsh/site-functions/_mise
$ mise completion fish > ~/.config/fish/completions/mise.fish
12 changes: 9 additions & 3 deletions examples/docs/cli-reference/config.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,13 @@
# `mise config`
* Aliases: `cfg`

#### Flags
###### Aliases: `cfg`

* `--no-header` – Do not print table header
[experimental] Manage config files
## Subcommands

* `generate [flags]` - [experimental] Generate an .mise.toml file
* `ls [flags]` - [experimental] List config files currently in use

##### Flag `--no-header`

Do not print table header
9 changes: 5 additions & 4 deletions examples/docs/cli-reference/config/generate.md
Original file line number Diff line number Diff line change
@@ -1,10 +1,11 @@
# `mise config generate`
* Aliases: `g`

#### Flags
###### Aliases: `g`

* `-o,--output <OUTPUT>` – Output to file instead of stdout
[experimental] Generate an .mise.toml file
Examples:

##### Flag `-o --output <OUTPUT>`

Output to file instead of stdoutExamples:
$ mise cf generate > .mise.toml
$ mise cf generate --output=.mise.toml
8 changes: 4 additions & 4 deletions examples/docs/cli-reference/config/ls.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
# `mise config ls`

#### Flags

* `--no-header` – Do not print table header
[experimental] List config files currently in use
Examples:

##### Flag `--no-header`

Do not print table headerExamples:
$ mise config ls
8 changes: 4 additions & 4 deletions examples/docs/cli-reference/current.md
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
# `mise current`
#### Args

* `[PLUGIN]` – Plugin to show versions of e.g.: ruby, node, cargo:eza, npm:prettier, etc

Shows current active and installed runtime versions

This is similar to `mise ls --current`, but this only shows the runtime
and/or version. It's designed to fit into scripts more easily.
Examples:

###### Arg `[PLUGIN]`

Plugin to show versions of e.g.: ruby, node, cargo:eza, npm:prettier, etcExamples:
# outputs `.tool-versions` compatible format
$ mise current
python 3.11.0 3.10.0
Expand Down
3 changes: 1 addition & 2 deletions examples/docs/cli-reference/deactivate.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,7 @@

Disable mise for current shell session

This can be used to temporarily disable mise in a shell session.
Examples:
This can be used to temporarily disable mise in a shell session.Examples:
$ mise deactivate bash
$ mise deactivate zsh
$ mise deactivate fish
Expand Down
7 changes: 7 additions & 0 deletions examples/docs/cli-reference/direnv.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,3 +7,10 @@ See https://mise.rtx.dev/direnv.html for more information
Because this generates the legacy files based on currently installed plugins,
you should run this command after installing new plugins. Otherwise
direnv may not know to update environment variables when legacy file versions change.
## Subcommands

* `activate` - Output direnv function to use mise inside direnv
* `envrc` - [internal] This is an internal command that writes an envrc file
for direnv to consume.
* `exec` - [internal] This is an internal command that writes an envrc file
for direnv to consume.
3 changes: 1 addition & 2 deletions examples/docs/cli-reference/direnv/activate.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,7 @@ See https://mise.jdx.dev/direnv.html for more information

Because this generates the legacy files based on currently installed plugins,
you should run this command after installing new plugins. Otherwise
direnv may not know to update environment variables when legacy file versions change.
Examples:
direnv may not know to update environment variables when legacy file versions change.Examples:
$ mise direnv activate > ~/.config/direnv/lib/use_mise.sh
$ echo 'use mise' > .envrc
$ direnv allow
5 changes: 3 additions & 2 deletions examples/docs/cli-reference/doctor.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
# `mise doctor`

Check mise installation for possible problems.
Examples:
###### Aliases: `dr`

Check mise installation for possible problemsExamples:
$ mise doctor
[WARN] plugin node is not installed
21 changes: 13 additions & 8 deletions examples/docs/cli-reference/env.md
Original file line number Diff line number Diff line change
@@ -1,18 +1,23 @@
# `mise env`
* Aliases: `e`
#### Args

* `[TOOL@VERSION]...` – Tool(s) to use
###### Aliases: `e`

#### Flags

* `-s,--shell <SHELL>` – Shell type to generate environment variables for
* `-J,--json` – Output in JSON format
Exports env vars to activate mise a single time

Use this if you don't want to permanently install mise. It's not necessary to
use this if you have `mise activate` in your shell rc file.
Examples:

###### Arg `[TOOL@VERSION]...`

Tool(s) to use

##### Flag `-J --json`

Output in JSON format

##### Flag `-s --shell <SHELL>`

Shell type to generate environment variables forExamples:
$ eval "$(mise env -s bash)"
$ eval "$(mise env -s zsh)"
$ mise env -s fish | source
Expand Down
Loading

0 comments on commit 0781c40

Please sign in to comment.