Three dependencies, no build step.
Python 3.9 or newer. The package pulls httpx, click and rich, and nothing else.
twcli --version
uv pip install tileward works the same way. The package is MIT licensed, and the source is public.
All four capabilities, from either side.
The library and the command are two faces of one client, so anything you can script you can also type, and the reverse.
| Library | Command | |
|---|---|---|
| Tileward Models — an OpenAI-compatible chat surface | tw.chat, tw.models | twcli chat, twcli models |
| Tileward Governance — a decision before the model writes a token | tw.guard | twcli guard |
| Tileward Context — recall the slice of history a question needs | tw.context | twcli context |
| Tileward Documents — answers from your own files | tw.documents | twcli docs |
| The account, its API keys and their policies | tw.keys, tw.account | twcli keys, twcli account |
twcli chat "Say hello in one sentence."
from tileward import Tileward
tw = Tileward()
print(tw.chat.say("Say hello in one sentence."))
Two of them, and they are not interchangeable.
An API key reaches the model, the guard, Context and Documents. The account itself — keys, billing, policies, audit — needs a signed console session.
twcli keys create --label laptop --save
twcli auth login prints a code, you approve it in a browser, and the terminal ends up holding a session. No password is typed into a terminal, and no local port is opened, so it works over SSH and inside a container. It is RFC 8628, the device authorization grant.
A key cannot mint a key. That is deliberate: a key with that power would survive its own revocation, because whoever held it could just mint another. So the session mints, and the key does the work.
Governance also needs a policy bound to the key, set in the console under Settings → API keys. A key with no policy refuses nothing.
The reference lives with the package.
Every command and the library reference
The command list, the Python API, profiles and configuration, exit codes and errors, and calling Tileward from an OpenAI-compatible client are all on the package's own documentation site: tileward-com.github.io/tileward-cli.
Connecting a client instead
If what you want is Tileward inside an editor, a chat client or an agent framework rather than in a terminal, that is a different job: Connect a client has the recipe for each, and the endpoints say which address wants which credential.