Tasky is a comprehensive task management system that provides both a command-line interface (CLI) and a RESTful API for managing your tasks. Built with Python, it offers seamless synchronization between local storage and a server, ensuring your tasks are always backed up and accessible across devices.
- Dual Interface: Use either the intuitive CLI or the RESTful API
- Real-time Synchronization: Sync tasks between local storage and server
- Rich CLI Experience: Beautiful table formatting with rich terminal output
- Persistent Storage: Local JSON storage with server backup
- Task Management: Add, list, mark complete, and sync tasks
- Cross-platform: Works on Windows, macOS, and Linux
Tasky is designed as a lightweight yet powerful task management solution that can work both offline and online. The CLI provides a fast, terminal-based interface for daily task management, while the API server enables synchronization and multi-device access.
- CLI Component: Built with Typer for command-line interface and Rich for beautiful terminal output
- API Server: FastAPI-based RESTful service for task synchronization
- Storage: JSON-based storage for both local (CLI) and server-side persistence
- Sync Protocol: Simple push/pull/fetch operations for data synchronization
Tasky offers two main deployment approaches to suit different use cases and preferences:
Deploy the API server on a remote server or cloud service for multi-device access and centralized management.
Start the server locally and use the CLI for personal task management without external dependencies.
Choose the approach that best fits your workflow and infrastructure needs.
- Python 3.8 or higher
- pip (Python package manager)
git clone <repository-url>
cd taskypip install -r requirements.txt# Test CLI
python -m app.cli.tasky --help
# Test API server (in a separate terminal)
python -m app.api.mainThe CLI provides an intuitive interface for managing tasks locally. All commands are accessible through the main tasky script.
Add a new task:
python -m app.cli.tasky add "Buy groceries"
python -m app.cli.tasky add "Finish project report"List all tasks:
python -m app.cli.tasky listMark tasks as complete:
# Mark task #1 as complete
python -m app.cli.tasky done 1
# Mark multiple tasks (run commands sequentially)
python -m app.cli.tasky done 2
python -m app.cli.tasky done 3Push local tasks to server:
python -m app.cli.tasky push <username>Pull tasks from server (replaces local tasks):
python -m app.cli.tasky pull <username>Fetch server tasks to separate file:
python -m app.cli.tasky fetch <username>The API server provides RESTful endpoints for task synchronization.
# Start the development server
python -m app.api.main
# The server will start on http://127.0.0.1:8000
# API documentation available at http://127.0.0.1:8000/docs| Method | Endpoint | Description | Parameters |
|---|---|---|---|
| POST | /push |
Push tasks to server | username (query), JSON payload |
| GET | /pull |
Pull tasks from server | username (query) |
| GET | /fetch |
Fetch tasks from server | username (query) |
Push tasks to server:
curl -X POST "http://127.0.0.1:8000/push?username=batman" \
-H "Content-Type: application/json" \
-d '{
"tasks": [
{
"id": "123e4567-e89b-12d3-a456-426614174000",
"title": "Complete README",
"created_at": "2025-07-30T10:00:00+00:00",
"updated_at": "2025-07-30T10:00:00+00:00",
"completed": false
}
]
}'Pull tasks from server:
curl "http://127.0.0.1:8000/pull?username=batman"Deploy the API server on a remote server or cloud service for multi-device access and centralized task management.
-
Prepare Your Server
# Install Python and dependencies sudo apt update sudo apt install python3-pip python3-venv # Create a dedicated user (recommended) sudo adduser tasky sudo su - tasky
-
Clone and Install
git clone <repository-url> cd tasky python3 -m venv venv source venv/bin/activate pip install -r requirements.txt
-
Configure Environment Variables
# Create a .env file echo "HOST=0.0.0.0" > .env echo "PORT=8000" >> .env echo "RELOAD=false" >> .env
-
Set Up Reverse Proxy (Optional but Recommended)
# Using Nginx as example sudo apt install nginx sudo nano /etc/nginx/sites-available/taskyNginx configuration:
server { listen 80; server_name your-domain.com; location / { proxy_pass http://127.0.0.1:8000; proxy_set_header Host $host; proxy_set_header X-Real-IP $remote_addr; } }
-
Start the Server
# Using uvicorn directly python3 -m uvicorn app.api.main:app --host 0.0.0.0 --port 8000 # Or using systemd for production sudo systemctl start tasky sudo systemctl enable tasky
| Variable | Default | Description |
|---|---|---|
HOST |
127.0.0.1 |
Bind address (use 0.0.0.0 for external access) |
PORT |
8000 |
Port to run the server on |
RELOAD |
true |
Enable auto-reload during development |
- Firewall Configuration: Ensure ports 80/443 (HTTP/HTTPS) and 8000 (direct API) are open
- Security: Use HTTPS in production with valid SSL certificates
- Accessibility: Configure your domain DNS to point to the server IP
- Authentication: Consider adding authentication middleware for production use
Run both the server and CLI locally for personal use and development.
# Start the development server
python -m app.api.main
# The server will start on http://127.0.0.1:8000
# API documentation available at http://127.0.0.1:8000/docs# All CLI commands work with local server
python -m app.cli.tasky add "Buy groceries"
python -m app.cli.tasky list
python -m app.cli.tasky push <username>
python -m app.cli.tasky pull <username>The CLI uses two JSON files for storage:
app/cli/store.json: Local task storageapp/cli/server.json: Server-fetched task storage (for comparison)
Configure CLI for Remote Server:
# In app/cli/tasky.py, modify the API variable
API = "https://your-domain.com" # Remote server
# OR
API = "http://your-server-ip:8000" # Direct IP accessConfigure CLI for Local Server:
# Default local configuration
API = "http://127.0.0.1:8000" # Local developmentThe API server stores user data in:
app/api/data/: Directory containing user-specific JSON files- Files are named
<username>.jsonfor each user
You can configure the API endpoint by modifying the API variable in app/cli/tasky.py:
# Local development
API = "http://127.0.0.1:8000"
# Remote server
API = "https://your-domain.com"
# OR
API = "http://your-server-ip:8000"# Terminal 1: Start local server
python -m app.api.main
# Terminal 2: Use CLI with local server
python -m app.cli.tasky add "Local task example"
python -m app.cli.tasky push myusername
python -m app.cli.tasky pull myusername# On your remote server
git clone <repository-url>
cd tasky
pip install -r requirements.txt
python -m uvicorn app.api.main:app --host 0.0.0.0 --port 8000
# On your local machine
# Configure CLI to point to remote server
python -m app.cli.tasky --help
python -m app.cli.tasky add "Remote task example"
python -m app.cli.tasky push myusername
python -m app.cli.tasky pull myusername# Create requirements.txt with gunicorn
echo "gunicorn" >> requirements.txt
# Create Procfile
echo "web: gunicorn app.api.main:app" > Procfile
# Deploy to Heroku
heroku create your-app-name
git push heroku main
heroku opentasky/
βββ app/
β βββ __init__.py
β βββ models.py # Pydantic models and utilities
β βββ example.py # Usage examples
β βββ api/
β β βββ __init__.py
β β βββ main.py # FastAPI server implementation
β β βββ data/ # User data storage
β β βββ batman.json # Example user data
β βββ cli/
β βββ __init__.py
β βββ tasky.py # CLI implementation
β βββ store.json # Local task storage
β βββ server.json # Server-fetched tasks
βββ requirements.txt # Python dependencies
βββ projectDesign.md # Original design document
βββ README.md # This file
# Run CLI tests
python -m app.cli.tasky list
# Test API endpoints
python -m app.api.main
# Then visit http://127.0.0.1:8000/docs for interactive testing- CLI Features: Modify
app/cli/tasky.py - API Features: Modify
app/api/main.py
Tasks are stored in JSON format with the following structure:
[
{
"id": "uuid-string",
"title": "Task description",
"created_at": "2025-07-30T10:00:00+00:00",
"updated_at": "2025-07-30T10:00:00+00:00",
"completed": false
}
]We welcome contributions! Here's how you can help:
- Fork the repository
- Create a feature branch:
git checkout -b feature-name - Make your changes
- Test thoroughly
- Submit a pull request
- Follow PEP 8 Python style guidelines
- Use meaningful variable and function names
- Add docstrings for new functions and classes
- Keep functions focused and single-purpose
- Test CLI commands manually
- Verify API endpoints work correctly
- Test synchronization between CLI and API
- Ensure backward compatibility
- Update README.md for new features
- Add inline comments for complex logic
- Update docstrings for API changes
When reporting issues, please include:
- Operating system and Python version
- Steps to reproduce the issue
- Expected vs actual behavior
- Error messages (if any)
CLI not found:
# Ensure you're in the project root
cd /path/to/tasky
python -m app.cli.tasky --helpAPI server won't start:
# Check if port 8000 is available
lsof -i :8000
# Try a different port
python -m uvicorn app.api.main:app --port 8080Sync failures:
- Ensure the API server is running
- Check network connectivity
- Verify username parameter is provided
Permission errors:
# Ensure write permissions for data directories
chmod -R 755 app/cli/
chmod -R 755 app/api/data/This project is open source and available under the MIT License.
For questions or support:
- Open an issue on GitHub
- Check existing documentation
- Review the project design document:
projectDesign.md
Happy tasking with Tasky! π