Skip to content

Build with a coding agent

Get a Beignet app running with your coding agent, make a visible change, and check the result. The starter includes authentication, database-backed todos, and a Next.js UI. Your agent uses the same CLI and conventions as you do.

Use a coding agent that can read your project and run terminal commands. Beignet requires Node.js 22.12 or newer. The quickstart uses Bun; npm, pnpm, and Yarn are also supported.

Alpha software: Beignet's 0.0.x APIs can change between releases. Use the guidance shipped with the installed packages when it differs from the website. See stability and releases.

Start a new application

Open the directory where you want to work in your coding agent. Copy this prompt, replacing my-app with your application name:

text
Help me create a Beignet application named my-app. First check whether this
directory already contains an application; if it does, inspect that app and
do not scaffold over it.

Read https://beignetjs.com/markdown/agent-instructions.md and follow its
new-app workflow and linked quickstart. Use the full-stack Next.js starter
with SQLite unless I have specified different choices. Follow this
workspace's instructions and the guidance for the installed package versions.

Start the dev server and tell me the sign-up URL. Follow the quickstart's
first validation change, then run the app's formatter and beignet check.
Report what changed, which checks passed, and any failures or skipped checks.
Include the browser steps I should use to verify the change myself.

The expected result is a running app and a change you can see: a todo title shorter than three characters is rejected by the form and API, and the OpenAPI document describes the same rule. The manual quickstart explains each step if you want to follow along.

You can read the agent instructions yourself. They cover finding the app, choosing documentation, scaffolding, and verification. Use Copy page near a guide's title or Open Markdown in its menu to share only the page your agent needs.

Continue in an existing Beignet app

Have the agent read the app's guide files and installed package guidance before changing code. Ask it to inspect the feature it will work on. From the default Bun starter's root, these commands inspect the todos feature:

bash
bun beignet map --json --feature todos
bun beignet explain feature todos --json

Replace todos with an existing feature name. The map reports source relationships; explain adds source locations, conventions, and follow-up commands. Use the app's package manager when it differs from Bun.

Describe the behavior you want, including who can perform it and what should happen when input is invalid or access is denied. Ask the agent to use the appropriate generator, adapt the schemas and use cases, and test the rules.

Check the result together

The default starter provides a formatter and the Beignet validation command:

bash
bun run format
bun beignet check --json

check runs architecture linting, strict doctor checks, and the app's lint, typecheck, and test scripts. Missing scripts are reported as skipped. Review the output and the tests added for your feature; passing existing checks does not establish that every new requirement has been tested.

Ask the agent to fix failures and rerun checks against the final changes. Then try the user-facing behavior in the browser, including invalid inputs and unauthorized access where applicable.

Connect additional agent tools

The terminal workflow above works without an MCP connection. For setup of package skills, generated guide files, and the MCP server, see Agent tools. These tools help the agent inspect and change the app through Beignet's CLI.

If you want agents to call workflows inside your running application, see Agent capabilities.

Build a complete feature

Continue with Build your first feature. You and your agent will add Projects through three chapters: a persisted API, account ownership, and a React UI. Each chapter gives you a working result to inspect before moving on.