Skip to main content
The fastest way to set up Keystroke is giving your coding agent the following prompt:
Read https://keystroke.ai/start.md then help me create my first agent.
If you prefer to run the steps yourself, this guide will install the CLI, scaffold a Keystroke codebase, deploy it to a platform project, run the example, then show prompts you can give your coding agent. If you prefer to build with no local setup, you can connect the Keystroke MCP server to ChatGPT, Claude, Cursor, etc and build via MCP instead.

Prerequisites

Before you start, you’ll need Node.js 20 or later installed.

1. Install the CLI

Install the keystroke command globally.
npm install -g @keystrokehq/cli

2. Connect the CLI

Link the CLI to your Keystroke account.
keystroke auth login

3. Scaffold a new project

Scaffold a new project from the default template.
keystroke init my-app --yes
cd my-app
This creates keystroke.config.ts, a committed tsconfig.json, a src/ directory with an example agent, and an AGENTS.md guide so your coding agent knows how Keystroke works. Lint, typecheck, and test run through the CLI — projects do not declare oxlint, TypeScript, vitest, or @types/node. Your local codebase is where you build. Your platform project is where Keystroke runs the deployed version for your team.

4. Deploy to the platform

List your platform projects:
keystroke projects list
Then link this directory to your platform project and deploy:
keystroke projects link --project <project-slug>
keystroke deploy
Or seed the link when scaffolding:
keystroke init my-app --yes --project <project-slug> --organization <org-slug>
Deploy runs lint and typecheck, builds your project, and uploads the dist/ artifact. Your agents, workflows, and triggers now run in the cloud platform. Pass --project <slug> to deploy to a different project without changing keystroke.config.ts. You do not need to run keystroke lint, keystroke typecheck, or keystroke build first — keystroke deploy runs those checks automatically and fails if anything is wrong.

5. Build an agent

Keystroke is built for coding agents. Open your project in Cursor, Claude Code, or another agentic IDE and ask it to help you build. Example prompts:
Build a morning brief agent. It should scan my google calendar, gmail inbox, and linear issues each weekday morning and send me a short briefing to Slack.
Build a meeting recap agent. It should trigger whenever one of my google meet calls finish, then turn the transcript into action items and send me a recap in Slack.
Build a data analyst agent. It should answer ad hoc business questions by querying our data warehouse. Connect it to Slack so the team can ask data questions in a #data channel.