Full documentation for the CLI can be found in the project's
README
. Herein we summarise how the v0.2.3 functionality
maps to the new interface introduced in v0.3.0, to aid migration.
Before:
topiary [--skip-idempotence] \
[--tolerate-parsing-errors] \
--in-place \
--input-files INPUT_FILES...
After:
topiary fmt [--skip-idempotence] \
[--tolerate-parsing-errors] \
INPUT_FILES...
Before:
topiary [--skip-idempotence] \
[--tolerate-parsing-errors] \
(--language LANGUAGE | --query QUERY) \
--input-files INPUT_FILE \
--output-file OUTPUT_FILE
After (use IO redirection):
topiary fmt [--skip-idempotence] \
[--tolerate-parsing-errors] \
(--language LANGUAGE [--query QUERY]) \
< INPUT_FILE \
> OUTPUT_FILE
Before:
topiary [--skip-idempotence] \
[--tolerate-parsing-errors] \
(--language LANGUAGE [--query QUERY]) \
(--input-files - | < INPUT_FILE) \
[--output-file -]
After (use IO redirection):
topiary fmt [--skip-idempotence] \
[--tolerate-parsing-errors] \
(--language LANGUAGE [--query QUERY]) \
< INPUT_FILE
Before:
topiary --visualise[=FORMAT] \
--input-files INPUT_FILE \
[--output-file OUTPUT_FILE | > OUTPUT_FILE]
After:
topiary vis [--format FORMAT] \
INPUT_FILE \
[> OUTPUT_FILE]
Before:
topiary --visualise[=FORMAT] \
(--language LANGUAGE [--query QUERY]) \
< INPUT_FILE \
[--output-file OUTPUT_FILE | > OUTPUT_FILE]
After (use IO redirection):
topiary vis [--format FORMAT] \
(--language LANGUAGE [--query QUERY]) \
< INPUT_FILE \
[> OUTPUT_FILE]
To replicate the behaviour of v0.2.3, set the configuration collation
mode to revise
. This can be done with the TOPIARY_CONFIG_COLLATION
environment variable, or the --configuration-collation
argument.
The new default collation method is merge
, which is subtly different
when it comes to collating collections.
Before (or using the TOPIARY_CONFIGURATION_OVERRIDE
environment
variable):
topiary --configuration-override CONFIG_FILE ...
After (or using a combination of TOPIARY_CONFIG_FILE
and
TOPIARY_CONFIG_COLLATION
environment variables):
topiary --configuration CONFIG_FILE \
--configuration-collation override \
...
Before (to standard error, as debug output, then proceeding with other functions):
topiary --output-configuration ...
After (to standard output, in TOML format, as a dedicated function):
topiary cfg
Before (via the RUST_LOG
environment variable):
RUST_LOG=warn topiary ...
After (using -v
command line flags):
topiary -v ...
The number of command line flags increases the verbosity:
Verbosity Flag | RUST_LOG Equivalent |
---|---|
None | error (default) |
-v |
warn |
-vv |
info |
-vvv |
debug |
-vvvv |
trace |