-
Notifications
You must be signed in to change notification settings - Fork 295
/
mise.usage.kdl
1646 lines (1422 loc) · 65.4 KB
/
mise.usage.kdl
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
min_usage_version "1.3"
name "mise"
bin "mise"
about "The front-end to your dev env"
long_about r"mise is a tool for managing runtime versions. https://github.com/jdx/mise
It's a replacement for tools like nvm, nodenv, rbenv, rvm, chruby, pyenv, etc.
that works for any language. It's also great for managing linters/tools like
jq and shellcheck.
It is inspired by asdf and uses asdf's plugin ecosystem under the hood:
https://asdf-vm.com/"
usage "Usage: mise [OPTIONS] <COMMAND>"
flag "-C --cd" help="Change directory before running command" global=true {
arg "<DIR>"
}
flag "--debug" help="Sets log level to debug" hide=true global=true
flag "--log-level" help="Set the log output verbosity" hide=true global=true {
arg "<LEVEL>" {
choices "error" "warn" "info" "debug" "trace"
}
}
flag "-P --profile" help="Set the profile (environment)" global=true {
arg "<PROFILE>"
}
flag "-q --quiet" help="Suppress non-error messages" global=true
flag "--trace" help="Sets log level to trace" hide=true global=true
flag "-v --verbose" help="Show extra output (use -vv for even more)" var=true global=true count=true
flag "-y --yes" help="Answer yes to all confirmation prompts" global=true
cmd "activate" help="Initializes mise in the current shell session" {
long_help r#"Initializes mise in the current shell session
This should go into your shell's rc file.
Otherwise, it will only take effect in the current session.
(e.g. ~/.zshrc, ~/.bashrc)
This is only intended to be used in interactive sessions, not scripts.
mise is only capable of updating PATH when the prompt is displayed to the user.
For non-interactive use-cases, use shims instead.
Typically this can be added with something like the following:
echo 'eval "$(mise activate)"' >> ~/.zshrc
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
Customize status output with `status` settings."#
after_long_help r#"Examples:
$ eval "$(mise activate bash)"
$ eval "$(mise activate zsh)"
$ mise activate fish | source
$ execx($(mise activate xonsh))
"#
flag "-s --shell" help="Shell type to generate the script for" hide=true {
arg "<SHELL>" {
choices "bash" "elvish" "fish" "nu" "xonsh" "zsh"
}
}
flag "--status" help="Show \"mise: <PLUGIN>@<VERSION>\" message when changing directories" hide=true
flag "--shims" help="Use shims instead of modifying PATH\nEffectively the same as:" {
long_help "Use shims instead of modifying PATH\nEffectively the same as:\n\n PATH=\"$HOME/.local/share/mise/shims:$PATH\""
}
flag "-q --quiet" help="Suppress non-error messages"
arg "[SHELL_TYPE]" help="Shell type to generate the script for" {
choices "bash" "elvish" "fish" "nu" "xonsh" "zsh"
}
}
cmd "alias" help="Manage aliases" {
alias "a"
alias "aliases" hide=true
flag "-p --plugin" help="filter aliases by plugin" {
arg "<PLUGIN>"
}
flag "--no-header" help="Don't show table header"
cmd "get" help="Show an alias for a plugin" {
long_help r"Show an alias for a plugin
This is the contents of an alias.<PLUGIN> entry in ~/.config/mise/config.toml"
after_long_help r"Examples:
$ mise alias get node lts-hydrogen
20.0.0
"
arg "<PLUGIN>" help="The plugin to show the alias for"
arg "<ALIAS>" help="The alias to show"
}
cmd "ls" help="List aliases\nShows the aliases that can be specified.\nThese can come from user config or from plugins in `bin/list-aliases`." {
alias "list"
long_help r#"List aliases
Shows the aliases that can be specified.
These can come from user config or from plugins in `bin/list-aliases`.
For user config, aliases are defined like the following in `~/.config/mise/config.toml`:
[alias.node.versions]
lts = "22.0.0""#
after_long_help r"Examples:
$ mise aliases
node lts-jod 22
"
flag "--no-header" help="Don't show table header"
arg "[TOOL]" help="Show aliases for <TOOL>"
}
cmd "set" help="Add/update an alias for a plugin" {
alias "add" "create"
long_help r"Add/update an alias for a plugin
This modifies the contents of ~/.config/mise/config.toml"
after_long_help r"Examples:
$ mise alias set node lts-jod 22.0.0
"
arg "<PLUGIN>" help="The plugin to set the alias for"
arg "<ALIAS>" help="The alias to set"
arg "<VALUE>" help="The value to set the alias to"
}
cmd "unset" help="Clears an alias for a plugin" {
alias "rm" "remove" "delete" "del"
long_help r"Clears an alias for a plugin
This modifies the contents of ~/.config/mise/config.toml"
after_long_help r"Examples:
$ mise alias unset node lts-jod
"
arg "<PLUGIN>" help="The plugin to remove the alias from"
arg "<ALIAS>" help="The alias to remove"
}
}
cmd "asdf" hide=true help="[internal] simulates asdf for plugins that call \"asdf\" internally" {
arg "[ARGS]..." help="all arguments" var=true
}
cmd "backends" help="Manage backends" {
alias "b"
alias "backend" "backend-list" hide=true
cmd "ls" help="List built-in backends" {
alias "list"
after_long_help r"Examples:
$ mise backends ls
cargo
go
npm
pipx
spm
ubi
"
}
}
cmd "bin-paths" help="List all the active runtime bin paths"
cmd "cache" help="Manage the mise cache" {
long_help r"Manage the mise cache
Run `mise cache` with no args to view the current cache directory."
cmd "clear" help="Deletes all cache files in mise" {
alias "c"
alias "clean" hide=true
flag "--outdate" help="Mark all cache files as old" hide=true
arg "[PLUGIN]..." help="Plugin(s) to clear cache for e.g.: node, python" var=true
}
cmd "prune" help="Removes stale mise cache files" {
alias "p"
long_help r"Removes stale mise cache files
By default, this command will remove files that have not been accessed in 30 days.
Change this with the MISE_CACHE_PRUNE_AGE environment variable."
flag "--dry-run" help="Just show what would be pruned"
flag "-v --verbose" help="Show pruned files" var=true count=true
arg "[PLUGIN]..." help="Plugin(s) to clear cache for e.g.: node, python" var=true
}
}
cmd "completion" help="Generate shell completions" {
alias "complete" "completions" hide=true
after_long_help r"Examples:
$ 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
"
flag "-s --shell" help="Shell type to generate completions for" hide=true {
arg "<SHELL_TYPE>" {
choices "bash" "fish" "zsh"
}
}
flag "--usage" help="Always use usage for completions.\nCurrently, usage is the default for fish and bash but not zsh since it has a few quirks\nto work out first." hide=true {
long_help "Always use usage for completions.\nCurrently, usage is the default for fish and bash but not zsh since it has a few quirks\nto work out first.\n\nThis requires the `usage` CLI to be installed.\nhttps://usage.jdx.dev"
}
arg "[SHELL]" help="Shell type to generate completions for" {
choices "bash" "fish" "zsh"
}
}
cmd "config" help="Manage config files" {
alias "cfg"
alias "toml" hide=true
flag "--no-header" help="Do not print table header"
flag "-J --json" help="Output in JSON format"
cmd "generate" help="[experimental] Generate a mise.toml file" {
alias "g"
after_long_help r"Examples:
$ mise cf generate > mise.toml
$ mise cf generate --output=mise.toml
"
flag "-o --output" help="Output to file instead of stdout" {
arg "<OUTPUT>"
}
}
cmd "get" help="Display the value of a setting in a mise.toml file" {
after_long_help r"Examples:
$ mise toml get tools.python
3.12
"
flag "-f --file" help="The path to the mise.toml file to edit" {
long_help "The path to the mise.toml file to edit\n\nIf not provided, the nearest mise.toml file will be used"
arg "<FILE>"
}
arg "[KEY]" help="The path of the config to display"
}
cmd "ls" help="List config files currently in use" {
after_long_help r"Examples:
$ mise config ls
"
flag "--no-header" help="Do not print table header"
flag "-J --json" help="Output in JSON format"
}
cmd "set" help="Set the value of a setting in a mise.toml file" {
after_long_help r"Examples:
$ mise config set tools.python 3.12
$ mise config set settings.always_keep_download true
$ mise config set env.TEST_ENV_VAR ABC
$ mise config set settings.disable_tools --type list node,rust
# Type for `settings` is inferred
$ mise config set settings.jobs 4
"
flag "-f --file" help="The path to the mise.toml file to edit" {
long_help "The path to the mise.toml file to edit\n\nIf not provided, the nearest mise.toml file will be used"
arg "<FILE>"
}
flag "-t --type" {
arg "<TYPE>" {
choices "infer" "string" "integer" "float" "bool" "list"
}
}
arg "<KEY>" help="The path of the config to display"
arg "<VALUE>" help="The value to set the key to"
}
}
cmd "current" hide=true help="Shows current active and installed runtime versions" {
long_help r"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."
after_long_help r"Examples:
# outputs `.tool-versions` compatible format
$ mise current
python 3.11.0 3.10.0
shfmt 3.6.0
shellcheck 0.9.0
node 20.0.0
$ mise current node
20.0.0
# can output multiple versions
$ mise current python
3.11.0 3.10.0
"
arg "[PLUGIN]" help="Plugin to show versions of e.g.: ruby, node, cargo:eza, npm:prettier, etc"
}
cmd "deactivate" help="Disable mise for current shell session" {
long_help r"Disable mise for current shell session
This can be used to temporarily disable mise in a shell session."
after_long_help r"Examples:
$ mise deactivate
"
}
cmd "direnv" help="Output direnv function to use mise inside direnv" {
long_help r"Output direnv function to use mise inside direnv
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."
cmd "envrc" hide=true help="[internal] This is an internal command that writes an envrc file\nfor direnv to consume."
cmd "exec" hide=true help="[internal] This is an internal command that writes an envrc file\nfor direnv to consume."
cmd "activate" help="Output direnv function to use mise inside direnv" {
long_help r"Output direnv function to use mise inside direnv
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."
after_long_help r"Examples:
$ mise direnv activate > ~/.config/direnv/lib/use_mise.sh
$ echo 'use mise' > .envrc
$ direnv allow
"
}
}
cmd "doctor" help="Check mise installation for possible problems" {
alias "dr"
after_long_help r"Examples:
$ mise doctor
[WARN] plugin node is not installed
"
}
cmd "env" help="Exports env vars to activate mise a single time" {
alias "e"
long_help r"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."
after_long_help r#"Examples:
$ eval "$(mise env -s bash)"
$ eval "$(mise env -s zsh)"
$ mise env -s fish | source
$ execx($(mise env -s xonsh))
"#
flag "-J --json" help="Output in JSON format"
flag "-D --dotenv" help="Output in dotenv format"
flag "-s --shell" help="Shell type to generate environment variables for" {
arg "<SHELL>" {
choices "bash" "elvish" "fish" "nu" "xonsh" "zsh"
}
}
arg "[TOOL@VERSION]..." help="Tool(s) to use" var=true
}
cmd "exec" help="Execute a command with tool(s) set" {
alias "x"
long_help r#"Execute a command with tool(s) set
use this to avoid modifying the shell session or running ad-hoc commands with mise tools set.
Tools will be loaded from mise.toml, though they can be overridden with <RUNTIME> args
Note that only the plugin specified will be overridden, so if a `mise.toml` file
includes "node 20" but you run `mise exec [email protected]`; it will still load node@20.
The "--" separates runtimes from the commands to pass along to the subprocess."#
after_long_help r#"Examples:
$ mise exec node@20 -- node ./app.js # launch app.js using node-20.x
$ mise x node@20 -- node ./app.js # shorter alias
# Specify command as a string:
$ mise exec node@20 [email protected] --command "node -v && python -V"
# Run a command in a different directory:
$ mise x -C /path/to/project node@20 -- node ./app.js
"#
flag "-c --command" help="Command string to execute" {
arg "<C>"
}
flag "-j --jobs" help="Number of jobs to run in parallel\n[default: 4]" {
arg "<JOBS>"
}
flag "--raw" help="Directly pipe stdin/stdout/stderr from plugin to user Sets --jobs=1"
arg "[TOOL@VERSION]..." help="Tool(s) to start e.g.: node@20 [email protected]" var=true
arg "[COMMAND]..." help="Command string to execute (same as --command)" var=true
}
cmd "generate" subcommand_required=true help="[experimental] Generate files for various tools/services" {
alias "gen"
alias "g" hide=true
cmd "git-pre-commit" help="[experimental] Generate a git pre-commit hook" {
alias "pre-commit"
long_help r"[experimental] Generate a git pre-commit hook
This command generates a git pre-commit hook that runs a mise task like `mise run pre-commit`
when you commit changes to your repository."
after_long_help r#"Examples:
$ mise generate git-pre-commit --write --task=pre-commit
$ git commit -m "feat: add new feature" # runs `mise run pre-commit`
"#
flag "--hook" help="Which hook to generate (saves to .git/hooks/$hook)" {
arg "<HOOK>"
}
flag "-t --task" help="The task to run when the pre-commit hook is triggered" {
arg "<TASK>"
}
flag "-w --write" help="write to .git/hooks/pre-commit and make it executable"
}
cmd "github-action" help="[experimental] Generate a GitHub Action workflow file" {
long_help r"[experimental] Generate a GitHub Action workflow file
This command generates a GitHub Action workflow file that runs a mise task like `mise run ci`
when you push changes to your repository."
after_long_help r#"Examples:
$ mise generate github-action --write --task=ci
$ git commit -m "feat: add new feature"
$ git push # runs `mise run ci` on GitHub
"#
flag "-n --name" help="the name of the workflow to generate" {
arg "<NAME>"
}
flag "-t --task" help="The task to run when the workflow is triggered" {
arg "<TASK>"
}
flag "-w --write" help="write to .github/workflows/$name.yml"
}
cmd "task-docs" help="Generate documentation for tasks in a project" {
after_long_help r"Examples:
$ mise generate task-docs
"
flag "-I --index" help="write only an index of tasks, intended for use with `--multi`"
flag "-i --inject" help="inserts the documentation into an existing file" {
long_help "inserts the documentation into an existing file\n\nThis will look for a special comment, <!-- mise-tasks -->, and replace it with the generated documentation.\nIt will replace everything between the comment and the next comment, <!-- /mise-tasks --> so it can be\nrun multiple times on the same file to update the documentation."
}
flag "-m --multi" help="render each task as a separate document, requires `--output` to be a directory"
flag "-o --output" help="writes the generated docs to a file/directory" {
arg "<OUTPUT>"
}
flag "-r --root" help="root directory to search for tasks" {
arg "<ROOT>"
}
flag "-s --style" {
arg "<STYLE>" {
choices "simple" "detailed"
}
}
}
}
cmd "global" hide=true help="Sets/gets the global tool version(s)" {
long_help r"Sets/gets the global tool version(s)
Displays the contents of global config after writing.
The file is `$HOME/.config/mise/config.toml` by default. It can be changed with `$MISE_GLOBAL_CONFIG_FILE`.
If `$MISE_GLOBAL_CONFIG_FILE` is set to anything that ends in `.toml`, it will be parsed as `mise.toml`.
Otherwise, it will be parsed as a `.tool-versions` file.
Use MISE_ASDF_COMPAT=1 to default the global config to ~/.tool-versions
Use `mise local` to set a tool version locally in the current directory."
after_long_help r"Examples:
# set the current version of node to 20.x
# will use a fuzzy version (e.g.: 20) in .tool-versions file
$ mise global --fuzzy node@20
# set the current version of node to 20.x
# will use a precise version (e.g.: 20.0.0) in .tool-versions file
$ mise global --pin node@20
# show the current version of node in ~/.tool-versions
$ mise global node
20.0.0
"
flag "--pin" help="Save exact version to `~/.tool-versions`\ne.g.: `mise global --pin node@20` will save `node 20.0.0` to ~/.tool-versions"
flag "--fuzzy" help="Save fuzzy version to `~/.tool-versions`\ne.g.: `mise global --fuzzy node@20` will save `node 20` to ~/.tool-versions\nthis is the default behavior unless MISE_ASDF_COMPAT=1"
flag "--remove" help="Remove the plugin(s) from ~/.tool-versions" var=true {
arg "<PLUGIN>"
}
flag "--path" help="Get the path of the global config file"
arg "[TOOL@VERSION]..." help="Tool(s) to add to .tool-versions\ne.g.: node@20\nIf this is a single tool with no version, the current value of the global\n.tool-versions will be displayed" var=true
}
cmd "hook-env" hide=true help="[internal] called by activate hook to update env vars directory change" {
flag "-s --shell" help="Shell type to generate script for" {
arg "<SHELL>" {
choices "bash" "elvish" "fish" "nu" "xonsh" "zsh"
}
}
flag "--status" help="Show \"mise: <PLUGIN>@<VERSION>\" message when changing directories" hide=true
flag "-q --quiet" help="Hide warnings such as when a tool is not installed"
}
cmd "hook-not-found" hide=true help="[internal] called by shell when a command is not found" {
flag "-s --shell" help="Shell type to generate script for" {
arg "<SHELL>" {
choices "bash" "elvish" "fish" "nu" "xonsh" "zsh"
}
}
arg "<BIN>" help="Attempted bin to run"
}
cmd "implode" help="Removes mise CLI and all related data" {
long_help r"Removes mise CLI and all related data
Skips config directory by default."
flag "--config" help="Also remove config directory"
flag "-n --dry-run" help="List directories that would be removed without actually removing them"
}
cmd "install" help="Install a tool version" {
alias "i"
long_help r"Install a tool version
Installs a tool version to `~/.local/share/mise/installs/<PLUGIN>/<VERSION>`
Installing alone will not activate the tools so they won't be in PATH.
To install and/or activate in one command, use `mise use` which will create a `mise.toml` file
in the current directory to activate this tool when inside the directory.
Alternatively, run `mise exec <TOOL>@<VERSION> -- <COMMAND>` to execute a tool without creating config files.
Tools will be installed in parallel. To disable, set `--jobs=1` or `MISE_JOBS=1`"
after_long_help r"Examples:
$ mise install [email protected] # install specific node version
$ mise install node@20 # install fuzzy node version
$ mise install node # install version specified in mise.toml
$ mise install # installs everything specified in mise.toml
"
flag "-f --force" help="Force reinstall even if already installed"
flag "-j --jobs" help="Number of jobs to run in parallel\n[default: 4]" {
arg "<JOBS>"
}
flag "--raw" help="Directly pipe stdin/stdout/stderr from plugin to user Sets --jobs=1"
flag "-v --verbose" help="Show installation output" var=true count=true {
long_help "Show installation output\n\nThis argument will print plugin output such as download, configuration, and compilation output."
}
arg "[TOOL@VERSION]..." help="Tool(s) to install e.g.: node@20" var=true
}
cmd "latest" help="Gets the latest available version for a plugin" {
long_help r"Gets the latest available version for a plugin
Supports prefixes such as `node@20` to get the latest version of node 20."
after_long_help r"Examples:
$ mise latest node@20 # get the latest version of node 20
20.0.0
$ mise latest node # get the latest stable version of node
20.0.0
"
flag "-i --installed" help="Show latest installed instead of available version"
arg "<TOOL@VERSION>" help="Tool to get the latest version of"
arg "[ASDF_VERSION]" help="The version prefix to use when querying the latest version same as the first argument after the \"@\" used for asdf compatibility" hide=true
}
cmd "link" help="Symlinks a tool version into mise" {
alias "ln"
long_help r"Symlinks a tool version into mise
Use this for adding installs either custom compiled outside mise or built with a different tool."
after_long_help r"Examples:
# build node-20.0.0 with node-build and link it into mise
$ node-build 20.0.0 ~/.nodes/20.0.0
$ mise link [email protected] ~/.nodes/20.0.0
# have mise use the python version provided by Homebrew
$ brew install node
$ mise link node@brew $(brew --prefix node)
$ mise use node@brew
"
flag "-f --force" help="Overwrite an existing tool version if it exists"
arg "<TOOL@VERSION>" help="Tool name and version to create a symlink for"
arg "<PATH>" help="The local path to the tool version\ne.g.: ~/.nvm/versions/node/v20.0.0"
}
cmd "local" hide=true help="Sets/gets tool version in local .tool-versions or mise.toml" {
alias "l" hide=true
long_help r"Sets/gets tool version in local .tool-versions or mise.toml
Use this to set a tool's version when within a directory
Use `mise global` to set a tool version globally
This uses `.tool-version` by default unless there is a `mise.toml` file or if `MISE_USE_TOML`
is set. A future v2 release of mise will default to using `mise.toml`."
after_long_help r"Examples:
# set the current version of node to 20.x for the current directory
# will use a precise version (e.g.: 20.0.0) in .tool-versions file
$ mise local node@20
# set node to 20.x for the current project (recurses up to find .tool-versions)
$ mise local -p node@20
# set the current version of node to 20.x for the current directory
# will use a fuzzy version (e.g.: 20) in .tool-versions file
$ mise local --fuzzy node@20
# removes node from .tool-versions
$ mise local --remove=node
# show the current version of node in .tool-versions
$ mise local node
20.0.0
"
flag "-p --parent" help="Recurse up to find a .tool-versions file rather than using the current directory only\nby default this command will only set the tool in the current directory (\"$PWD/.tool-versions\")"
flag "--pin" help="Save exact version to `.tool-versions`\ne.g.: `mise local --pin node@20` will save `node 20.0.0` to .tool-versions"
flag "--fuzzy" help="Save fuzzy version to `.tool-versions` e.g.: `mise local --fuzzy node@20` will save `node 20` to .tool-versions This is the default behavior unless MISE_ASDF_COMPAT=1"
flag "--remove" help="Remove the plugin(s) from .tool-versions" var=true {
arg "<PLUGIN>"
}
flag "--path" help="Get the path of the config file"
arg "[TOOL@VERSION]..." help="Tool(s) to add to .tool-versions/mise.toml\ne.g.: node@20\nif this is a single tool with no version,\nthe current value of .tool-versions/mise.toml will be displayed" var=true
}
cmd "ls" help="List installed and active tool versions" {
alias "list"
long_help r#"List installed and active tool versions
This command lists tools that mise "knows about".
These may be tools that are currently installed, or those
that are in a config file (active) but may or may not be installed.
It's a useful command to get the current state of your tools."#
after_long_help r#"Examples:
$ mise ls
node 20.0.0 ~/src/myapp/.tool-versions latest
python 3.11.0 ~/.tool-versions 3.10
python 3.10.0
$ mise ls --current
node 20.0.0 ~/src/myapp/.tool-versions 20
python 3.11.0 ~/.tool-versions 3.11.0
$ mise ls --json
{
"node": [
{
"version": "20.0.0",
"install_path": "/Users/jdx/.mise/installs/node/20.0.0",
"source": {
"type": "mise.toml",
"path": "/Users/jdx/mise.toml"
}
}
],
"python": [...]
}
"#
flag "-p --plugin" hide=true {
arg "<PLUGIN_FLAG>"
}
flag "-c --current" help="Only show tool versions currently specified in a mise.toml"
flag "-g --global" help="Only show tool versions currently specified in the global mise.toml"
flag "-i --installed" help="Only show tool versions that are installed (Hides tools defined in mise.toml but not installed)"
flag "-o --offline" help="Don't fetch information such as outdated versions"
flag "-J --json" help="Output in JSON format"
flag "-m --missing" help="Display missing tool versions"
flag "--prefix" help="Display versions matching this prefix" {
arg "<PREFIX>"
}
flag "--no-header" help="Don't display headers"
arg "[PLUGIN]..." help="Only show tool versions from [PLUGIN]" var=true
}
cmd "ls-remote" help="List runtime versions available for install." {
alias "list-all" "list-remote" hide=true
long_help r"List runtime versions available for install.
Note that the results may be cached, run `mise cache clean` to clear the cache and get fresh results."
after_long_help r"Examples:
$ mise ls-remote node
18.0.0
20.0.0
$ mise ls-remote node@20
20.0.0
20.1.0
$ mise ls-remote node 20
20.0.0
20.1.0
"
flag "--all" help="Show all installed plugins and versions"
arg "[TOOL@VERSION]" help="Tool to get versions for"
arg "[PREFIX]" help="The version prefix to use when querying the latest version\nsame as the first argument after the \"@\""
}
cmd "outdated" help="Shows outdated tool versions" {
long_help r"Shows outdated tool versions
See `mise upgrade` to upgrade these versions."
after_long_help r#"Examples:
$ mise outdated
Plugin Requested Current Latest
python 3.11 3.11.0 3.11.1
node 20 20.0.0 20.1.0
$ mise outdated node
Plugin Requested Current Latest
node 20 20.0.0 20.1.0
$ mise outdated --json
{"python": {"requested": "3.11", "current": "3.11.0", "latest": "3.11.1"}, ...}
"#
flag "-l --bump" help="Compares against the latest versions available, not what matches the current config" {
long_help "Compares against the latest versions available, not what matches the current config\n\nFor example, if you have `node = \"20\"` in your config by default `mise outdated` will only\nshow other 20.x versions, not 21.x or 22.x versions.\n\nUsing this flag, if there are 21.x or newer versions it will display those instead of 20.x."
}
flag "-J --json" help="Output in JSON format"
flag "--no-header" help="Don't show table header"
arg "[TOOL@VERSION]..." help="Tool(s) to show outdated versions for\ne.g.: node@20 [email protected]\nIf not specified, all tools in global and local configs will be shown" var=true
}
cmd "plugins" help="Manage plugins" {
alias "p"
alias "plugin" "plugin-list" hide=true
flag "-a --all" help="list all available remote plugins" hide=true {
long_help "list all available remote plugins\n\nsame as `mise plugins ls-remote`"
}
flag "-c --core" help="The built-in plugins only\nNormally these are not shown"
flag "--user" help="List installed plugins" {
long_help "List installed plugins\n\nThis is the default behavior but can be used with --core\nto show core and user plugins"
}
flag "-u --urls" help="Show the git url for each plugin\ne.g.: https://github.com/asdf-vm/asdf-nodejs.git"
flag "--refs" help="Show the git refs for each plugin\ne.g.: main 1234abc" hide=true
cmd "install" help="Install a plugin" {
alias "i" "a" "add"
long_help r"Install a plugin
note that mise automatically can install plugins when you install a tool
e.g.: `mise install node@20` will autoinstall the node plugin
This behavior can be modified in ~/.config/mise/config.toml"
after_long_help r"Examples:
# install the node via shorthand
$ mise plugins install node
# install the node plugin using a specific git url
$ mise plugins install node https://github.com/mise-plugins/rtx-nodejs.git
# install the node plugin using the git url only
# (node is inferred from the url)
$ mise plugins install https://github.com/mise-plugins/rtx-nodejs.git
# install the node plugin using a specific ref
$ mise plugins install node https://github.com/mise-plugins/rtx-nodejs.git#v1.0.0
"
flag "-f --force" help="Reinstall even if plugin exists"
flag "-a --all" help="Install all missing plugins\nThis will only install plugins that have matching shorthands.\ni.e.: they don't need the full git repo url"
flag "-v --verbose" help="Show installation output" var=true count=true
arg "[NEW_PLUGIN]" help="The name of the plugin to install\ne.g.: node, ruby\nCan specify multiple plugins: `mise plugins install node ruby python`"
arg "[GIT_URL]" help="The git url of the plugin"
arg "[REST]..." var=true hide=true
}
cmd "link" help="Symlinks a plugin into mise" {
alias "ln"
long_help r"Symlinks a plugin into mise
This is used for developing a plugin."
after_long_help r#"Examples:
# essentially just `ln -s ./mise-node ~/.local/share/mise/plugins/node`
$ mise plugins link node ./mise-node
# infer plugin name as "node"
$ mise plugins link ./mise-node
"#
flag "-f --force" help="Overwrite existing plugin"
arg "<NAME>" help="The name of the plugin\ne.g.: node, ruby"
arg "[DIR]" help="The local path to the plugin\ne.g.: ./mise-node"
}
cmd "ls" help="List installed plugins" {
alias "list"
long_help r"List installed plugins
Can also show remotely available plugins to install."
after_long_help r"Examples:
$ mise plugins ls
node
ruby
$ mise plugins ls --urls
node https://github.com/asdf-vm/asdf-nodejs.git
ruby https://github.com/asdf-vm/asdf-ruby.git
"
flag "-a --all" help="List all available remote plugins\nSame as `mise plugins ls-remote`" hide=true
flag "-c --core" help="The built-in plugins only\nNormally these are not shown" hide=true
flag "--user" help="List installed plugins" hide=true
flag "-u --urls" help="Show the git url for each plugin\ne.g.: https://github.com/asdf-vm/asdf-nodejs.git"
flag "--refs" help="Show the git refs for each plugin\ne.g.: main 1234abc" hide=true
}
cmd "ls-remote" help="List all available remote plugins" {
alias "list-remote" "list-all"
long_help r"
List all available remote plugins
The full list is here: https://github.com/jdx/mise/blob/main/registry.toml
Examples:
$ mise plugins ls-remote
"
flag "-u --urls" help="Show the git url for each plugin e.g.: https://github.com/mise-plugins/mise-poetry.git"
flag "--only-names" help="Only show the name of each plugin by default it will show a \"*\" next to installed plugins"
}
cmd "uninstall" help="Removes a plugin" {
alias "remove" "rm"
after_long_help r"Examples:
$ mise uninstall node
"
flag "-p --purge" help="Also remove the plugin's installs, downloads, and cache"
flag "-a --all" help="Remove all plugins"
arg "[PLUGIN]..." help="Plugin(s) to remove" var=true
}
cmd "update" help="Updates a plugin to the latest version" {
alias "up" "upgrade"
long_help r"Updates a plugin to the latest version
note: this updates the plugin itself, not the runtime versions"
after_long_help r"Examples:
$ mise plugins update # update all plugins
$ mise plugins update node # update only node
$ mise plugins update node#beta # specify a ref
"
flag "-j --jobs" help="Number of jobs to run in parallel\nDefault: 4" {
arg "<JOBS>"
}
arg "[PLUGIN]..." help="Plugin(s) to update" var=true
}
}
cmd "prune" help="Delete unused versions of tools" {
long_help r"Delete unused versions of tools
mise tracks which config files have been used in ~/.local/state/mise/tracked-configs
Versions which are no longer the latest specified in any of those configs are deleted.
Versions installed only with environment variables `MISE_<PLUGIN>_VERSION` will be deleted,
as will versions only referenced on the command line `mise exec <PLUGIN>@<VERSION>`."
after_long_help r"Examples:
$ mise prune --dry-run
rm -rf ~/.local/share/mise/versions/node/20.0.0
rm -rf ~/.local/share/mise/versions/node/20.0.1
"
flag "-n --dry-run" help="Do not actually delete anything"
flag "--configs" help="Prune only tracked and trusted configuration links that point to non-existent configurations"
flag "--tools" help="Prune only unused versions of tools"
arg "[PLUGIN]..." help="Prune only versions from this plugin(s)" var=true
}
cmd "registry" help="List available tools to install" {
long_help r"List available tools to install
This command lists the tools available in the registry as shorthand names.
For example, `poetry` is shorthand for `asdf:mise-plugins/mise-poetry`."
after_long_help r"Examples:
$ mise registry
node core:node
poetry asdf:mise-plugins/mise-poetry
ubi cargo:ubi-cli
$ mise registry poetry
asdf:mise-plugins/mise-poetry
"
flag "-b --backend" help="Show only tools for this backend" {
arg "<BACKEND>"
}
flag "--hide-aliased" help="Hide aliased tools"
arg "[NAME]" help="Show only the specified tool's full name"
}
cmd "reshim" help="Creates new shims based on bin paths from currently installed tools." {
long_help r#"Creates new shims based on bin paths from currently installed tools.
This creates new shims in ~/.local/share/mise/shims for CLIs that have been added.
mise will try to do this automatically for commands like `npm i -g` but there are
other ways to install things (like using yarn or pnpm for node) that mise does
not know about and so it will be necessary to call this explicitly.
If you think mise should automatically call this for a particular command, please
open an issue on the mise repo. You can also setup a shell function to reshim
automatically (it's really fast so you don't need to worry about overhead):
npm() {
command npm "$@"
mise reshim
}
Note that this creates shims for _all_ installed tools, not just the ones that are
currently active in mise.toml."#
after_long_help r"Examples:
$ mise reshim
$ ~/.local/share/mise/shims/node -v
v20.0.0
"
flag "-f --force" help="Removes all shims before reshimming"
arg "[PLUGIN]" hide=true
arg "[VERSION]" hide=true
}
cmd "run" help="Run task(s)" {
alias "r"
long_help r#"Run task(s)
This command will run a tasks, or multiple tasks in parallel.
Tasks may have dependencies on other tasks or on source files.
If source is configured on a tasks, it will only run if the source
files have changed.
Tasks can be defined in mise.toml or as standalone scripts.
In mise.toml, tasks take this form:
[tasks.build]
run = "npm run build"
sources = ["src/**/*.ts"]
outputs = ["dist/**/*.js"]
Alternatively, tasks can be defined as standalone scripts.
These must be located in `mise-tasks`, `.mise-tasks`, `.mise/tasks`, `mise/tasks` or
`.config/mise/tasks`.
The name of the script will be the name of the tasks.
$ cat .mise/tasks/build<<EOF
#!/usr/bin/env bash
npm run build
EOF
$ mise run build"#
after_long_help r#"Examples:
# Runs the "lint" tasks. This needs to either be defined in mise.toml
# or as a standalone script. See the project README for more information.
$ mise run lint
# Forces the "build" tasks to run even if its sources are up-to-date.
$ mise run build --force
# Run "test" with stdin/stdout/stderr all connected to the current terminal.
# This forces `--jobs=1` to prevent interleaving of output.
$ mise run test --raw
# Runs the "lint", "test", and "check" tasks in parallel.
$ mise run lint ::: test ::: check
# Execute multiple tasks each with their own arguments.
$ mise tasks cmd1 arg1 arg2 ::: cmd2 arg1 arg2
"#
flag "-C --cd" help="Change to this directory before executing the command" {
arg "<CD>"
}
flag "-n --dry-run" help="Don't actually run the tasks(s), just print them in order of execution"
flag "-f --force" help="Force the tasks to run even if outputs are up to date"
flag "-p --prefix" help="Print stdout/stderr by line, prefixed with the tasks's label\nDefaults to true if --jobs > 1\nConfigure with `task_output` config or `MISE_TASK_OUTPUT` env var"
flag "-i --interleave" help="Print directly to stdout/stderr instead of by line\nDefaults to true if --jobs == 1\nConfigure with `task_output` config or `MISE_TASK_OUTPUT` env var"
flag "-t --tool" help="Tool(s) to run in addition to what is in mise.toml files e.g.: node@20 [email protected]" var=true {
arg "<TOOL@VERSION>"
}
flag "-j --jobs" help="Number of tasks to run in parallel\n[default: 4]\nConfigure with `jobs` config or `MISE_JOBS` env var" {
arg "<JOBS>"
}
flag "-r --raw" help="Read/write directly to stdin/stdout/stderr instead of by line\nConfigure with `raw` config or `MISE_RAW` env var"
flag "--timings" help="Shows elapsed time after each task completes" hide=true {
long_help "Shows elapsed time after each task completes\n\nDefault to always show with `MISE_TASK_TIMINGS=1`"
}
flag "--no-timings" help="Hides elapsed time after each task completes" {
long_help "Hides elapsed time after each task completes\n\nDefault to always hide with `MISE_TASK_TIMINGS=0`"
}
mount run="mise tasks --usage"
}
cmd "self-update" help="Updates mise itself." {
long_help r"Updates mise itself.
Uses the GitHub Releases API to find the latest release and binary.
By default, this will also update any installed plugins.
Uses the `GITHUB_API_TOKEN` environment variable if set for higher rate limits.
This command is not available if mise is installed via a package manager."
flag "-f --force" help="Update even if already up to date"
flag "--no-plugins" help="Disable auto-updating plugins"
flag "-y --yes" help="Skip confirmation prompt"
arg "[VERSION]" help="Update to a specific version"
}
cmd "set" help="Set environment variables in mise.toml" {
alias "ev" "env-vars" hide=true
long_help r"Set environment variables in mise.toml
By default, this command modifies `mise.toml` in the current directory."
after_long_help r"Examples:
$ mise set NODE_ENV=production
$ mise set NODE_ENV
production
$ mise set
key value source
NODE_ENV production ~/.config/mise/config.toml
"
flag "--file" help="The TOML file to update" {
long_help "The TOML file to update\n\nDefaults to MISE_DEFAULT_CONFIG_FILENAME environment variable, or `mise.toml`."
arg "<FILE>"
}
flag "-g --global" help="Set the environment variable in the global config file"
flag "--remove" help="Remove the environment variable from config file" var=true hide=true {
long_help "Remove the environment variable from config file\n\nCan be used multiple times."
arg "<ENV_VAR>"
}
arg "[ENV_VARS]..." help="Environment variable(s) to set\ne.g.: NODE_ENV=production" var=true
}
cmd "settings" help="Manage settings" {
after_long_help r#"Examples:
# list all settings
$ mise settings
# get the value of the setting "always_keep_download"
$ mise settings always_keep_download