Skip to content

🐦 Integrate Bird CLI into FeedTUI for Interactive Twitter/X Widget #46

@muk2

Description

@muk2

Summary

Integrate Bird CLI into the FeedTUI Ratatui dashboard to provide a fully interactive Twitter/X experience directly inside the terminal.

The goal is to embed a polished, responsive Twitter/X widget that allows users to:
• Tweet
• Reply
• Read posts
• View threads
• Search
• View mentions

All functionality should feel native to FeedTUI — not just a subprocess dump of CLI output.

Background

Bird CLI (installed via bun) allows interacting with Twitter/X via terminal when provided:
• CT0
• AUTH_TOKEN

These must be supplied as environment variables (extracted from browser cookies).

Example commands supported by Bird:

bird tweet "ship it"

bird reply https://x.com/user/status/1234567890123456789 "same"

bird read https://x.com/user/status/1234567890123456789

bird thread 1234567890123456789

bird search "from:steipete" -n 5

bird mentions -n 5

FeedTUI should integrate with Bird programmatically and render results inside Ratatui widgets.

Goals

Create a dedicated Twitter/X tab inside FeedTUI that:
• Executes Bird commands internally
• Renders structured output in a clean Ratatui layout
• Supports keyboard-driven interaction
• Remains fully non-blocking and responsive

Required Features

1️⃣ Tweet Composer
• Keybinding (e.g. t) opens compose modal
• User enters tweet text
• Executes:

bird tweet "<text>"
•	Display confirmation or error feedback

2️⃣ Reply Support
• Select tweet → press r
• Open reply modal
• Execute:

bird reply <url> "<text>"
Show success/failure message

3️⃣ Read & Thread Viewer
• View individual tweet:

bird read <url>
•	View thread:
bird thread <tweet_id>
Render thread in scrollable panel
•	Support ↑ ↓ PgUp PgDn navigation

4️⃣ Search Support
• Open search modal (e.g. /)
• Execute:

bird search "<query>" -n <count>

Default to -n 5
• Render results in selectable list
• Press Enter to open selected tweet in detail view

Example:

bird search "from:steipete" -n 5

5️⃣ Mentions View
• Keybinding (e.g. m) loads mentions
• Execute:

bird mentions -n 5

Display scrollable list of recent mentions
• Highlight new or unread mentions
• Allow opening selected mention in detail panel

UI / UX Requirements
• Clean Ratatui layout:
• Timeline/Search/Mentions list panel
• Detail view panel
• Modal overlay for compose/reply/search
• Non-blocking subprocess execution
• Loading indicator while Bird runs
• Proper error display:
• Missing auth variables
• Bird not installed
• Network failures

Technical Requirements
• Use async subprocess handling (avoid UI freezing)
• Capture stdout/stderr cleanly
• Parse Bird output for structured rendering (if JSON available)
• Abstract Bird integration behind a trait:

trait TwitterProvider {
    fn tweet(...)
    fn reply(...)
    fn read(...)
    fn thread(...)
    fn search(...)
    fn mentions(...)
}

This allows replacing Bird in the future without major refactor.

Environment Requirements
• Bird CLI installed and accessible in $PATH
• CT0 and AUTH_TOKEN provided via environment variables
• Fail gracefully if missing

Out of Scope
• Direct Twitter/X API integration
• OAuth implementation inside FeedTUI
• Media uploads
• Multi-account support (future enhancement)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions