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 Pipe-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.2.0.tar.gz (37.8 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.2.0-py3-none-any.whl (15.3 kB view details)

Uploaded Python 3

File details

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

File metadata

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

File hashes

Hashes for trelctl-1.2.0.tar.gz
Algorithm Hash digest
SHA256 9b1a69c05e3a7721cd01bf5f460e1d2a0cfe7abfec6826185d28c12c5270e22b
MD5 cfc7a04e5f57a2a7cc7feade73dfca29
BLAKE2b-256 cbd8a6a5b8a103357117dec6651eb81a1e7b2e75e0d323ecd65d2aaf0ccc9d6c

See more details on using hashes here.

File details

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

File metadata

  • Download URL: trelctl-1.2.0-py3-none-any.whl
  • Upload date:
  • Size: 15.3 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.2.0-py3-none-any.whl
Algorithm Hash digest
SHA256 e3b5c19ccbd8370cb9b80b02864377e3c1fe12b20187c3cec3e4a860a2c1d1b1
MD5 130401fd6c47318bf83ad35b01a6f660
BLAKE2b-256 0cc0af520aa6d5a57c1778311102555787baf6bb351738cd2f726619c9961c38

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