Background task manager with a TUI and an LLM agent that can read logs, run diagnostics, and start/stop tasks on your behalf.
Uses Ollama for inference. The agent sees all your tasks and their log files, and has tools to read files, run shell commands, and manage tasks.
go install github.com/parth/watchy/cmd/watchy@latest
Requires Ollama. Recommended models:
glm-5.2:cloud-- default, runs via Ollama cloudglm-4.7-flash-- runs fully local
Run watchy to open the TUI. Left pane shows tasks, right pane shows logs or chat.
watchy # launch TUI
watchy --online # launch TUI using ollama.com cloud
watchy --model llama3.1:8b # launch TUI with a different model
watchy --version # print version
watchy start 'make serve' # start a background task
watchy run 'make serve' # same as watchy start
watchy start 'npm test' --name ci # start with a custom name
watchy stop 3 # stop task 3
watchy list # list all tasks
watchy list --json # list tasks as JSON (scriptable)
watchy info 3 # show details for task 3
watchy info 3 --json # task details as JSON
watchy logs 3 -n 100 # last 100 lines of task 3
watchy restart 3 # restart a stopped/crashed task
watchy ask 3 "any errors?" # ask the agent about task 3
watchy cleanup # remove old finished tasks
The --model flag works with any command.
j/k or ↑/↓ navigate task list / scroll focused pane
g go to top of logs/chat
G go to bottom of logs/chat
tab move focus through the panes currently on screen
shift+tab move focus backward
l show logs
c show chat
s toggle split view
[/] cycle logs, chat, and split views
h hide/show sidebar
enter open task logs / toggle task sidebar from logs / focus or send chat
? show all keybindings
Mouse is supported in the TUI: click panes to focus them, click tasks to open logs, click the chat composer to type, and use the wheel over tasks/logs/chat.
l show logs for selected task
/ search in logs
n next search match
N previous search match
: jump to a line number
0 ^ scroll horizontally to start of line
< > scroll horizontally left / right
u show/hide routine Ollama serve noise
v toggle visual mode (select lines with cursor)
y copy to clipboard (selection in visual mode, or all logs)
A count prefix works for motion keys: 5j moves down 5 lines, 10k up 10.
f show running tasks only
x stop selected task
r restart stopped/crashed task
d show full task details, command, and working directory
i focus chat composer from chat history
e expand/collapse the latest tool card
y copy latest tool args/result
ctrl+left switch from chat to logs
ctrl+j insert newline in chat input
esc cancel in-flight agent request
t cycle theme (green/blue/purple/orange/pink/cyan/red/white)
m toggle light/dark mode
M choose an available Ollama model
q quit
ctrl+c quit (works even in chat input)
/model open the model picker
/model llama3.1:8b switch model mid-session
/save <name> save last agent-started task as a tick
/save <name> <cmd> save a command as a named tick
/new clear chat history
The interactive chat agent has access to:
read_file-- read any file by pathbash_command-- run read-only shell commands (grep, tail, head, awk, sed, wc, cat, sort, uniq, cut, ls, find, ps, lsof, curl, dig, ping, and other read-only utilities; pipes supported)list_tasks-- list all current tasks (refreshes the agent's view after starting or stopping)get_task_info-- get task metadata including working directory, exit code, and log pathstart_task-- start a new background task (optionalworkdir)stop_task-- stop a running taskrestart_task-- restart a stopped or crashed task
watchy ask is read-only: it can read files, run bash commands, list tasks, and
get task info, but cannot start, stop, or restart tasks. Use the interactive
chat (or the CLI) to mutate task state.
Ask it things like "start a web server on port 8080", "are there any errors in task 2?", or "grep for panics across all logs".
Optional config at ~/.watchy/config.yaml:
retention_days: 7
model: "glm-5.2:cloud"
theme: "green"
color_mode: "auto"Available themes: green, blue, purple, orange, pink, cyan, red, white. Use t in the TUI to cycle through them. color_mode can be auto, dark, or light; use m in the TUI to toggle and persist a manual light/dark mode.
You can also set the model per-session with --model, M, or /model in chat.
The picker lists models from Ollama and accepts a manually typed model name. Press
Enter to use a model for the current session or Ctrl+S to save it as the default.
Tasks remember the directory they were launched from, so restarting a task uses
the same working directory. Cleanup is explicit: watchy cleanup removes finished
tasks older than retention_days; simply opening the TUI does not delete history.
Data lives in ~/.watchy/ (SQLite db + log files).
