# @keystrokehq/keystroke

Public authoring facade for [keystroke](../../README.md) user projects. Re-exports primitives via subpaths — no runtime logic here.

## Install

```json
{
  "dependencies": {
    "@keystrokehq/keystroke": "^0.0.3",
    "@keystrokehq/slack": "^0.0.3",
    "zod": "^4.4.3"
  },
  "devDependencies": {
    "@keystrokehq/cli": "^0.0.3"
  }
}
```

`zod` is a **peer dependency** of `@keystrokehq/keystroke` — install it in your project and import from `"zod"` in actions, agents, and credentials. Keystroke does not re-export or bundle it.

## Imports

```typescript
import { defineAction } from "@keystrokehq/keystroke/action";
import { defineAgent } from "@keystrokehq/keystroke/agent";
import type { AgentMessage } from "@keystrokehq/keystroke/agent/types";
import { defineWorkflow } from "@keystrokehq/keystroke/workflow";
import { defineWebhookSource } from "@keystrokehq/keystroke/trigger";
import { defineConfig } from "@keystrokehq/keystroke/config";
import { defineCredential } from "@keystrokehq/keystroke/credentials";
```

## Custom credentials

```typescript
import { defineCredential } from "@keystrokehq/keystroke/credentials";
import { z } from "zod";

export const customAppKey = defineCredential({
  key: "CUSTOM_APP_KEY",
  fields: { apiKey: z.string() },
});
```

```bash
keystroke credentials set CUSTOM_APP_KEY --scope org --set apiKey=...
```

Direct `@keystrokehq/action` (and other primitive) imports remain valid.
