Skip to main content

CLI tool for managing Trello boards via the Trello REST API

Project description

trelctl

A CLI tool for managing Trello boards via the Trello REST API.

Installation

uv tool install trelctl

Or run directly without installing:

uvx trelctl

Setup

1. Get your Trello credentials

  • API Key: Go to trello.com/power-ups/admin, create a Power-Up, and copy the API key.
  • Token: From the same page, generate a token with read/write access to your boards.

2. Set environment variables

Copy .env.example to .env and fill in your credentials:

cp .env.example .env
TRELLO_API_KEY=your_trello_api_key_here
TRELLO_TOKEN=your_trello_oauth_token_here

Alternatively, export them in your shell:

export TRELLO_API_KEY=your_api_key
export TRELLO_TOKEN=your_token

Commands

create board

Create a new Trello board.

trelctl create board "My Board"

Output:

Created board: "My Board" (id: abc123)

import lists

Create lists in a board from a CSV file.

trelctl import lists --board "My Board" lists.csv
trelctl import lists --board "My Board" --dry-run lists.csv

CSV format:

Column Required Example
name Yes Backlog

Example lists.csv:

name
Backlog
In Progress
Done

--dry-run validates the file and resolves the board without creating anything.

import cards

Create cards in a board list from a CSV file.

trelctl import cards --board "My Board" --list "Backlog" cards.csv
trelctl import cards --board "My Board" --list "Backlog" --dry-run cards.csv

CSV format:

Column Required Format Example
name Yes Plain text Fix login bug
description No Plain text Steps to reproduce...
labels No Comma-separated label names Bug,High Priority
due_date No YYYY-MM-DD 2026-04-15
checklist No Pipe-separated items Write tests|Review PR|Deploy
members No Pipe-separated member IDs abc123def456|ghi789jkl0
  • Labels must already exist on the board. Unknown label names are skipped with a warning.
  • members values must be Trello member IDs (alphanumeric), not usernames or email addresses.
  • Column order does not matter. name is the only required column.

Example cards.csv:

name,description,labels,due_date,checklist,members
Fix login bug,Reproduce on mobile,Bug,2026-04-15,Write test|Fix bug|Deploy,
Add dark mode,,Enhancement,,,,

--dry-run validates the file, resolves the board, list, and labels, but creates nothing.

get lists

Export all lists from a board to CSV.

trelctl get lists --board "My Board"
trelctl get lists --board "My Board" > lists.csv

Output columns: name

get cards

Export all cards from a board (or a specific list) to CSV.

trelctl get cards --board "My Board"
trelctl get cards --board "My Board" --list "Backlog"
trelctl get cards --board "My Board" > cards.csv

Output columns: name, description, labels, due_date, checklist, members

The output uses the same format as import cards, so exported files can be re-imported.

get members

Export all members of a board to CSV.

trelctl get members --board "My Board"
trelctl get members --board "My Board" > members.csv

Output columns: name (Trello member IDs)

Board and list resolution

All --board and --list options accept either a name or an ID:

  • Name: matched case-insensitively against your boards/lists.
  • ID: used directly if no name match is found.

If neither matches, the command exits with an error.

Round-tripping

get cards output is compatible with import cards input, which allows you to export cards from one board and import them into another:

trelctl get cards --board "Source Board" > cards.csv
trelctl import cards --board "Target Board" --list "Backlog" cards.csv

Development

make install     # install dependencies
make test        # run tests
make lint        # run linters
make build       # build package

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

trelctl-1.1.1.tar.gz (35.6 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

trelctl-1.1.1-py3-none-any.whl (12.9 kB view details)

Uploaded Python 3

File details

Details for the file trelctl-1.1.1.tar.gz.

File metadata

  • Download URL: trelctl-1.1.1.tar.gz
  • Upload date:
  • Size: 35.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.14.3

File hashes

Hashes for trelctl-1.1.1.tar.gz
Algorithm Hash digest
SHA256 2fc19d4e8bad30012f02ca2afe92f337b18cb374683c2f07b21e15a3d453046b
MD5 9f0bb97766b39d4a58b3216363334c01
BLAKE2b-256 3465180a5e17d4f59f354dca6228d214011724132efcd0089cfc2a4860ea0ca1

See more details on using hashes here.

File details

Details for the file trelctl-1.1.1-py3-none-any.whl.

File metadata

  • Download URL: trelctl-1.1.1-py3-none-any.whl
  • Upload date:
  • Size: 12.9 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.14.3

File hashes

Hashes for trelctl-1.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 7d90addb4e8664c24483604e47c04b9cf8c50a090f61536f7972bab90cfc97ac
MD5 3df761ea7c73e3e082b0493062d29806
BLAKE2b-256 14fdc1d6520dd615bacf12ea14f0e42ac4bdce79e133ec4569b1c0dc51ea6713

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page