import { Agent } from '@do-sdk/agent';
// Define your CLI command as an Agent
const cli = new Agent('cli.do');
// Create a 'deploy' command with project and environment arguments
cli.on('deploy', {
project: { type: 'string', required: true },
env: { type: 'string', default: 'staging' },
}, async (args) => {
console.log(`Deploying ${args.project} to ${args.env}...`);
// Your deployment logic here
// await triggerDeployment(args.project, args.env);
return { status: 'success', message: `Deployment of ${args.project} to ${args.env} initiated.` };
});
// Your CLI is now live and callable:
// > do cli deploy --project my-app --env production