A powerful command-line interface for interacting with Trello boards, built in Go. View your assigned tasks, get detailed card information, and extract specific fields for automation and scripting.
- π Task Overview: List all cards assigned to you or view all cards on a board
- π¨ Beautiful Card Details: View full card information with markdown rendering
- π Field Extraction: Extract specific fields (title, description, assignees, etc.) for scripting
- π― Smart Filtering: Filter cards by lists with case-insensitive matching
- π Color Support: ANSI color output with CLICOLOR_FORCE support for piping
- π Secure Configuration: Store API credentials securely in user config directory
- Go 1.21 or later
- Trello API Key and Token
git clone <repository-url>
cd trello_cli
go build -o trello_cli .- Visit Trello Developer API Keys
- Copy your API Key
- Click "Token" to generate an API Token
- Keep these credentials secure - they'll be stored in your config file
The application will guide you through initial configuration:
./trello_cliThis will prompt you to:
- Enter your Trello API Key
- Enter your Trello API Token
- Select your workspace/organization
- Select your board
Configuration is stored in: ~/.config/trello_cli/config.json
{
"api_key": "your-api-key-here",
"api_token": "your-api-token-here",
"workspace": "workspace-id",
"board_id": "board-id"
}You can also manually create the config file:
mkdir -p ~/.config/trello_cli
cat > ~/.config/trello_cli/config.json << EOF
{
"api_key": "your-api-key",
"api_token": "your-api-token",
"workspace": "your-workspace-id",
"board_id": "your-board-id"
}
EOF# Show cards assigned to current user (default)
./trello_cli
# Show all cards on the board
./trello_cli --all
# Show cards from specific lists
./trello_cli --lists "In Progress,Review"# View full card details with markdown rendering
./trello_cli --card 123
./trello_cli -c 123
# View card details with color preservation when piping
CLICOLOR_FORCE=1 ./trello_cli -c 123 | lessExtract specific fields for scripting and automation:
# Get just the title
./trello_cli -c 123 -f title
# Get just the description
./trello_cli -c 123 -f description
# Get assignees (full names)
./trello_cli -c 123 -f assignees
# Get labels
./trello_cli -c 123 -f labels
# Get list name
./trello_cli -c 123 -f list
# Get status (Open/Closed)
./trello_cli -c 123 -f status| Flag | Short | Description |
|---|---|---|
--assigned |
-a |
Show only cards assigned to current user (default) |
--all |
-A |
Show all cards on the board |
--lists <lists> |
-l <lists> |
Filter cards by specific lists (comma-separated) |
--card <id> |
-c <id> |
Show detailed information for a specific card |
--field <field> |
-f <field> |
Extract specific field from card (use with -c) |
title- Card titledescription- Card descriptionassignees- Comma-separated list of assignee full nameslabels- Comma-separated list of label nameslist- Name of the list/column the card is instatus- Card status (Open/Closed)link- Direct link to card on Trello website
# Basic usage
./trello_cli # Show assigned cards
./trello_cli --all # Show all cards
./trello_cli -a # Short form for assigned
# List filtering
./trello_cli -l "In Progress" # Cards in "In Progress" list
./trello_cli --lists "To Do,Done" # Multiple lists
./trello_cli --all -l "Backlog" # All cards in Backlog
# Card details
./trello_cli --card #123 # Card with ID 123
./trello_cli -c 456 # Same as above
./trello_cli -c #789 # With # prefix
# Field extraction
./trello_cli -c 123 -f title # Just the title
./trello_cli -c 123 -f description # Just the description
./trello_cli -c 123 -f assignees # Just assignees
./trello_cli -c 123 -f labels # Just labels
./trello_cli -c 123 -f list # Just list name
./trello_cli -c 123 -f status # Just status
./trello_cli -c 123 -f link # Just Trello link
# Color preservation
CLICOLOR_FORCE=1 ./trello_cli -c 123 | cat # Force colors
CLICOLOR_FORCE=1 ./trello_cli -c 456 | less # Colors in pager#123 Task Title Here In Progress
#456 Another Task To Do
#789 Final Task Done
- Cards are sorted by list name first, then by ID (ascending)
- Table uses fixed-width columns for proper alignment
- ID column fixed to 8 characters with proper padding
- Title column fixed to 80 characters with truncation when necessary
- Shows list name for each card
When viewing card details (-c flag), the output includes:
- Title: Formatted as heading
- Status: Open/Closed badge
- Description: Full description text
- Assignees: Full names (not IDs)
- Labels: All card labels
- List: Which column the card is in
- Comments: Recent comments with author and timestamp
- Links: Direct link to card on Trello
When using -f flag, only the raw field value is returned:
Implement User Authentication
John Smith, Jane Doe
Open
| Variable | Description |
|---|---|
CLICOLOR_FORCE=1 |
Force ANSI color output even when piping |
This application uses the Trello REST API:
- Base URL:
https://api.trello.com/1 - Authentication: API Key + Token
- Endpoints Used:
GET /members/me- Get current userGET /members/me/organizations- List organizationsGET /organizations/{id}/boards- List boardsGET /boards/{id}/cards- Get board cardsGET /boards/{id}/lists- Get board listsGET /cards/{id}- Get card detailsGET /cards/{id}/actions- Get card commentsGET /members/{id}- Get member details
"API credentials not found"
- Run the application without flags first to set up credentials
- Check that
~/.config/trello_cli/config.jsonexists and contains valid credentials
"Card with ID #123 not found"
- Verify the card ID exists on your selected board
- Try using just the number without the # prefix
No colors when piping
- Use
CLICOLOR_FORCE=1environment variable - Example:
CLICOLOR_FORCE=1 ./trello_cli -c 123 | less
"Unknown field" error
- Valid fields:
title,description,assignees,labels,list,status,link - Field names are case-insensitive
./trello_cli --help # Show available options- Fork the repository
- Create a feature branch
- Make your changes
- Add tests if applicable
- Submit a pull request
This project is open source. Please check the license file for details.
- β
Field-specific output with
-fflag - β Display assignee full names instead of IDs
- β CLICOLOR_FORCE support for piping
- β Enhanced markdown rendering
- β Fixed API integration for card details
- β Improved error handling