Skip to content

Commit b7f7f96

Browse files
author
Erin van der Veen
committed
chore: update readme to include new subcommand
1 parent d71cb66 commit b7f7f96

File tree

2 files changed

+22
-1
lines changed

2 files changed

+22
-1
lines changed

README.md

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -184,6 +184,7 @@ Commands:
184184
format Format inputs
185185
visualise Visualise the input's Tree-sitter parse tree
186186
config Print the current configuration
187+
prefetch Prefetch all languages in the configuration
187188
completion Generate shell completion script
188189
help Print this message or the help of the given subcommand(s)
189190
@@ -345,6 +346,26 @@ For example, in Bash:
345346
source <(topiary completion)
346347
```
347348

349+
#### Prefetching
350+
351+
Topiary dynamically downloads, builds, and loads the tree-sitter grammars. In
352+
order to ensure offline availability or speed up startup time, the grammars can
353+
be prefetched and compiled.
354+
355+
<!-- DO NOT REMOVE THE "usage" COMMENTS -->
356+
<!-- usage:start:prefetch-->
357+
```
358+
Prefetch all languages in the configuration
359+
360+
Usage: topiary prefetch [OPTIONS]
361+
362+
Options:
363+
-C, --configuration <CONFIGURATION> Configuration file [env: TOPIARY_CONFIG_FILE]
364+
-v, --verbose... Logging verbosity (increased per occurrence)
365+
-h, --help Print help
366+
```
367+
<!-- usage:end:prefetch -->
368+
348369
#### Logging
349370

350371
By default, the Topiary CLI will only output error messages. You can

bin/verify-documented-usage.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ diff-usage() {
4040
}
4141

4242
main() {
43-
local -a subcommands=(ROOT format visualise config completion)
43+
local -a subcommands=(ROOT format visualise config completion prefetch)
4444

4545
local _diff
4646
local _subcommand

0 commit comments

Comments
 (0)