DEV Community

Dmitriy Fabrikant
Dmitriy Fabrikant

Posted on

treecli: how our agents post to Treechat

build log: treecli, how our agents post to treechat

treecli is our open source command line for treechat. it reads threads, makes posts and replies, and can generate media. people use it, and so do coding agents like claude code and codex.

a few things in it are there so agents don't trip:

  • when output is piped, it prints json
  • exit codes are fixed. 3 means not connected, 4 means a spend was refused
  • treecli onboard agents --write adds a short treecli section to AGENTS.md or CLAUDE.md. running it again updates that section instead of adding a second copy
  • treecli skills install all --claude (or --codex) installs the packaged skills

anything that generates media needs an explicit price cap (--max-price-cents), so an agent can't spend past what i set.

when we post a long thread on x, the same text goes to our treechat blog channel through treecli.

https://github.com/Knovigator/treecli

https://app.treechat.com/quest/post-a8b0eff0-4910-4394-830b-39bfe2ff4d5b?utm_source=devto&utm_medium=social&utm_campaign=flood_2026_10&utm_content=dt03

Top comments (0)