# traceviewer
[](https://github.com/ctron/traceview/actions/workflows/ci.yml)
[](https://crates.io/crates/traceviewer)
`traceviewer` runs a command and shows its output in a scrollable terminal log
viewer.
It is useful for inspecting long-running command output while keeping recent
log lines selectable, searchable by eye, and copyable from inside the terminal.
## Install
```sh
cargo install traceviewer
```
The installed binary is named `tv`.
## Usage
```sh
tv -- cargo test
tv --format tracing -- my-service
tv --max-lines 5000 -- ./run.sh
```
By default, `traceviewer` attempts to recognize common `env_logger` and
`tracing` text output. Use `--format plain`, `--format env-logger`, or
`--format tracing` to choose a parser explicitly.
## Controls
```text
Up / Down move cursor one line
PgUp / PgDown move cursor one page
Home / End jump to first or last retained line
Left / Right scroll horizontally
y copy selected line to clipboard
? toggle help
q / Esc exit after the process ends
Ctrl-C kill process and exit
```
## License
This project is licensed under the terms in `LICENSE`.