Skip to main content
By the end of this guide you’ll have the web and API services running locally, the database migrated, the CLI installed, and a Markdown artifact published to a real URL.

Prerequisites

Artifacts is a Bun + Turborepo monorepo. You’ll need a few services available before the first boot.
  • Bun — matches the repository package manager.
  • Node.js 24+ — required to run the apps.
  • PostgreSQL — any Postgres-compatible database, such as Neon.
  • S3-compatible storage — for artifact content, such as Cloudflare R2.
  • Google OAuth credentials — for interactive browser login.

1. Install and configure

1

Install dependencies

From the repository root:
2

Create your environment file

At minimum, align the browser-visible app origin and the internal API origin:
The Next.js app rewrites /api/*, /mcp, and OAuth metadata routes to the Hono API, so browser cookies stay scoped to the public web origin. See Configuration for every variable.
3

Run database migrations

Apply migrations before the first boot:
When you change schema definitions later, regenerate migrations with bun run db:generate.

2. Start the app

Run the web and API apps together through Turbo:

3. Install the CLI

Build the TypeScript CLI and put the artifacts command on your PATH:
Prefer not to install globally? Run it straight from the repo root instead:

4. Log in

Point the CLI at your local services, then start browser login:
Credentials are saved to ~/.config/agent-artifacts/credentials.json with mode 0600.

5. Claim a username

Your personal workspace slug comes from your username. If you haven’t claimed one yet:

6. Publish your first artifact

1

Create a project

2

Write a Markdown file

3

Publish it

push infers the type, title, and slug from the file. Override them with --type, --title, and --slug.
The command returns the artifact’s URL. Open it in the browser to see your published Markdown.

Next steps

Learn the artifact model

Versions, content types, and how storage works.

Share and control access

Public, private, email allowlists, and share links.

CLI reference

Every command, flag, and environment variable.

Connect an MCP client

Give agents structured artifact tools over MCP.