Built-in CLI Tools#

pw_console: Multi-purpose pluggable interactive console for dev & manufacturing

pw-console Command-Line Interface Usage#

Pigweed Console built-in tools.

Launch an empty UI with only a Python repl:

pw-console

Launch the test mode user interface:

pw-console --test-mode

Open files for viewing in log windows:

pw-console --open-files logfile1.txt logfile2.txt

Open an Android bugreport zipfile and view persistent logcat files:

pw-console --open-bugreport android-bugreport.zip

usage: pw-console [-h] [-l LOGLEVEL] [--logfile LOGFILE]
                  [--test-mode | --open-files OPEN_FILES [OPEN_FILES ...] |
                  --open-bugreport OPEN_BUGREPORT]
                  [--file-parser {basic,fuchsia-json,android-logcat-text,android-persistent-logcat-text}]
                  [--merge-open-files]
                  [--zipfile-globs ZIPFILE_GLOBS [ZIPFILE_GLOBS ...]]
                  [--reverse-file-order] [--config-file CONFIG_FILE]
                  [--console-debug-log-file CONSOLE_DEBUG_LOG_FILE]
                  [--browser]

Named Arguments#

-l, --loglevel

Set the log level(debug, info, warning, error, critical)

Default: 10

--logfile

Pigweed Console log file.

--test-mode

Enable fake log messages for testing purposes.

Default: False

--open-files

Paths to text log file to open.

--open-bugreport

Open an Android bugreport zip file and view persistent logcat file contents. This option makes use of preset values for –file-parser, –zipfile-globs, –reverse-file-order and –merge-open-files. Any additional passed in values are ignored.

--config-file

Path to a pw_console yaml config file.

--console-debug-log-file

Log file to send console debug messages to.

--browser

Start browser-based console instead of terminal.

Default: False

Open File Options#

--file-parser

Possible choices: basic, fuchsia-json, android-logcat-text, android-persistent-logcat-text

Default: “basic”

--merge-open-files

Multiple open-file arguments will be merged into a single continuous view in the order they are specified. Otherwise each file will be shown in a separate tab.

Default: False

--zipfile-globs

Globs to match when opening zipfile contents.

--reverse-file-order

When opening multiple files reverse the order in which they appear. Normally they will appear in ascending order of filename.

Default: False