-
Notifications
You must be signed in to change notification settings - Fork 0
Getting Started
brew tap beyondlex/tap && brew install ocularcargo install ocular-cli
curl -fsSL https://raw.githubusercontent.com/beyondlex/ocular/main/install.sh | shgit clone https://github.com/beyondlex/ocular.git
cd ocular
cargo build --release
./target/release/ocularocular --demo
This generates simulated traffic so you can explore the TUI immediately.
Create ocular.toml in your project directory (or ~/.config/ocular/ocular.toml):
[[proxy]] name = "redis" protocol = "redis" listen = "127.0.0.1:16379" remote = "127.0.0.1:6379" [[proxy]] name = "mysql" protocol = "mysql" listen = "127.0.0.1:13306" remote = "127.0.0.1:3306"
ocular
Ocular launches a TUI dashboard. On first run, you'll see a group selector — press Enter on "default" to load your proxies.
Instead of connecting directly to Redis on 6379, connect to 16379. Instead of MySQL on 3306, connect to 13306.
# Example: redis-cli through Ocular redis-cli -h 127.0.0.1 -p 16379 # Example: mysql through Ocular mysql -h 127.0.0.1 -P 13306 -u root -p
Note: For MySQL, always use
-h 127.0.0.1(notlocalhost) to ensure TCP connection through the proxy.
Every command your app sends now appears in the Ocular TUI in real-time, with human-readable formatting and latency tracking.
If you can't change your app's connection settings, use capture mode:
sudo ocular capture redis 127.0.0.1
This passively sniffs traffic on the network interface. Your app doesn't need to know Ocular exists. See Proxy Mode vs Capture Mode for details.
For scripting, CI, or quick checks:
ocular proxy redis --json
Outputs events as JSON, one per line. See CLI Reference.
- Configuration Reference — customize display, filtering, event logging
- Usage Scenarios — Docker, production, CI setups
- Keybindings — master the Vim-style navigation
- Supported Protocols — what's supported and any gotchas