Skip to main content

trelloctl

PyPI version Python package

A command-line interface for Trello, written in Python.

Requirements

  • Python 3.11+

Installation

Simply run it via uv:

uvx trelloctl

Or install via pipx. Or manually via pip:

pip install trelloctl

Usage

Authentication

Before using the CLI, you need to authenticate with Trello:

  1. Go to the Trello Power-Up Admin Portal
  2. Create a new Power-Up (required even for personal use)
  3. Copy your API key from the Power-Up's "API Key" section
  4. Run the login command:
trelloctl auth login

The CLI will guide you through entering your API key and generating a token. Credentials are stored securely in your system keychain.

For an ephemeral or managed environment, set TRELLOCTL_API_KEY and TRELLOCTL_TOKEN instead. Environment values take precedence over the keyring and are never written to it. This supports credential gateways that replace placeholder query parameters at the network boundary.

To check your authentication status:

trelloctl auth status

To remove stored credentials:

trelloctl auth logout

Headless Systems

On a Linux server without a desktop environment there is usually no keychain available, and keyring will fail to store the credentials. Install the file-based backend from keyrings.alt alongside trelloctl:

uv tool install trelloctl --with keyrings.alt

If trelloctl is already installed, add --force to the command above. With pipx, run pipx inject trelloctl keyrings.alt instead.

Then select the backend, either per shell session:

export PYTHON_KEYRING_BACKEND=keyrings.alt.file.PlaintextKeyring

or permanently in ~/.config/python_keyring/keyringrc.cfg:

[backend]
default-keyring=keyrings.alt.file.PlaintextKeyring

Finally, log in by passing both values directly, which skips the browser prompts:

trelloctl auth login --api-key YOUR_KEY --token YOUR_TOKEN

The credentials are then written to ~/.local/share/python_keyring/keyring_pass.cfg. They are only base64-encoded, not encrypted, so restrict the permissions with chmod 600. There is also a keyrings.alt.file.EncryptedKeyring backend, but it asks for a master password on every command, which makes it impractical for cron jobs and scripts.

If you already use pass, install keyring-pass instead and set default-keyring=keyring_pass.PasswordStoreBackend to get proper GPG encryption.

Basic Command Examples

# List all boards
trelloctl board list

# List lists on a board (by name or ID)
trelloctl list list "My Board"
trelloctl list list Development

# List cards in a list
trelloctl list cards "To Do" --board Development

# Show board details
trelloctl board show Development

# Create a card
trelloctl card create "To Do" --board Development --name "New task"

# Move a card to another list
trelloctl card move <card_id> Done --board Development

# Output as JSON
trelloctl --format json board list

# Output as CSV
trelloctl --format csv board list

Names support partial matching (case-insensitive). If multiple items match, you'll be prompted to be more specific.

Command Reference

Global Options

Option Description
--format, -f Output format: table (default), json, csv, plain
--profile, -p Configuration profile to use (default: default)
--version Show version and exit
--help Show help and exit

trelloctl auth

Authentication commands.

Command Description
auth login Set up authentication with Trello
auth status Check authentication status
auth logout Remove stored credentials

trelloctl board

Board management commands.

Command Description
board list [--filter] List all accessible boards
board show <board> Show details of a board
board create --name <name> Create a new board
board close <board> Close (archive) a board
board delete <board> Delete a board permanently
board labels <board> List labels on a board
board members <board> List members of a board

trelloctl list

List management commands.

Command Description
list list <board> List all lists on a board
list show <list> --board <board> Show details of a list
list create <board> --name <name> Create a new list
list archive <list> --board <board> Archive a list
list cards <list> --board <board> List all cards in a list

trelloctl card

Card management commands.

Command Description
card show <card_id> Show details of a card
card create <list> --board <board> --name <name> Create a new card
card move <card_id> <target_list> --board <board> Move a card to another list
card update <card_id> [--name] [--description] [--due] Update a card
card archive <card_id> Archive a card
card delete <card_id> Delete a card permanently
card assign <card_id> <member_id> Assign a member to a card
card unassign <card_id> <member_id> Remove a member from a card
card comment <card_id> <text> Add a comment to a card
card comments <card_id> List comments on a card

trelloctl checklist

Checklist management commands.

Command Description
checklist list <card_id> List all checklists and items on a card
checklist create <card_id> --name <name> Create a checklist on a card
checklist delete <checklist_id> Delete a checklist
checklist add-item <checklist_id> --name <name> [--checked] [--member <member>] [--due <date>] [--due-reminder <minutes>] Add an item to a checklist
checklist check <card_id> <item_id> [--uncheck] Mark a checklist item as complete or incomplete
checklist assign <card_id> <item_id> <member> Assign a member to a checklist item
checklist unassign <card_id> <item_id> Remove the assigned member from a checklist item
checklist set-due <card_id> <item_id> <due> [--reminder <minutes>] Set or clear a checklist item's due date (null to clear)
checklist edit-item <card_id> <item_id> --name <name> Edit a checklist item's text
checklist delete-item <checklist_id> <item_id> Delete a checklist item

The <member> argument accepts a member ID, username, or full name (partial, case-insensitive matching), the same way board, list, and card names are resolved.

Per-item members and due dates (add-item --member/--due, assign, unassign, set-due) use Trello's advanced checklists, which require a paid Trello plan. On free plans the API accepts the request without error but does not store the value.

Multiple Profiles

You can use multiple Trello accounts by specifying a profile:

# Set up a work profile
TRELLOCTL_PROFILE=work trelloctl auth login

# Use the work profile
trelloctl --profile work board list

License

MIT License

Copyright (c) 2025 Werner Robitza

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

Metadata

Release files for trelloctl 0.5.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for trelloctl 0.5.0
File Size Uploaded
trelloctl-0.5.0.tar.gz 15.3 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for trelloctl 0.5.0
File Interpreter ABI Platform
trelloctl-0.5.0-py3-none-any.whl Python 3 none any Details

Total release size: 36.8 kB

Release files / trelloctl-0.5.0.tar.gz

Download URL trelloctl-0.5.0.tar.gz
Size 15.3 kB
Tags Source
SHA-256 checksum
How to use checksums
4d396f25a7fb2a0c6c21f96fe6e540825f7c24f6ac2576e7ab4b1bceeb6fb16c
BLAKE2b-256 checksum
How to use checksums
5dc75f09099e97d4501528535768b4789cbf00ebd32fa44fb1402c0a6e35b372
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.14.7

Release files / trelloctl-0.5.0-py3-none-any.whl

Download URL trelloctl-0.5.0-py3-none-any.whl
Size 21.5 kB
Tags Python 3
SHA-256 checksum
How to use checksums
97c02bfde119a458584ac4494887f16e5278a7679e870d65a3acbc1eb38fe576
BLAKE2b-256 checksum
How to use checksums
d9e397164b6900c4290601dff5640e9f69aecaa686895c6e80168aa90805cd75
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.14.7

Release history Release notifications | RSS feed

This release

0.5.0 This release

2 release files

0.4.0

2 release files

0.3.0

2 release files

0.2.3

2 release files

0.2.2

2 release files

0.2.1

2 release files

0.2.0

2 release files

0.1.0

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page