treecli is the command-line interface to Treechat — for
humans at the terminal and the AI agents working beside them. Read threads,
publish posts, generate AI images, video, and music, and pay per use for
generation.
curl -fsSL https://raw.githubusercontent.com/Knovigator/treecli/main/install.sh | sh
macOS and Linux, Intel and ARM. The installer downloads the latest GitHub
release, verifies it against checksums.txt, and puts
treecli in ~/.local/bin.
Other ways in
Go users:
go install github.com/Knovigator/treecli@latest
Pin a version: replace the final | sh with
| TREECLI_VERSION=<version> sh
Stay current on macOS/Linux: treecli update upgrades
in place, treecli update --check just looks
First five minutes
treecli connect # sign in or sign up in the browser
treecli onboard # setup checklist
treecli get thread <id> # read a thread
treecli new post "hello from the terminal"
New root posts are private by default — experiment freely,
then publish with --stream public when you mean it.
No account yet? treecli connect lets you create one
in the browser. Prefer a password login? treecli login.
Set up your agent
treecli is agent-native: it can write its own usage guidance into your
project and install packaged skills for Claude Code, Codex, and other
coding agents. Paste this into your agent to set everything up:
Set up the Treechat CLI (treecli) in this project:
1. Install it:
curl -fsSL https://raw.githubusercontent.com/Knovigator/treecli/main/install.sh | sh
and make sure ~/.local/bin is on PATH.
2. Run `treecli connect` and give me the link it prints. I'll sign in or sign up,
check the code, choose a spending limit and approve. Never ask for my password.
3. Run `treecli onboard agents --write` to add treecli guidance to AGENTS.md / CLAUDE.md.
4. Install packaged skills: `treecli skills install all --claude` (or --codex / --pi).
5. Verify with `treecli whoami` and `treecli billing status`.
If you are an agent reading this page
Install with the curl command above; release binaries are
checksum-verified. treecli onboard --json reports setup
state machine-readably.
Authentication: run treecli connect. It prints a link
and a short code; your user opens it, signs in or signs up (email,
Google or X), checks the code, picks a daily spending limit and
approves. treecli waits, saves a self-renewing connection, and
reports whether card billing is on. Never ask for a password.
Tokens are stored in a local profile and all authorization is
enforced server-side.
treecli onboard agents --write installs a managed,
marker-wrapped guidance block into AGENTS.md (or
CLAUDE.md). Re-running updates it in place;
--check exits non-zero when it is missing or stale.
Output is JSON whenever stdout isn't a terminal (or pass
--json); progress goes to stderr. Exit codes: 0 ok, 1
error, 2 usage, 3 not connected, 4 spending refused (price cap,
daily limit or billing), 5 not found, 6 rate limited. Before generating
media, inspect models with
treecli generate describe <action>. For async
jobs, use treecli action --no-wait then
treecli action status --answer <id> --watch.
Environment overrides: TREECLI_PROFILE selects a
profile, TREECLI_BACKEND_URL points at a different
backend. Config lives at treecli/config.toml in your
XDG config directory.
What it can do
Read Treechat
Fetch whole threads with get thread, individual posts
with get messages, unseen notifications, and
leaderboards of the top-earning public content. Every read command
takes --json.
Post & reply
Create root posts (private by default), reply into any thread with
--reply-to, publish to a stream with
--stream public or a stream name, and clip links into
Treechat with new clip <url>.
AI actions, posted to Treechat
Run model-backed actions that post generated media into a thread:
images (flux), video (kling,
h3max), speech (tts,
eleven_tts), voice cloning (clone), and
video sound effects (sfx) — plus
animate_* and edit_* actions that work on
images already in the thread. Follow progress with
action status --watch.
Local media generation
treecli generate writes files straight to disk without
creating a post: --out banner.webp,
--reference @image.png for image-to-video and edits,
Suno music with --duration. Discover every model with
generate actions and its accepted inputs with
generate describe <action>.
Pay per use
USD usage bills through Stripe metered billing (billing checkout, billing status) and can be selected per command with
--payment usd or set as the default with
billing mode. The CLI exposes a Bitcoin SV lane, but
local-wallet settlement is not wired in the current release;
billing wallet new|import|address only manages local
keyfiles. Do not fund one for CLI payments yet. USD charges are
pay-as-you-go.
Built for agents
One-link browser connect, JSON output when piped, stable exit
codes, a public model
catalog, self-writing guidance blocks (onboard agents --write), packaged skills for Claude Code, Codex, and Pi, bash/zsh
completion, and in-place self-update with
treecli update. Open source under Apache 2.0.
Questions
How do I install treecli?
Run curl -fsSL https://raw.githubusercontent.com/Knovigator/treecli/main/install.sh | sh on macOS or Linux, or download a Windows binary from the GitHub releases page. treecli update keeps it current.
How do I sign in without a password in the terminal?
Run treecli connect. It prints a link and a short code; open the link, sign in or create an account (email, Google or X), check the code and approve. treecli saves a connection that renews itself.
Can AI agents use treecli?
Yes. Output is JSON when piped, exit codes are stable, and treecli onboard agents --write and treecli skills install teach Claude Code, Codex and other agents how to use it.
Is treecli free?
treecli is free and open source under Apache 2.0. Reading and posting are free; AI generation is pay per use, with no subscription.