Loading...
Loading...
Instructions for using kitty remote control to spawn windows/tabs, send text, inspect output, and manage processes. Useful for running servers or long-running tasks in the background.
npx skill4agent add xyenon/agents kittyBashkitten @ ls$KITTY_LISTEN_ONecho $KITTY_LISTEN_ONallow_remote_control yeskitty.conf--allow-remote-control$KITTY_WINDOW_IDWID=$(kitten @ launch --match "id:$KITTY_WINDOW_ID" --title "server-log" --keep-focus)
echo "Created window with ID: $WID"kitten @ launch --type=tab --title "server-log" --keep-focus--holdkitten @ launch --title "server-log" --keep-focus --hold npm startkitten @ send-text --match "id:$WID" "npm start\n"\n$'...'kitten @ send-text --match "title:server-log" "npm start
"
# OR
echo "npm start" | kitten @ send-text --match "title:server-log" --stdinkitten @ send-text --all "echo hello\n"kitten @ get-text --match "id:$WID"kitten @ get-text --match "title:server-log" --extent=allkitten @ get-text --match "title:server-log" --extent=last_cmd_outputkitten @ focus-window --match "id:$WID"kitten @ focus-tab --match "title:server-log"kitten @ send-text --match "id:$WID" "\x03"kitten @ close-window --match "id:$WID"# By ID of a window inside the tab
kitten @ close-tab --match "id:$WID"
# By tab title
kitten @ close-tab --match "title:server-log"title:patternid:numberpid:numbercwd:pathcmdline:patternstate:focusedstate:activeandornotkitten @ focus-window --match "title:server and state:active"kitten @ lskitten @ ls | jq -r '.[].tabs[] | select(.is_focused) | .windows[] | select(.is_focused) | .id'kitten @ ls | jq '.[].tabs[].windows[] | {id, title, cmdline}'WID=$(kitten @ launch --title "NAME" --keep-focus [CMD])kitten @ send-text --match "id:$WID" "CMD\n"kitten @ get-text --match "id:$WID"kitten @ close-window --match "id:$WID"| Command | Description |
|---|---|
| List all windows/tabs |
| Create new window/tab |
| Send text to window |
| Get text from window |
| Focus a window |
| Focus a tab |
| Close a window |
| Close a tab |
| Send signal to process |
| Change tab title |
| Change terminal colors |