Typed REST client for Trovy. Used by:
@trovyhq/cli— terminal@trovyhq/mcp-server— AI agents- your scripts / CI jobs
pnpm add @trovyhq/sdkimport { TrovyClient } from '@trovyhq/sdk';
const client = new TrovyClient({
apiUrl: 'https://trovy.app',
token: process.env.TROVY_TOKEN!, // tfp_…
});
const me = await client.whoami();
console.log('Bonjour', me.user.name);
const { task } = await client.resolveTaskRef('TF-12');
console.log(task.title, task.status);
await client.moveTask(task.id, 'IN_REVIEW');
await client.addComment(task.id, '🚀 Auto via CI');Generate a personal-access token from /settings/api-tokens in the Trovy web UI.
Pass it as Authorization: Bearer <token> (handled automatically by the client).
The token is hashed (SHA-256) server-side. The plaintext is shown only once.
The client throws TrovyError with:
status— HTTP code (0 = network/timeout)message— server error message orHTTP <n>body— parsed JSON response, if any
try {
await client.moveTask(id, 'DONE');
} catch (e) {
if (e instanceof TrovyError) {
if (e.status === 404) console.error('Task introuvable');
else if (e.status === 403) console.error('Pas les droits');
else throw e;
}
}If you were on @taskflowapp/sdk@0.2.x:
npm uninstall @taskflowapp/sdk && npm install @trovyhq/sdk@^1.0.0- Replace
TaskFlowClientwithTrovyClient(or import the alias which throws a deprecation warning) - Replace
TaskFlowErrorwithTrovyError - Update API URL from
taskflow.apptotrovy.app
The CLI and MCP server have been renamed in lockstep — install @trovyhq/cli and @trovyhq/mcp-server instead of the @taskflowapp/* versions.
MIT