| name | dncensor-tui-test |
| description | Test the dncensor TUI using tmux. Never run the app from the agent — always use a tmux pane so you can see the UI and interact properly. |
dncensor TUI test via tmux
When to use
Visual/interactive testing of dncensor's TUI. Never run the binary from the agent CLI — use tmux.
Steps
-
Check tmux — if $TMUX unset, tell user and stop.
-
Pick or create window:
WIN=dncensor-test
tmux list-windows -F '#{window_name}' | grep -qx "$WIN" \
|| tmux new-window -n "$WIN" -c "$PWD"
-
Build dev binary:
make build-dev
-
Send keys — send Enter separately from command (avoids buffering races):
tmux send-keys -t "$WIN" './dncensor-dev' Enter
-
Capture visible output:
tmux capture-pane -t "$WIN" -p
-
Navigate TUI:
tmux send-keys -t "$WIN" Down
tmux send-keys -t "$WIN" Up
tmux send-keys -t "$WIN" Enter
tmux send-keys -t "$WIN" Tab
tmux send-keys -t "$WIN" 'a'
tmux send-keys -t "$WIN" 'q'
-
Subcommands (no TUI):
tmux send-keys -t "$WIN" './dncensor-dev current --json' Enter
tmux send-keys -t "$WIN" './dncensor-dev list-providers --json' Enter
Notes
make build-dev uses //go:build dev tag to skip root check → binary is ./dncensor-dev.
- Send
C-c first if the pane has leftover input before sending fresh commands.
- Always use
-p on capture-pane (visible only), never -S - (scrollback).
- The TUI renders inside the pane — capture output includes padding/whitespace from tmux; that's normal.