Panopticon
A TUI command runner with a built-in file-watcher.

Features
- Configurable command runner with specified file paths to watch recursively
- View output from commands after running with scrollable viewport
Installation
Via go install
(recommended)
With go 1.23 or higher:
go install github.com/cfbender/panopticon@latest
From source
Clone the repo and run go install
.
If you don't have a config file, you can run panopticon init
to generate one at your current working directory.
Usage
Given the following config:
commands:
- cmd: echo "components"
watch_paths:
- ./src/components
- cmd: echo "source"
watch_paths:
- ./src
and a directory structure looking like
src/
|_ components/
|__|__ some-component.tsx
|__ index.ts
package.json
- Start the watcher with no commands running
panopticon
Changing the file index.ts
would run only echo "source"
, where changing src/components/some-component.tsx
would run both echo "source"
and echo "components"
.
TUI commands
h/j
or up/down
to navigate between commands
enter
to view the output
ctrl+j/ctrl+k
/ctrl+up/ctrl+down
to navigate output in viewport
r
to run command immediately
Options
panopticon -h
Outputs the various flags that can be passed
panopticon --run-on-start
Will run all commands currently upon watcher start, and then again on subsequent changes.
panopticon --match "*echo*"
Will run all commands matching the glob pattern *echo*
panopticon --version
Will print the version of panopticon