- Commands live on your computers. The cloud only stores their names and settings, so
commands.listreports what each agent synced. Adding or editing a command happens in the agent’scommands.json, not through this API. - A trigger is not a completion.
commands.runacknowledges that the request was dispatched. Usecommands.historyto see whether it actually ran. - Parameters need Allow Params. A command runs without parameters unless the agent’s Allow Params flag is on, and an empty
paramsstring is rejected here because it would pass an empty argument rather than omitting it. - Panel buttons belong to the dashboard. Each button is configured with the command it runs.
panels.triggerneeds the panel and button names;paramsis optional and only matters for a button that takes them. - A 404 means the route is wrong. A real route with a bad token answers 401 with
Invalid Token!, so a 404 is a path error rather than an auth one. - No webhooks. The provider posts no events for command completion, so poll
commands.history.
- 6 typed API operations
Setup
1
Install
2
Add the plugin
corsair.ts
multiTenancy: true, scope calls with corsair.withTenant(id). See Quick start for KEK + Hub keys, and Multi-tenancy for account isolation.3
Choose authentication
- API Key (Recommended)
Store the TRIGGERcmd API key before the first call: More: API Key
pnpm corsair setup --plugin=triggercmd --tenant=acme api_key=<your-key> (leave out --tenant without multiTenancy), or pass it as key in the plugin options. With Hub, each tenant enters their own key on the connect page. See API key auth.4
Connect a tenant
Mint a connect link and send the tenant to it. Hub hosts the page and delivers the result to your app — see Connect / OAuth.
Example API calls
List your registered computersWhat’s next
API reference
Every
triggercmd.api.* operation with input and output types.Connect / OAuth
createLink, Hub delivery, and tenant connect flows.
Use with agents
Expose this plugin’s operations as MCP tools.