How to use treg
Integrate the
This article is auto-derived from indexed fields (wiki / faq / compatibility_json), not freshly AI-generated.
This article is derived from the plugin's already-indexed fields (wiki / faq / compatibility_json / readme), not freshly generated by AI. Source field is noted at the end of each section.
Quick start
treg
— source: plugin_wiki.wiki_content
Install & verify
dsh plugin --profile web add github:superdesigndev/treg
Run the command above in your DSH Web Profile. Then enable the plugin in the plugin list.
— source: plugins.install
Key points
- The catalog — external endpoints treg can serve on its own key, metered against your
- Your own tools — anything a teammate registered: a paid API account, an OAuth connection, a
- tool = something the registry calls for you with the org's credential. Two kinds:
-
- endpoint — an upstream
base_url+ credential bindings (each binding injects one
- endpoint — an upstream
-
- CLI — a vendor binary (
stripe,gh,vercel, ...) run with the credential injected.
- CLI — a vendor binary (
— source: plugin_wiki.readme_en (fallback readme_raw)
FAQ
What happens when there's no TREG_TOKEN?
MCP connector line (treg-mcp) will be automatically disabled, 5 mcp__treg__* tools won't appear in the agent, but SKILL.md will still load and guide users to treg.to to register and get a token.
Where do I get TREG_TOKEN?
After logging in via GitHub / Google / email verification code at https://treg.to, copy from the account page. New teams get $1.00 free credit.
Do I need to register an account and apply for a key for each third-party API?
No. treg uses its own key to call upstream and charges from the team's prepaid balance per call. Keys already registered by other team members will also be preferred for use and won't be counted.
Will the caller get the third-party API's key?
No. treg proxy is 'faithful forwarding': only modifies hop-by-hop headers, its own control headers and injected credentials, other bytes (including key) are forwarded as-is, X-Treg-Token is stripped before reaching upstream.
What to do when encountering HTTP 402?
This means the team's prepaid balance is insufficient. The caller should check mcp__treg__balance / treg balance and prompt the user to recharge at https://treg.to, or have the team register their own key for that provider.
Why does a duplicate SKILL.md appear under ~/.agents/skills/treg/?
treg's install.sh runs treg skill bootstrap to write SKILL.md to ~/.agents/skills/treg/, which duplicates the version from this bundle, but the content is the same and harmless.
How to completely uninstall from dsh?
Just remove the treg-dsh bundle from the dsh profile's plugin list. No need to clean up environment variables (TREG_TOKEN is treg's own, not dsh's).
Does treg need to change when a third-party API upgrades?
No. treg proxy doesn't parse upstream body or cache models, it forwards requests and responses as-is, so upstream API changes are transparent to treg.
— source: plugin_wiki.faq_json
Compatibility
- DSH: 未声明
- Node: 未声明
— source: plugin_wiki.compatibility_json
Pitfalls
Review the upstream repo before installing. This guide is auto-derived from indexed fields and may lag the latest release. If anything contradicts the official docs, treat the upstream source as authoritative.
— source: general rule