A powerful command-line interface (CLI) for interacting with Trello. Manage your boards, lists, cards, and labels without leaving the terminal.
pip install trello-tools
trello-tools --helpNo Python required! Download the latest trello-tools.exe from GitHub Releases.
git clone https://github.com/jhaisley/trello-tools.git
cd trello-tools
pip install -e .This CLI provides a comprehensive set of commands to manage your Trello boards. It's built with Python, Typer, and the py-trello library. It also includes a feature to automatically label cards using the Gemini API.
This project started as a single-purpose utility called tlabeler to automatically label unlabeled Trello cards using AI. This helped with personal organization and sorting. After others saw its usefulness and wanted to use it, the project expanded to include more general-purpose commands for manual use and scripting.
The CLI has since been used for various purposes, including:
- Managing technical support tickets
- Tracking outages
- Creating boards for new clients and projects
- CI/CD remediation and integration
Given its wide range of uses, the project has been made public to be used by a wider audience.
- View all boards: List all your Trello boards with IDs
- Create new boards: Set up new projects instantly
- List management: View all lists on any board
- Board reporting: Generate activity reports
- Create cards: Add new cards to any list
- Move cards: Transfer cards between lists seamlessly
- Comment system: Add comments to cards for collaboration
- Bulk operations: Process multiple cards efficiently
- Manual labeling: Apply labels to unlabeled cards in bulk
- AI-powered labeling: Automatically categorize cards using Google Gemini AI
- Label management: Create, delete, and organize labels
- Intelligent suggestions: Get context-aware label recommendations
- Google Gemini integration: Leverage AI for intelligent card processing
- Automatic categorization: Smart labeling based on card content
- Context understanding: AI analyzes card titles and descriptions
- Batch processing: Handle multiple cards with AI assistance
- Easy API setup: Simple configuration for Trello and Gemini APIs
- Default boards: Set frequently-used boards as defaults
- Secure storage: API keys stored securely in local database
- Environment support: Load configuration from
.envfiles
- Automated archiving: Archive inactive cards based on age
- Export functionality: Backup boards to Loomic format
- Database management: Local SQLite database for settings
- Comprehensive help: Built-in help system for all commands
- PyPI package:
pip install trello-tools - Standalone executable: No Python required (~40MB)
- Source installation: Full development setup
- Cross-platform: Works on Windows, macOS, and Linux
pip install trello-tools
trello-tools --helpDownload the latest trello-tools.exe (~40MB) from GitHub Releases:
- Go to Releases
- Download
trello-tools.exefrom the latest release - Run it directly:
trello-tools.exe --help
Perfect for users who don't have Python installed!
# Clone the repository
git clone https://github.com/jhaisley/trello-tools.git
cd trello-tools
# Install with uv (recommended for development)
uv sync
uv run trello-tools --help
# Or install with pip
pip install -e .
trello-tools --helpBefore you can use the Trello CLI, you need to configure your Trello API credentials and, optionally, your Gemini API key.
-
Get your API Key and Token:
- Go to https://trello.com/app-key to get your API key.
- From that page, you can also generate a token.
-
Set your credentials: You can set your credentials in two ways:
-
Using the
config trellocommand:trello-tools config trello
You will be prompted to enter your API key, API secret, and token.
-
Using a
.envfile: Create a.envfile in your home directory (~/.env) with the following content:TRELLO_API_KEY="your_api_key" TRELLO_API_SECRET="your_api_secret" TRELLO_TOKEN="your_token"Then, load the configuration:
trello-tools config load
-
-
Get your API Key:
- Go to https://makersuite.google.com/ to get your Gemini API key.
-
Set your API key:
trello-tools config gemini
You will be prompted to enter your API key.
You can set a default board to avoid having to specify the board ID for every command.
-
Find your board ID: You can find your board ID by running:
trello-tools boards show
The board ID is the long string of characters after the board name.
-
Set the default board:
trello-tools config set-default-board "your_board_id"
The Trello CLI is organized into several subcommands.
You can get help for any command or subcommand by using the --help flag.
trello-tools --help
trello-tools boards --help
trello-tools cards --help-
Show all boards:
trello-tools boards show
-
Create a new board:
trello-tools boards create "My New Board" -
List all lists on a board:
trello-tools boards lists --board-id "your_board_id"
-
Create a new card:
trello-tools cards create "your_list_id" "My New Card"
-
Move a card to another list:
trello-tools cards move "your_card_id" "your_new_list_id"
-
Add a comment to a card:
trello-tools cards comment "your_card_id" "This is a comment."
-
List all labels on a board:
trello-tools labels list --board-id "your_board_id" -
Create a new label:
trello-tools labels create "My New Label" "blue" --board-id "your_board_id"
-
Apply a label to all unlabeled cards:
trello-tools label "My Label" --board-id "your_board_id"
-
Automatically label cards using AI:
trello-tools ai-label --board-id "your_board_id" -
Archive inactive cards:
trello-tools archive --days 30 --board-id "your_board_id"
# Clone the repository
git clone https://github.com/jhaisley/trello-tools.git
cd trello-tools
# Install with uv (recommended)
uv sync
# Or install with pip
pip install -e .[dev]- Testing:
uv run pytestorpytest - Linting:
uv run ruff check . - Formatting:
uv run ruff format . - Type checking: Built into ruff
- Security scanning:
uv run bandit -r src/
# Build packages
uv build
# Build standalone executable
python build_executable.py
# Version management
uv run bump2version patch # or minor, major
# Full release process
python version_manager.py patch --releasetrello-tools/
βββ src/trello_cli/ # Main package code
βββ tests/ # Test suite
βββ dist/ # Built packages and executables
βββ build_executable.py # Executable building script
βββ version_manager.py # Version and release management
βββ VERSION_MANAGEMENT.md # Version management guide
βββ pyproject.toml # Project configuration
See VERSION_MANAGEMENT.md for detailed development workflows.
To run the tests, you will need to install the development dependencies and then run pytest:
pip install -e .[dev]
pytestContributions are welcome! Please feel free to submit a pull request.
- Fork the repository.
- Create a new branch (
git checkout -b feature/your-feature). - Make your changes.
- Commit your changes (
git commit -am 'Add some feature'). - Push to the branch (
git push origin feature/your-feature). - Create a new Pull Request.
This project is licensed under the MIT License - see the LICENSE file for details.
This project is not affiliated with, endorsed by, or in any way officially connected with Trello, Inc. or any of its subsidiaries or its affiliates. The official Trello website can be found at https://trello.com.