Skip to content

tomLadder/trello-cli

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

17 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

πŸ“‹ trello-cli

The command-line interface for Trello

Manage your Trello boards directly from the terminal. Built with TypeScript, powered by Bun.

πŸ“– Documentation β€’ Features β€’ Installation β€’ Quick Start β€’ Commands β€’ Contributing

Documentation Version License Bun TypeScript Platform


Features

Board Management

  • List, create, update, and delete boards
  • View board lists, cards, members, labels, checklists, and custom fields

Card Management

  • Create, update, archive, and delete cards
  • Move cards between lists
  • Add/remove comments, attachments, members, and labels
  • Template card support

List Management

  • Create, update, and archive lists
  • Archive or move all cards in a list

Label Management

  • Create, update, and delete labels on boards

Checklist Management

  • Create, update, and delete checklists on cards
  • Add, update, and remove check items
  • Mark items complete/incomplete

Custom Fields

  • Create and manage custom field definitions
  • Manage dropdown options for list-type fields
  • Set and clear custom field values on cards

Search

  • Search across boards and cards
  • Search for members

Developer Experience

  • JSON output for scripting and AI agents
  • LLMS.md guide for AI assistants
  • Beautiful terminal UI with spinners
  • Cross-platform compatibility

Installation

Quick Install (macOS / Linux)

curl -fsSL https://raw.githubusercontent.com/tomLadder/trello-cli/main/install.sh | sh

Pre-built binaries are also available on the Releases page.

From Source

Prerequisites: Bun v1.0 or higher

# Clone the repository
git clone https://github.com/tomLadder/trello-cli.git
cd trello-cli

# Install dependencies
bun install

# Build the standalone executable
bun run build

# Move to your PATH (optional)
mv dist/trello /usr/local/bin/

Development Mode

# Run directly without building
bun run dev -- --help

Quick Start

1. Get your API credentials

  1. Go to https://trello.com/power-ups/admin/ and create a Power-Up
  2. Navigate to API Key β†’ Generate a new API Key
  3. Generate a token using the authorization URL

See Trello API documentation for details.

2. Login to your account

trello login

You'll be prompted for your API key and token.

3. Check your identity

trello whoami

4. List your boards

trello boards

Commands

All commands are based on the Trello REST API. See the full documentation for detailed options and examples.

Authentication

Command Description
trello login Authenticate with Trello
trello logout Clear stored credentials
trello whoami Display current user info
trello status Check login status

Boards

Command Description
trello boards List your boards
trello boards get <id> Get board details
trello boards create <name> Create a new board
trello boards update <id> Update a board
trello boards delete <id> Delete a board
trello boards lists <id> List all lists on a board
trello boards cards <id> List all cards on a board
trello boards members <id> List all members of a board
trello boards labels <id> List all labels on a board
trello boards checklists <id> List all checklists on a board
trello boards custom-fields <id> List all custom fields on a board

Lists

Command Description
trello lists get <id> Get list details
trello lists create Create a new list
trello lists update <id> Update a list
trello lists cards <id> List cards in a list
trello lists archive-all-cards <id> Archive all cards in a list
trello lists move-all-cards <id> Move all cards to another list

Cards

Command Description
trello cards get <id> Get card details
trello cards create Create a new card
trello cards update <id> Update a card
trello cards delete <id> Delete a card
trello cards comments <id> List comments on a card
trello cards add-comment <id> Add a comment
trello cards update-comment <id> <commentId> Update a comment
trello cards delete-comment <id> <commentId> Delete a comment
trello cards attachments <id> List attachments
trello cards add-attachment <id> Add an attachment
trello cards delete-attachment <id> <attachmentId> Delete an attachment
trello cards members <id> List card members
trello cards add-member <id> <memberId> Add a member
trello cards remove-member <id> <memberId> Remove a member
trello cards add-label <id> <labelId> Add a label
trello cards remove-label <id> <labelId> Remove a label

Labels

Command Description
trello labels get <id> Get label details
trello labels create Create a new label
trello labels update <id> Update a label
trello labels delete <id> Delete a label

Checklists

Command Description
trello checklists get <id> Get checklist details
trello checklists create Create a new checklist
trello checklists update <id> Update a checklist
trello checklists delete <id> Delete a checklist
trello checklists items <id> List check items
trello checklists add-item <id> Add a check item
trello checklists remove-item <id> <itemId> Remove a check item
trello checklists update-item <cardId> <itemId> Update a check item

Custom Fields

Command Description
trello custom-fields get <id> Get field definition
trello custom-fields create Create a custom field
trello custom-fields update <id> Update a custom field
trello custom-fields delete <id> Delete a custom field
trello custom-fields options <id> List dropdown options
trello custom-fields add-option <id> Add a dropdown option
trello custom-fields delete-option <id> <optionId> Delete a dropdown option
trello custom-fields card-values <cardId> List values on a card
trello custom-fields set-value <cardId> <fieldId> Set a value on a card

Search

Command Description
trello search <query> Search boards and cards
trello search members <query> Search for members

Configuration

Command Description
trello config get Show all settings
trello config set <key> <value> Set a configuration value
trello config reset Reset to defaults
trello config path Show config file location

Global Options

All commands support:

Option Description
-h, --help Display help for the command
-V, --version Display CLI version (root command only)
--json Output as JSON (where supported)

Configuration

Configuration is stored in ~/.trello-cli/:

File Description
config.json Settings and API credentials

Available Settings

Key Values Default Description
outputFormat pretty, json pretty Default output format

Scripting & Automation

All commands support --json for machine-readable output:

# Get user info as JSON
trello whoami --json

# List boards as JSON
trello boards --json

# Create a card and get the ID
trello cards create -n "New task" -l <listId> --json | jq -r '.id'

# Search for cards
trello search "bug" --type cards --json

For AI agents, see LLMS.md for a comprehensive guide.


Architecture

src/
β”œβ”€β”€ index.ts              # CLI entry point
β”œβ”€β”€ api/
β”‚   β”œβ”€β”€ client.ts         # HTTP client with auth
β”‚   β”œβ”€β”€ auth.ts           # Authentication
β”‚   β”œβ”€β”€ boards.ts         # Board API
β”‚   β”œβ”€β”€ cards.ts          # Card API
β”‚   β”œβ”€β”€ checklists.ts     # Checklist API
β”‚   β”œβ”€β”€ customFields.ts   # Custom Fields API
β”‚   β”œβ”€β”€ labels.ts         # Label API
β”‚   β”œβ”€β”€ lists.ts          # List API
β”‚   └── search.ts         # Search API
β”œβ”€β”€ cli/
β”‚   └── commands/         # Command implementations
β”œβ”€β”€ store/
β”‚   └── config.ts         # Configuration management
└── types/
    └── index.ts          # TypeScript interfaces

Contributing

Contributions are welcome! Please feel free to submit a Pull Request.


FAQ

How do I get my API key and token?
  1. Visit https://trello.com/power-ups/admin/ and create a Power-Up
  2. Go to API Key β†’ Generate a new API Key
  3. Copy your API key
  4. Generate a token by visiting the authorization URL shown during trello login
  5. See Trello API docs for more details
Where are my credentials stored?

Your API key and token are stored in ~/.trello-cli/config.json with secure file permissions (0600). Never share this file.

Do tokens expire?

By default, the CLI requests tokens that never expire. You can revoke access anytime from your Trello account settings.


Acknowledgments


License

This project is licensed under the MIT License - see the LICENSE file for details.


Made with ❀️ in Austria

About

πŸ“‹ CLI for managing your Trello boards from the terminal

Resources

License

Stars

Watchers

Forks

Contributors