Skip to content
okkenPublic

About

Project task tracking / todo list

Resources

Stars

104 stars

Watchers

9 watching

Forks

Repository files navigation

cards

A small task tracker for the command line: what's next, who's on it, and what's done.

Use it on its own, with your cards in a file on your computer, or with the Cards web app, so your team shares one list from the terminal and the browser.

Installing

pip install cards

or, to keep it in its own environment:

uv tool install cards

It needs Python 3.10 or newer.

Usage

Here's a quick tour:

$ cards add a todo
$ cards add -o Brian another task
$ cards list

  ID   state   owner   summary
 ───────────────────────────────────
  1    todo            a todo
  2    todo    Brian   another task

$ cards update 1 -o Brian
$ cards start 1
$ cards

  ID   state     owner   summary
 ─────────────────────────────────────
  1    in prog   Brian   a todo
  2    todo      Brian   another task

$ cards finish 1
$ cards

  ID   state   owner   summary
 ───────────────────────────────────
  2    todo    Brian   another task

Done cards are hidden unless you ask for them:

$ cards list -s all

  ID   state   owner   summary
 ───────────────────────────────────
  1    done    Brian   a todo
  2    todo    Brian   another task

$ cards pause 2
$ cards details 2 --edit    # or add a card with details: cards add -d ...
$ cards

  ID   state     owner   summary
 ─────────────────────────────────────────
  2    paused    Brian   another task *

* has details: cards details ID

$ cards details 2
2: another task

Waiting on a reply from Anna.

$ cards delete 1
Delete card 1: a todo? [y/N]: y
$ cards list -s all

  ID   state     owner   summary
 ─────────────────────────────────────────
  2    paused    Brian   another task *

* has details: cards details ID

Cards you're not getting to soon can be parked on the Later list. cards and cards list show the Sooner list, and mention how many cards are waiting:

$ cards add rewrite the docs --later
$ cards

  ID   state     owner   summary
 ─────────────────────────────────────────
  2    paused    Brian   another task *

* has details: cards details ID

1 more on the Later list: cards list --later

$ cards list --later

  ID   state   owner   summary
 ───────────────────────────────────────
  3    todo            rewrite the docs

$ cards sooner 3      # move it back; `cards later ID` parks a card
$ cards list --all    # both lists, with a "list" column

Cards can be high, normal (the default) or low priority. High cards are listed first and low ones last, with a "priority" column when any card isn't normal:

$ cards add fix the login page -P high
$ cards update 3 --priority low

$ cards --help

 Usage: cards [OPTIONS] COMMAND [ARGS]...

 Cards is a small command line task tracking application.

╭─ Options ────────────────────────────────────────────────────────╮
│ --help          Show this message and exit.                      │
╰──────────────────────────────────────────────────────────────────╯
╭─ Commands ───────────────────────────────────────────────────────╮
│ add       Add a card to db.                                      │
│ comment   Add a comment to a card (web app only).                │
│ config    List the path to the Cards db.                         │
│ count     Return number of cards in db.                          │
│ delete    Remove card in db with given id (asks first).          │
│ details   Show a card's details (or edit them with --edit).      │
│ finish    Set a card state to 'done'.                            │
│ later     Move a card to the Later list.                         │
│ list      List open cards (use -s all to include done ones) on   │
│           the Sooner list (or --later, or --all).                │
│ pause     Set a card state to 'paused'.                          │
│ projects  List the team's projects, or add one (web app only).   │
│ sooner    Move a card back to the Sooner list.                   │
│ start     Set a card state to 'in prog'.                         │
│ update    Modify a card in db with given id with new info.       │
│ version   Return version of cards application                    │
╰──────────────────────────────────────────────────────────────────╯

Using the Cards web app

By default, cards are stored in a local file (~/cards_db, or CARDS_DB_DIR).

To use a team's cards on the Cards web app instead, set these. There's a step by step setup guide on the web app.

export CARDS_URL=https://cards.pythontest.com
export CARDS_TEAM=<team slug, as in /a/<team slug>/ in web app URLs>
export CARDS_API_KEY=<an API key from your profile page in the web app>

The commands work the same way. cards config shows which web app and team you're using. Owners are team members: use -o me, or a member's email or name. If an owner doesn't match anyone on the team, cards asks who you meant:

$ cards add fix the docs -o brain
'brain' isn't a team member. Did you mean Brian Okken? [y/N]: y

Comments

With the web app, cards can have comments, shown on the card's page and by cards details:

$ cards comment 42 waiting on the new logo
$ cards details 42

Projects

On the web app, a team can have several projects, each with its own Sooner and Later lists. Card numbers are unique across the team, so commands that act on one card, like cards start 42, work whatever project the card is in.

Listing and adding use the team's default project, unless you pick one with CARDS_PROJECT or -p (which wins):

$ export CARDS_PROJECT=website     # e.g. per code repo, with direnv
$ cards                            # the website project's open cards
$ cards add -p docs fix the typos  # add to another project
$ cards list -p all                # every project, with a project column
$ cards update 42 -p docs          # move a card to another project
$ cards projects                   # the team's projects and open card counts
$ cards projects add docs          # add a project

Projects are managed on the web app's Projects page too. They don't exist for local-file cards.

Learning pytest with cards

cards started as a teaching project, and it's still the example application in:

If you're following the course or the book, install the version it uses, so the code and output match. Version 3 added the web app, projects, the Later list and more.

About

Project task tracking / todo list

Resources

Stars

104 stars

Watchers

9 watching

Forks

Releases

Packages

Used by

Contributors

Languages