# Thought CLI A terminal UI for real-time streaming and posting to the ATProto network using `stream.thought.blip` records. Currently, this functions basically like IRC. I recommend entering the full TUI experience with ``` ./target/release/thought stream ``` ## Features - **Real-time TUI**: Live terminal interface showing all blips flowing through the network - **Interactive posting**: Post your thoughts directly from the TUI - **Jetstream integration**: Connect to the ATProto firehose for real-time updates - **Secure credentials**: Store your Bluesky credentials safely on your system - **Handle resolution**: Automatically resolve DIDs to readable handles - **Duplicate filtering**: Smart filtering to avoid showing your own posts twice ## Quick Start ### 1. Install ```bash cargo build --release ``` ### 2. Login ```bash ./target/release/thought login ``` Enter your Bluesky handle/email and app password when prompted. ### 3. Stream Your Thoughts ```bash ./target/release/thought stream ``` This launches the full TUI experience where you can see all blips in real-time and post your own. ## Commands ### thought The main CLI tool with multiple modes: ```bash # Login to Bluesky thought login # Post a single blip thought "Your thought here" # Enter simple REPL mode thought interactive # Enter full TUI mode with live feed thought stream # Logout and clear credentials thought logout ``` ## TUI Interface The terminal UI shows: - **Messages area**: Scrollable feed of all blips with timestamps - **Status bar**: Connection status and message count - **Input field**: Type your thoughts and press Enter to post ### TUI Controls - **Type + Enter**: Post a blip - **↑/↓**: Scroll through message history - **PageUp/PageDown**: Fast scroll - **Esc or Ctrl+C**: Exit TUI ## Installation ### Prerequisites - Rust 1.70+ - A Bluesky account with an app password ### From Source ```bash git clone git@tangled.sh:cameron.pfiffer.org/think cd think cargo build --release ``` The binary will be available at: - `target/release/thought` ### App Password Setup 1. Go to [Bluesky Settings](https://bsky.app/settings/app-passwords) 2. Generate a new app password 3. Use this password (not your main password) when running `thought login` ## Configuration Credentials are securely stored in your system's configuration directory: - **macOS**: `~/Library/Application Support/com.thoughtstream.think/` - **Linux**: `~/.config/thoughtstream/think/` - **Windows**: `%APPDATA%\thoughtstream\think\` ## Architecture - **ATProto Integration**: Uses the ATProto API for authentication and posting - **Jetstream Connection**: WebSocket connection to the real-time firehose - **Custom Records**: Posts using the `stream.thought.blip` record type - **TUI Framework**: Built with ratatui for a responsive terminal interface ## Examples ### Post a quick thought ```bash thought "Just built something cool!" ``` ### Start a streaming session ```bash thought stream # See all blips in real-time, post your own thoughts ``` ### Interactive REPL ```bash thought interactive # Enter multiple thoughts line by line ``` ## Development ### Building ```bash cargo build ``` ### Running Tests ```bash cargo test ``` ### Linting ```bash cargo clippy ``` ## Contributing This is part of the larger `stream.thought` ecosystem for decentralized social communication on ATProto. ## License MIT License - see LICENSE file for details.