zellij-control

Inject keystrokes and read rendered screen output through Zellij sessions.

8|2|Updated Oct 29, 2025
One-click install
npx skills add https://github.com/cuipengfei/prompts --skill zellij-control
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: zellij-control
Source: https://github.com/cuipengfei/prompts/tree/main/plugins/zellij-control/skills/zellij-control
Command: npx skills add https://github.com/cuipengfei/prompts --skill zellij-control

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This Skill solves the difficulty of driving interactive terminal programs from an automated or remote environment by letting you send keystrokes and read rendered screen output through Zellij sessions.

Core Features & Use Cases

  • Keystroke injection for interactive TUI/REPL apps: Use Zellij to write exact characters and control keys (Enter, ESC, Ctrl+C/D, Tab, arrows) for tools like htop, btop, lazygit, fzf, less, bat, and REPLs.
  • Session and pane management: Create new panes, close panes, and move focus within a session to structure interactive workflows.
  • Screen dumping for observation: Dump the terminal’s rendered content to a file path in /dev/shm (optionally including scrollback) so you can parse or review output without writing to persistent disk.

Quick Start

Ask the zellij-control skill to start (or use) a Zellij session, type htop, press Enter to launch it, dump the current screen to /dev/shm, and then exit the app by sending q.

Frequently Asked Questions about zellij-control

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I automate interactive CLI apps and send keystrokes to a terminal session?

Inject keystrokes into interactive CLI apps via Zellij sessions using the write-chars flow to send exact characters and control keys, enabling automated control of TUI tools and REPLs.

Can I automate TUI tools like htop, lazygit, or fzf from a script?

Yes, automate TUI tools like htop, lazygit, and fzf by injecting keystrokes including Enter, ESC, and arrows through Zellij sessions, enabling scripted control over interactive terminal workflows.

How does screen dumping work for reading terminal output in memory?

Screen dumping captures the terminal's rendered content to a file path in /dev/shm, enabling safe, disk-free observation and parsing of terminal output including optional scrollback.

Do I need to install Zellij to control interactive terminal programs?

Yes, Zellij is required as it provides the session action write-chars flow for sending all commands including Enter, and the dump-screen functionality for reading rendered terminal output.

What is the best way to capture output from a Python or Bun REPL without writing to disk?

Use Zellij's dump-screen with a /dev/shm path to capture Python or Bun REPL output without disk writes, reading rendered screen content directly from memory for safe observation.

Why does my interactive terminal automation fail when sending commands without Enter?

Interactive terminal automation fails because all commands, including Enter, must be sent via the Zellij session action write-chars flow to properly execute keystrokes within the target program.