> ## Documentation Index
> Fetch the complete documentation index at: https://keystroke.ai/docs/llms.txt
> Use this file to discover all available pages before exploring further.

# Quickstart

> Learn how to build your first automation with Keystroke.

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 automation.
```

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. **This CLI + local project flow is what we recommend** for coding agents — see [CLI for agents](/docs/build-with-ai/cli-for-agents).

If you cannot use a local project — for example, you build only from ChatGPT or Claude in chat — connect the [Keystroke MCP server](/docs/build-with-ai/mcp-for-agents) instead. That path skips local install but uses a newer hosted workspace; prefer this guide when your agent can work in an editor on your machine.

You can also build with no coding agent at all: the [platform agent](/docs/build-with-ai/platform-agent) in the Keystroke web app builds agents and workflows for you from chat.

## Prerequisites

Before you start, you'll need [Node.js](https://nodejs.org) `^22.18.0 || >=24.0.0` (Node 23 is not supported).

## 1. Install the CLI

Install the `keystroke` command globally.

<CodeGroup>
  ```bash npm theme={null}
  npm install -g @keystrokehq/cli
  ```

  ```bash pnpm theme={null}
  pnpm add -g @keystrokehq/cli
  ```

  ```bash yarn theme={null}
  yarn global add @keystrokehq/cli
  ```

  ```bash bun theme={null}
  bun add -g @keystrokehq/cli
  ```
</CodeGroup>

## 2. Connect the CLI

Link the CLI to your Keystroke account.

```bash theme={null}
keystroke auth login
```

This opens a browser device flow, so it only applies to your own machine. Hosted sessions — the in-app [platform agent](/docs/build-with-ai/platform-agent) and [MCP](/docs/build-with-ai/mcp-for-agents) workspaces — are already authenticated and skip this step (and this whole guide's install/scaffold flow).

## 3. Scaffold a new project

Scaffold a new project from the default template.

```bash theme={null}
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 workflow, and an `AGENTS.md` guide so your
coding agent knows how Keystroke works. Project scripts call the Keystroke CLI
for lint, typecheck, build, and test; the template includes TypeScript, Vitest,
and Node types for authoring and editor support.

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:

```bash theme={null}
keystroke projects list
```

Then link this directory to your platform project and deploy:

```bash theme={null}
keystroke projects link --project <project-slug>
keystroke deploy
```

Or seed the link when scaffolding:

```bash theme={null}
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 automation

Keystroke is built for coding agents. Open your project in Cursor, Claude Code, or another agentic IDE and ask it to help you build.

Describe the outcome you want rather than choosing a primitive up front. Your coding agent can inspect available integrations and credentials, clarify consequential choices, and recommend a reliable workflow or an agent where runtime judgment is useful.

Example prompts:

```
Each weekday morning, scan my Google Calendar, Gmail inbox, and Linear issues, then send me a short briefing in Slack.
```

```
When one of my Google Meet calls finishes, 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.
```
