An unofficial Trello CLI using Power-Up authentication, built with Bun for maximum performance. Features automated dependency management with Bun installation during setup.
- β‘ Ultra-fast: Built with Bun (10-50x faster than Node.js)
- π Power-Up Authentication: Compatible with Trello's newer authentication system
- πΎ Persistent Configuration: Automatically saves your token
- π― Interactive Interface: Intuitive menu with interactive prompts
- π Complete Management: Boards, lists, cards with detailed information
- βοΈ CRUD Operations: Create, read, update, and delete cards
- π¦ Move Cards: Between lists in the same board
- π Detailed Views: Show comprehensive board and card details
- π Multiple Output Formats: Table, JSON, CSV formats
- π·οΈ Rich Metadata: Labels, members, checklists, and attachments support
- π οΈ Traditional CLI: Also works as a command-line tool
- π Internationalization: Support for Portuguese (pt-BR) and English (en) with auto-detection
- π€ Automated CI/CD: Semantic versioning and NPM publishing on every release
- π§ͺ Quality Gates: 95% test coverage threshold enforced in CI/CD
- π Secure Publishing: NPM provenance with GitHub Actions OIDC
- Node.js 16+ (Required)
- Bun (Required) - Deve ser instalado separadamente
- Trello account with Power-Up enabled
- Supported Platforms: Linux, macOS, Windows
O CLI requer Bun para funcionar. Instale-o primeiro:
# 1. Instale o Bun primeiro
curl -fsSL https://bun.sh/install | bash
# ou no Windows: powershell -c "irm bun.sh/install.ps1 | iex"
# 2. Instale o CLI
npm install -g trello-cli-unofficial
# 3. Use
tcu --versionReady to use immediately!
tcu --version
Para usuΓ‘rios Windows, primeiro instale o Bun, depois o CLI:
# 1. Instale o Bun
powershell -c "irm bun.sh/install.ps1 | iex"
# 2. Instale o CLI
npm install -g trello-cli-unofficial
# 3. Use
tcu --versionNota: No Windows, vocΓͺ pode precisar reiniciar o terminal apΓ³s instalar o Bun.
# Clone the repository
git clone https://github.com/JaegerCaiser/trello-cli-unofficial.git
cd trello-cli-unofficial
# Install dependencies
bun install
# Install globally (optional)
bun linkOn first run, the CLI will guide you through setup:
# Run the CLI
tcu
# Or if running from source
bun run main.tsThe CLI will ask for your Trello token. To get it:
- Go to https://trello.com/power-ups/admin
- Create a new Power-Up or use an existing one
- Copy the "API Key" and generate a token
- Paste the token when prompted (starts with
ATTA...)
# Configure token interactively
tcu setup
# View current configuration
tcu configThe token is automatically saved in ~/.trello-cli-unofficial/config.json:
{
"apiKey": "630a01228b85df706aa520f3611e6490",
"token": "ATTA..."
}You can configure the CLI using environment variables instead of the configuration file:
# Copy the example file
cp .env.example .env
# Edit with your credentials
nano .envAvailable environment variables:
TRELLO_API_KEY: Your Trello API key (optional, defaults to built-in key)TRELLO_TOKEN: Your Trello token (optional, will be prompted if not set)
Example .env file:
# Trello CLI Unofficial - Environment Variables
TRELLO_TOKEN=ATTA...
TRELLO_API_KEY=your-custom-api-keySecurity Note: Never commit your .env file to version control. The .env.example file contains safe defaults.
The CLI automatically detects your system language and displays messages in the appropriate language.
- π§π· Portuguese (pt-BR) - Default for Portuguese-speaking systems
- πΊπΈ English (en) - Default for other systems
The language is automatically detected from your system's LANG environment variable:
# Force Portuguese
LANG=pt_BR.UTF-8 tcu
# Force English
LANG=en_US.UTF-8 tcuimport { changeLanguage } from "trello-cli-unofficial";
// Switch to Portuguese
changeLanguage("pt-BR");
// Switch to English
changeLanguage("en");# Start interactive mode
tcu
# Or the full command name
trello-cli-unofficialMain menu options:
- π View my boards
- π Explore board
- β Create card
- βοΈ Settings
- πͺ Exit
# View all boards
tcu boards list
# Show detailed board information
tcu boards show <boardId>
# View lists in a board
tcu lists list <boardId>
# View cards in a list
tcu cards list <listId>
# Show detailed card information
tcu cards show <cardId>
# Create a new card
tcu cards create <listId> <name> [--desc "description"]
# Update an existing card
tcu cards update <cardId> --name "new name" [--desc "new description"]
# Move a card to another list
tcu cards move <cardId> --to <listId>
# Delete a card
tcu cards delete <cardId>
# Start interactive mode
tcu interactive
# Configure token
tcu setup
# Show version
tcu --version
# Output format options (available for most commands)
tcu boards list --format json
tcu boards list --format csv
tcu boards list --format table # defaultThe CLI uses a hierarchical subcommand structure for better organization:
tcu [command] [subcommand] [options] [arguments]
-
boards- Manage Trello boardslist- List all boardsshow <boardId>- Show detailed board informationcreate <name>- Create a new boarddelete <boardId>- Delete a board
-
lists- Manage Trello listslist <boardId>- List all lists in a boardcreate <boardId> <name>- Create a new listdelete <listId>- Delete a listmove <listId> <position>- Move list to new position
-
cards- Manage Trello cardslist <listId>- List all cards in a listshow <cardId>- Show detailed card informationcreate <listId> <name>- Create a new cardupdate <cardId>- Update an existing cardmove <cardId>- Move card to another listdelete <cardId>- Delete a card
-
config- Configuration managementsetup- Configure Trello tokenshow- Display current configuration
--format <format>- Output format:table(default),json,csv--help- Show help for any command--version- Show CLI version
# Start interactive menu
tcu
# Or explicitly
tcu interactive# List all your boards
tcu boards list
# Show detailed information about a specific board
tcu boards show 60d5ecb74e2b8c3b8c8c8c8c
# Export boards to JSON
tcu boards list --format json
# Export boards to CSV
tcu boards list --format csv# List all lists in a board
tcu lists list 60d5ecb74e2b8c3b8c8c8c8c# List all cards in a list
tcu cards list 60d5ecb74e2b8c3b8c8c8c8d
# Show detailed information about a card
tcu cards show 60d5ecb74e2b8c3b8c8c8c8e
# Create a new card
tcu cards create 60d5ecb74e2b8c3b8c8c8c8d "Implement new feature" --desc "Add support for card templates"
# Update an existing card
tcu cards update 60d5ecb74e2b8c3b8c8c8c8e --name "Updated feature name" --desc "Updated description"
# Move a card to another list
tcu cards move 60d5ecb74e2b8c3b8c8c8c8e --to 60d5ecb74e2b8c3b8c8c8c8f
# Delete a card
tcu cards delete 60d5ecb74e2b8c3b8c8c8c8e# Interactive mode
tcu
# Select "β Create card"
# Choose board β list β enter name and description# Interactive mode
tcu
# Select "π Explore board"
# Choose board β list β see cards
# Optionally: edit, delete, or move cards# Show detailed information about a card, including checklists, members, labels and attachments
tcu cards show <cardId># Table format (default)
tcu boards list
# JSON format
tcu boards list --format json
# CSV format
tcu boards list --format csv
# All formats work with most commands
tcu cards list <listId> --format json
tcu lists list <boardId> --format csvDuring the transition period, the CLI maintains backward compatibility with older command formats. These legacy commands will show deprecation warnings but continue to work:
# Legacy commands (show deprecation warnings)
tcu boards # β Use "tcu boards list" instead
tcu lists legacy <boardName> # β Use "tcu lists list <boardId>" instead
tcu cards legacy <boardName> <listName> # β Use "tcu cards list <listId>" instead
# Legacy card management commands
tcu create-card <boardName> <listName> <cardName>
tcu move-card <cardId> <listName>
tcu delete-card <cardId>| Old Command | New Command | Status |
|---|---|---|
tcu boards |
tcu boards list |
|
tcu lists <boardName> |
tcu lists list <boardId> |
|
tcu cards <boardName> <listName> |
tcu cards list <listId> |
|
tcu create-card <boardName> <listName> <name> |
tcu cards create <listId> <name> |
|
tcu move-card <cardId> <listName> |
tcu cards move <cardId> --to <listId> |
|
tcu delete-card <cardId> |
tcu cards delete <cardId> |
Migration Timeline:
- Current: Legacy commands work with deprecation warnings
- Future: Legacy commands will be removed (TBD)
The new command structure provides:
- Better organization with hierarchical subcommands
- Improved discoverability with
tcu <command> --help - Consistency with modern CLI patterns
- Future extensibility for additional subcommands
This project uses automated CI/CD with semantic versioning based on commit messages:
feat:commits β Minor version bump (0.5.0 β 0.6.0)fix:commits β Patch version bump (0.5.0 β 0.5.1)BREAKING CHANGE:in commit body β Major version bump (0.5.0 β 1.0.0)- Other commits (docs, test, chore) β No release
Every push to main branch triggers:
- CI Pipeline: Linting, type checking, tests, coverage, and build
- Release Pipeline: Automatic version bump based on commit message
- NPM Publishing: Package published with provenance and signed builds
- GitHub Release: Automatic release notes and changelog
# Feature commit (minor version bump)
git commit -m "feat: add new card templates"
# Bug fix (patch version bump)
git commit -m "fix: handle network timeouts gracefully"
# Breaking change (major version bump) - Method 1
git commit -m "feat!: redesign authentication flow"
# Breaking change (major version bump) - Method 2
git commit -m "feat: redesign authentication flow
BREAKING CHANGE: token format changed from legacy API to Power-Up"
# Non-releasing commits
git commit -m "docs: update installation guide"
git commit -m "test: add integration tests"
git commit -m "chore: update dependencies"Important: Version bumps are automatic and based on the commit message when merged to main, not PR titles or descriptions.
trello-cli-unofficial/
βββ src/
β βββ domain/ # Business logic & entities
β βββ application/ # Use cases & orchestration
β βββ infrastructure/ # External implementations
β βββ presentation/ # CLI controllers & UI
βββ tests/ # Test suite (57 tests)
βββ .github/workflows/ # CI/CD pipelines
βββ main.ts # Entry point
βββ package.json # Dependencies & scripts
βββ README.md # This documentation
commander: CLI frameworkinquirer: Interactive promptsfs-extra: File operationsdotenv: Environment variables
# Run locally
bun run main.ts
# Development with watch mode
bun run --watch main.ts
# Build for production
bun run build
# Run tests
bun test
# Run tests with coverage
bun test:coverage
# Validation (lint + typecheck + test)
bun run validate
# Type checking only
bun run typecheck
# Linting only
bun run lintThe CLI follows Domain-Driven Design principles with clear separation of concerns:
src/
βββ domain/ # Business logic & entities
β βββ entities/ # Board, List, Card entities
β βββ repositories/ # Repository interfaces
β βββ services/ # Domain services (Authentication)
βββ application/ # Use cases & business logic
β βββ use-cases/ # Business operations
βββ infrastructure/ # External implementations
β βββ repositories/ # Trello API, File system implementations
β βββ external/ # External service integrations
βββ presentation/ # CLI interface layer
β βββ cli/ # Command controllers & UI
βββ shared/ # Cross-cutting concerns
βββ ErrorHandler.ts
βββ OutputFormatter.ts
βββ types.ts
To extend the CLI with new functionality:
- Create a Use Case in
src/application/use-cases/ - Implement Repository Interface if needed
- Add Controller Method in appropriate CLI controller
- Register Command in
CommandController.ts - Add Tests following the existing pattern
The CLI supports multiple output formats through the OutputFormatter class:
- Table: Human-readable tabular output (default)
- JSON: Machine-readable structured data
- CSV: Spreadsheet-compatible format
All formatters handle complex nested data structures automatically.
This project includes tools for testing cross-platform compatibility during development:
# Run comprehensive cross-platform tests
bun run test:cross-platform
# This will test:
# β
Build process
# β
Installation process
# β
CLI functionality (--version, --help)
# β
File system operations
# β
Environment variable handling
# β
Platform-specific features# Test build process only
bun run test:build
# Test installation process
bun run test:install
# Quick smoke tests
bun run test:smokeFor comprehensive testing across platforms, use Docker containers:
# Test on all platforms (Linux + Windows when available)
npm run test:docker
# Test specific platforms
npm run test:docker:ubuntu # Ubuntu Linux
npm run test:docker:alpine # Alpine Linux
npm run test:docker:windows # Windows (requires Windows host or WSL2)Platform Support:
- β Linux: Ubuntu 22.04, Ubuntu 20.04, Alpine Linux
- β Windows: Windows Server Core 2022 (via Docker Desktop)
- β macOS: Tested via GitHub Actions CI/CD
Requirements:
- Docker Desktop installed
- 4GB+ RAM allocated to Docker
- For Windows containers: Windows 10/11 Pro+ or WSL2
See WINDOWS_TESTING.md for detailed Windows setup instructions.
When testing on Windows, verify these scenarios:
-
Installation Methods:
# Method 1: NPM global install npm install -g trello-cli-unofficial # Method 2: From source bun install bun link # or bun run install-global
-
Command Availability:
# Test both command names tcu --version trello-cli-unofficial --version # Test in different terminals # - Command Prompt (cmd) # - PowerShell # - Windows Terminal
-
PATH Configuration:
# Check if commands are in PATH where tcu where trello-cli-unofficial # Refresh environment (PowerShell) $env:Path = [System.Environment]::GetEnvironmentVariable("Path","Machine") + ";" + [System.Environment]::GetEnvironmentVariable("Path","User")
-
File System Operations:
- Config directory creation:
%USERPROFILE%\.trello-cli-unofficial\ - File read/write permissions
- Path separator handling (
\vs/)
- Config directory creation:
-
Environment Variables:
TRELLO_TOKENhandling- Language detection (
LANG,LC_ALL, etc.) - Node.js/Bun path resolution
| Issue | Symptom | Solution |
|---|---|---|
| PATH not updated | tcu command not found |
Restart terminal or run refreshenv |
| Permission denied | Installation fails | Run as Administrator |
| Antivirus blocking | Installation interrupted | Temporarily disable or whitelist |
| Node version conflicts | Runtime errors | Use Node 18+ or Bun 1.0+ |
- Token saved locally in protected file (
~/.trello-cli-unofficial/config.json) - No data sent to external servers
- Uses HTTPS for all Trello API communications
- Compatible with Trello's Power-Up authentication
- NPM packages published with provenance attestation
- Verify the token is correct and starts with
ATTA - Confirm the Power-Up has necessary permissions
- Try generating a new token from trello.com/power-ups/admin
- Check your internet connection
- Confirm
api.trello.comis accessible - Try again in a few minutes
- Check write permissions in
~/.trello-cli-unofficial/ - Run as user with appropriate permissions
- Try running
tcu setupagain
- Runtime Required: Ensure Bun or Node.js 16+ is installed
- Package Manager Fallback: Try
npm install -g trello-cli-unofficialif Bun fails - PATH Issues: Check that
tcucommand is in your PATH - Permission Issues: Try running as administrator/sudo
- PATH not updated: Restart your terminal or run
refreshenvin PowerShell - Permission errors: Run PowerShell/Command Prompt as Administrator
- Node.js version: Ensure you have Node.js 16+ or Bun 1.0+
- Antivirus blocking: Some antivirus software may block global NPM installations
Contributions are welcome! Please read our Contributing Guide before submitting PRs.
- Fork the project
- Create a feature branch (
git checkout -b feature/AmazingFeature) - Commit your changes using conventional commits (
git commit -m 'feat: add some amazing feature') - Run the tests (
bun run validate) - Push to the branch (
git push origin feature/AmazingFeature) - Open a Pull Request
# Clone and setup
git clone https://github.com/JaegerCaiser/trello-cli-unofficial.git
cd trello-cli-unofficial
bun install
# Run tests
bun test
# Start development
bun run --watch main.tsThis project is licensed under the MIT License - see the LICENSE file for details.
- Trello API - Official Trello REST API
- Bun - Ultra-fast JavaScript runtime
- Inquirer - Interactive command-line interface
- Commander - CLI framework for Node.js
- GitHub Actions - CI/CD automation
- π 195 tests passing (100% coverage)
- π¦ Clean Domain-Driven Design architecture
- π¨ ESLint + TypeScript strict mode
- β‘ Performance optimized with Bun
- π€ Automated CI/CD with semantic versioning
- π Secure publishing with NPM provenance
- π Internationalization (pt-BR/en)
- π Multiple output formats (table/json/csv)
- ποΈ Hierarchical command structure
Note: This is an unofficial project and is not affiliated with Atlassian or Trello.
Made with β€οΈ, Bun, and automated CI/CD