Skip to content

Peer Stritzinger11/09/2025

Announcing trellang 1.0.0: A Trello REST client for Erlang/OTP

Today we’re releasing trellang 1.0.0 to Hex. A lightweight, documented Trello REST client built for Erlang/OTP.

Why trellang?

  • OTP-native: Uses Erlang’s standard libraries (inets/httpc, public_key, ssl, OTP 27 json) — zero external JSON deps.
  • Board-agnostic API: IDs are parameters; the client works across multiple boards concurrently.
  • Resilient HTTP: Retries with backoff and jitter on 429/5xx.
  • TDD’d and documented: Common Test suites and OTP 27 docs with ExDoc.

Highlights

  • Cards: Create, read, update core fields (name, desc, due, pos).
  • Labels & members: Look up by color and username, add to cards ergonomically.
  • Custom fields: List board custom fields and set text/date/checkbox values on cards.
  • Discovery: List lists on a board; dump board structure (board → lists → cards).
  • TLS/SNI: Correct certificate validation and SNI handling built-in.

Install

Add trellang to your rebar.config:

erlang
{deps, [
  {trellang, "1.0.0"}
]}.

Quick start

Provide your Trello key/token via an Erlang config (e.g. dev.config) and run with ERL_FLAGS="-config ./dev.config".

Find your board short link in the URL after /b/ (e.g., <<"abcd1234">>), then discover a list and create a card:

erlang
BoardId = <<"abcd1234">>,
{ok, Lists} = trello:list_lists(BoardId),
ListId = maps:get(<<"id">>, hd(Lists)),

{ok, Card} = trello:create_card(ListId, #{name => <<"Hello Trello">>}),
CardId = maps:get(<<"id">>, Card),

ok = element(1, trello:set_desc(CardId, <<"Created from Erlang">>)),
ok = element(1, trello:add_label_by_color(BoardId, CardId, <<"green">>)),

{ok, Card2} = trello:get_card(CardId).

Set a custom field (text):

erlang
{ok, Fields} = trello:list_custom_fields(BoardId),
TextId = maps:get(<<"id">>, hd([F || F <- Fields, maps:get(<<"type">>, F) =:= <<"text">>])),
ok = element(1, trello:set_custom_field_text(CardId, TextId, <<"hello-cf">>)).

Dump the board:

erlang
{ok, Dump} = trello:dump_board(BoardId, #{}).

Design choices

  • Built-in JSON only: OTP 27 json for consistent, dependency-free encoding/decoding.
  • No global board coupling: Only trello_key and trello_token are read from the application env; all other identifiers are passed in.
  • Fail-fast APIs: Operations expect valid credentials; errors are surfaced clearly.

Roadmap

  • Pagination helpers for list-heavy endpoints
  • More ergonomic finders (labels, members, lists)
  • Additional endpoints as demand grows

Get involved

  • Try it from Hex: trellang
  • Browse the source and examples: GitHub
  • File issues and ideas
  • PRs welcome