Skip to main content

A terminal companion that pins a persistent input bar at the bottom of your tmux pane, so you can scroll freely through long TUI agent output while composing your response.

Project description

tui-input

CI PyPI License: MIT Python 3.10+

A terminal companion that pins a persistent input bar at the bottom of your tmux pane. Scroll freely through long TUI agent output while composing your response.

The Problem

When using TUI-based AI agents (Claude Code, Codex CLI, etc.), long outputs force you to scroll up to read, then scroll back down to type. You end up:

  • Losing your place in the output
  • Writing responses in a separate editor, then copy-pasting
  • Fighting the terminal scroll position

The Solution

tui-input splits your terminal into two panes:

┌─────────────────────────────────────┐
│  Top pane (Claude Code / Codex etc) │
│  Scroll freely through long output  │
├─────────────────────────────────────┤  ← 3-10 lines, auto-resizing
│  Type your response here...         │
│  Enter to send · Shift+Enter: newline│
└─────────────────────────────────────┘

Features

  • Pinned input bar — always visible at the bottom, regardless of scroll position
  • Auto-resize — companion grows from 3 to 10 lines as you type multi-line input
  • Bracketed paste — safe multi-line text transfer via tmux buffers
  • Input history — press / to recall previous inputs (persisted across sessions)
  • Agent-agnostic — works with any terminal program, not just AI agents
  • Auto-cleanup — companion exits when the agent exits

Installation

Requirements

  • Python 3.10+
  • tmux

Install via pip/uv

# Using uv (recommended)
uv tool install tui-input

# Using pip
pip install tui-input

One-liner (auto-detects agents + registers aliases)

curl -fsSL https://raw.githubusercontent.com/maked-dev/tui-input/main/install.sh | bash

This will:

  1. Install tui-input
  2. Detect installed agents (claude, codex, etc.)
  3. Register shell aliases so you can just type claude instead of tui-input claude

To uninstall aliases:

curl -fsSL https://raw.githubusercontent.com/maked-dev/tui-input/main/install.sh | bash -s -- --uninstall

Usage

# Basic usage
tui-input claude

# Any command works
tui-input "vim file.py"
tui-input htop

# With aliases installed (via install.sh), just type the agent name
claude
codex

Key Bindings

Key Action
Enter Send text to top pane + clear input
Shift+Enter Insert newline (multi-line input)
(on empty) Previous history entry
(on empty) Next history entry
Esc Clear all input

How It Works

  1. tui-input creates a tmux vertical split (or a new session if not in tmux)
  2. Your command runs in the top pane
  3. A Textual-based companion widget runs in the bottom pane
  4. Press Enter to send text to the top pane via tmux paste-buffer
  5. When the top pane command exits, the companion auto-exits

Development

# Clone and install
git clone https://github.com/maked-dev/tui-input.git
cd tui-input
uv sync

# Run tests
uv run pytest

# Lint and format
uv run ruff check src/ tests/
uv run ruff format --check src/ tests/

# Type check
uv run mypy src/

License

MIT

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

tui_input-0.1.1.tar.gz (57.8 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

tui_input-0.1.1-py3-none-any.whl (15.6 kB view details)

Uploaded Python 3

File details

Details for the file tui_input-0.1.1.tar.gz.

File metadata

  • Download URL: tui_input-0.1.1.tar.gz
  • Upload date:
  • Size: 57.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for tui_input-0.1.1.tar.gz
Algorithm Hash digest
SHA256 afac658825f0d3c905f7f6e71f51540a5607393e3e2f2cc75f1e4fd3a6ae3bec
MD5 0128a2c964eaca84608ea42b02d92fc0
BLAKE2b-256 733d5bb9d767388063dab64dd083fd3a61467124797316b4e160e7d4a5768c7f

See more details on using hashes here.

Provenance

The following attestation bundles were made for tui_input-0.1.1.tar.gz:

Publisher: release.yml on maked-dev/tui-input

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file tui_input-0.1.1-py3-none-any.whl.

File metadata

  • Download URL: tui_input-0.1.1-py3-none-any.whl
  • Upload date:
  • Size: 15.6 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for tui_input-0.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 1914ef1fb925c355d76fc26f51f8878686d6c5631e513c43b18090a62456aa9a
MD5 45971b23fdd1895f003f845a7579e471
BLAKE2b-256 8b91bac4e07e58e1b96c5d135b9f27383e4bf8b001b97f447622d3d6d5f3dd77

See more details on using hashes here.

Provenance

The following attestation bundles were made for tui_input-0.1.1-py3-none-any.whl:

Publisher: release.yml on maked-dev/tui-input

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page