Skip to content

Installation

June runs on Bun 1.2 or later. Install june with React, the AI SDK, and whichever AI SDK provider you already use:

bun add june react ai @ai-sdk/openai

Import the provider's models from June: june/sdk/openai, june/sdk/anthropic, june/sdk/google or june/sdk/xai. Each one is a thin wrapper over the provider package you installed, and needs only that one. Run one with Bun without its package and June's error names the package to add; a bundler reports the missing package when it builds.

If you already use the AI SDK, keep the same provider package and environment variable. Models from @ai-sdk/* directly work too, and that's where provider-specific options live.

Set a provider key

Your provider package reads its own API key from the environment. For @ai-sdk/openai, that's:

export OPENAI_API_KEY=sk-...

Other providers read their own, such as ANTHROPIC_API_KEY for @ai-sdk/anthropic and GOOGLE_GENERATIVE_AI_API_KEY for @ai-sdk/google. Bun also loads a .env file in the directory you run from.

Check it

june doctor

june doctor checks your Bun version and which provider keys are set, without calling a model. You're ready when Bun and your provider's key both show ✓:

✓ bun 1.4.3
· ANTHROPIC_API_KEY is not set (anthropic)
✓ OPENAI_API_KEY is set (openai)
…

If june isn't on your PATH, run it as bunx june doctor. Give it a workflow file and it checks only the keys that file's providers need, and fails if one is missing:

june doctor review.tsx
✓ bun 1.4.3
✗ OPENAI_API_KEY is not set (openai)

A key that's set but wrong only shows up when you run.

Requirements

PackageVersion
Bun1.2+the runtime; the june CLI requires it
june0.1the runtime and the CLI
react19.3+a peer dependency: workflows are React components
ai7.0.137+a peer dependency: the AI SDK runs every model call
@ai-sdk/openai4.0+an optional peer dependency, for june/sdk/openai
@ai-sdk/anthropic4.0+an optional peer dependency, for june/sdk/anthropic
@ai-sdk/google4.0+an optional peer dependency, for june/sdk/google
@ai-sdk/xai5.0+an optional peer dependency, for june/sdk/xai
Other providersfor ai 7any AI SDK provider package, imported directly

June is ESM only. Write workflows as .tsx files: Bun runs TypeScript and JSX as they are, with no build step.

Next

Write and run your first workflow in the Quickstart. The CLI reference covers every command.