Step 1: Install the CLI
If you haven't already, install the BotMatrix CLI globally via npm:
npm install -g @botmatrix/cli
Get a working pipeline up and running in 10 minutes with the BotMatrix CLI. Copy, paste, deploy.
Terminal View
Before you begin, ensure you have the following installed locally on your machine:
node --version in your terminal.
If you haven't already, install the BotMatrix CLI globally via npm:
npm install -g @botmatrix/cli
Create a new directory and initialize your first pipeline using the init command:
botmatrix init my-first-bot
Select Node.js Runtime when prompted. This scaffolds a project structure with a triggers.yaml and src/index.ts.
Open triggers.yaml and add a cron trigger to run your bot every 5 minutes:
triggers: - id: daily_summary type: cron schedule: '*/5 * * * *'
Edit src/index.ts. Here is a simple handler that returns a greeting:
import { BotMatrix } from '@botmatrix/sdk'; export default async handler (ctx) => { const timestamp = new Date().toISOString(); return { status: 'success', message: `Hello, world! Timestamp: ${timestamp}` }; };
Go to your project root and deploy to production:
botmatrix deploy --env production
You will see a success message confirming your pipeline is live. You can verify execution logs in the BotMatrix Dashboard.