Terminal User Interface for Second Brain Todo Application
Project description
Terminal Second Brain - TUI
🧠 A modern Terminal User Interface for managing your todos with style and efficiency.
Features
✨ Modern TUI Interface
- Clean, responsive terminal interface built with Textual
- Keyboard and mouse navigation support
- Real-time status updates and notifications
📋 Todo Management
- View all todos with visual status indicators
- Add new todos with input validation
- Mark todos as completed with a single click
- Automatic refresh and real-time updates
🔗 API Integration
- Seamless integration with Spring Boot backend
- Connection health monitoring
- Error handling and user feedback
- Configurable API endpoint
Prerequisites
- Python 3.10 or higher
- Spring Boot Todo API running on
http://localhost:8080
Installation
- Install dependencies using uv:
uv sync
- Or install manually with pip:
pip install textual httpx rich pydantic
Running the Application
- Ensure your Spring Boot backend is running:
# In the main project directory
gradle bootRun
- Start the TUI application:
# Using uv (recommended)
uv run main.py
# Or directly with Python
python main.py
Usage
Keyboard Shortcuts
| Key | Action |
|---|---|
q |
Quit application |
a |
Add new todo |
r |
Refresh todo list |
? |
Show help |
Esc |
Cancel/Go back |
Ctrl+S |
Save (in forms) |
Tab |
Navigate controls |
Enter |
Activate selected item |
Mouse Controls
- Click on a todo to select it
- Double-click to mark as complete (future feature)
- Use scroll wheel to navigate long lists
Visual Indicators
- ✅ Completed todos - Green checkmark
- ⭕ Pending todos - Yellow circle
- 🔄 Loading - Spinning indicator
- ❌ Errors - Red X with message
Configuration
The application can be configured through environment variables:
# API endpoint (default: http://localhost:8080)
export TODO_API_URL=http://your-api-server:8080
# Run the application
uv run main.py
Troubleshooting
Connection Issues
If you see a connection error:
- Check Backend Status: Ensure Spring Boot app is running
curl http://localhost:8080/actuator/health
- Verify API Endpoints: Test the API manually
curl http://localhost:8080/api/v1/todos
- Check Port Conflicts: Ensure port 8080 is available
Common Issues
- Import Errors: Run
uv syncto install dependencies - API Timeout: Check network connectivity and backend performance
- Display Issues: Ensure terminal supports Unicode and colors
Development
Project Structure
tui/
├── main.py # Main application entry point
├── api_client.py # HTTP client for backend API
├── todo_list.py # Todo list widget
├── add_todo_screen.py # Add todo form screen
├── config.py # Configuration and constants
├── pyproject.toml # Project dependencies
└── README.md # This file
Adding Features
The application is built with Textual widgets and follows a modular architecture:
- New Screens: Add in separate files, register in
SCREENSdict - New Widgets: Extend
textual.widgetsbase classes - API Methods: Add to
SyncTodoAPIClientclass - Styling: Update CSS in
main.pyor create separate CSS file
Contributing
- Fork the repository
- Create a feature branch
- Make your changes
- Test with the backend API
- Submit a pull request
License
This project is part of the Terminal Second Brain application. See the main project LICENSE for details.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file terminal_second_brain-0.0.1.tar.gz.
File metadata
- Download URL: terminal_second_brain-0.0.1.tar.gz
- Upload date:
- Size: 18.7 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.6.14
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
374844614d2a6f06155742eebdc7dceea90c7f2380787b38ad19a98421e66d5b
|
|
| MD5 |
84d657a3c3314828abbcc0581d57994d
|
|
| BLAKE2b-256 |
1d7a796663d39fc782e2e8cc32dde30235e053d220cfd5582a98597dc6e1c23f
|
File details
Details for the file terminal_second_brain-0.0.1-py3-none-any.whl.
File metadata
- Download URL: terminal_second_brain-0.0.1-py3-none-any.whl
- Upload date:
- Size: 26.5 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.6.14
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
53028ecc9e65d0550f366510cb53722a350fe7110a853850b0a9f6d9604be470
|
|
| MD5 |
84fdbd481cf5b088da55d624adf7cca7
|
|
| BLAKE2b-256 |
d48d18d623ac2b4d44a6b5d519a3d23758d46825134539d8ccd1b9d635f0451d
|