CLI Commands
Bowler provides a command line tool to simplify the process of testing and executing code refactoring scripts.
The primary CLI tool is called bowler
, and has a few commands to choose from.
You can run Bowler with the following pattern:
bowler [--help] [--debug | --quiet] <command> [<options> ...] [<arguments>]
Options
--help
Displays all options and commands, or if given after a command, shows all options and arguments for that command.
--debug | --quiet
Control the level of logging output from Bowler. By default, Bowler only outputs
warnings and errors. With --debug
, Bowler will also output debug and info level
messages. With --quiet
, Bowler will only output error messages.
Commands
Command Reference
do
Compile and run the given Python query, or open an IPython shell if none given. Common Bowler API elements will already be available in the global namespace.
bowler do [<query>]
dump
Load and dump the concrete syntax tree from the given paths to stdout.
bowler dump [<path> ...]
run
Execute a file-based code modification.
Takes either a path to a python script, or an importable module name, and
attempts to import and run a "main()" function from that script/module if
found. Extra arguments to this command will be supplied to the
script/module. Use --
to forcibly pass through all following options or
arguments.
bowler run (<path> | <module>) [-- <options>]