What is Mods?
Mods is a Charm CLI that pipes shell output through an LLM — mods "explain this" < file.go. It works with any OpenAI-compatible endpoint, so one Tokonomix entry aliases and routes 130+ models from a single key.
- Reads from stdin and pipes it through a model, ideal for one-shot shell tasks.
- Custom endpoints go in an
apis:block (base-url,api-key-env,models). - Per-model
aliasesandmax-input-charslet you tune each entry. - Open source; configured via
mods --settings.
Why route Mods through Tokonomix?
- One
apis:entry, 130+ models — aliastokonomix-consensustoconsensusfor the hard ones. - The consensus alias sanity-checks a generated command before you run it; a fast slug for routine piping.
- Per-call spend caps bound usage; region / origin routing for sensitive output.
- Reference the key from an environment variable, not the config file.
Connect Tokonomix in mods.yml
Add a Tokonomix entry under apis: with the base-url, an api-key-env reference and a models map (an alias makes it quick to select).
# mods --settings -> apis: section
apis:
tokonomix:
base-url: https://tokonomix.ai/api/v1
api-key-env: TOKONOMIX_API_KEY
models:
tokonomix-consensus:
aliases: ["consensus"]
max-input-chars: 392000
# export TOKONOMIX_API_KEY=tok_live_your-key
# mods -m consensus "explain this" < file.goVerify it works
- Export
TOKONOMIX_API_KEY, save theapis:block viamods --settings. - Pipe a file through the consensus alias:
mods -m consensus "explain this" < file.go. - Confirm the call and token usage in your Tokonomix dashboard.