Skip to content

Instantly share code, notes, and snippets.

Last active September 12, 2022 17:33
Show Gist options
  • Save CrookedNumber/8856939 to your computer and use it in GitHub Desktop.
Save CrookedNumber/8856939 to your computer and use it in GitHub Desktop.
How to create Trello Cards from the Command Line (with a ~10 minute set-up)
  1. This is quick and dirty and not terribly maintainable. But it's very useful for creating quick cards from the terminal. Requires familiarity with Trello and a basic understanding of bash.
  2. Log-in to Trello.
  3. Go to:
  4. Make note of your key. Replace any mention of YourTrelloKey with this hash.
  5. Create a token. Go to,write in your browser and follow directions.
  6. Make note of the token. Replace any mention of YourTrelloToken with this looong hash.
  7. Pick a reasonable number of the most popular boards you use. Grab the URLs of those boards. At the same time, think of short, one-word, easy-to-remember names for each board (e.g., work, homeprojects, wedding).
  8. Grab the board IDs of the boards you chose. It'll be the ~8 character hash-like string in the URL. E.g., for the ID is aWsGTrsD
  9. One by one, plug those IDs into the following API call: (via browser or cURL)
  10. Look at the resulting json, and, for each board, decide on the list (e.g, bullpen, doing, To Be Done) where you would most likely put a quick placeholder card (the list won't be dynamic, only the board). Make note of the 'id' property for each chosen list (one per board).
  11. Make note of your new values that pair short board name with list id property. E.g. -- work => wjeh18ehdkqwjeh7y1987
  12. Take all this info and insert it into this bash script template: [Name the file something like: 'trello']
  13. Make sure your new script is executable and in a sensible location, like /usr/local/bin
  14. Adding a ticket should now be as easy as: trello wedding "Taste cakes"
  15. Read much more about the Trello API at:
Copy link

domwrap commented Aug 25, 2016

Thanks for this excellent Gist, helped a lot with a small project. One thing to note is the API call in #9 is missing the token parameter, without which you get a permission denied error.

Copy link

alpha1125 commented Aug 25, 2016

#9, as Hwulex suggested (thanks btw)<BOARDID>/lists?key=<KEY>&token=<TOKEN>

Copy link

Thanks for this, right now Trello changed how to see the board. So step 8 URL should be:[BOARD_ID]?cards=open&lists=open&checklists=all&key=[APP_KEY]&token=[USER_TOKEN]

Copy link

ml4 commented Sep 12, 2022

Thanks @CrookedNumber very helpful.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment