Coding agent app built from the agent primitives: the agent reads the code, reproduces the bug with a failing test, edits the file and shows the diff, runs the tests green and asks before it opens a pull request. A side panel holds the file before and after, each with a live preview. Scripted end to end, so it runs with no backend until you plug in your model.
Set your access key from API keys as NEXTUI_TOKEN in .env.local and add the @nextui namespace below to components.json once. Then every item installs by name. Each install counts as a copy on a free account.
$pnpm dlx shadcn@latest add @nextui/coding-agent
1{2"registries": {3"@nextui": {4"url": "https://nextui.dev/r/{name}.json",5"headers": { "Authorization": "Bearer ${NEXTUI_TOKEN}" }6}7}8}
1"use client";23import { CodingAgent } from "@/components/pages/coding-agent";45export default function Page() {6return <CodingAgent brand="Forge" onOpenPullRequest={() => console.log("open PR")} />;7}
| Prop | Type | Default | Description |
|---|---|---|---|
| brand | string | "Forge" | Product name in the top bar |
| task | string | a pricing bug | Asked on load so the page opens with the agent at work; pass an empty string to start on the suggestions |
| suggestions | string[] | 3 tasks | Shown in the empty chat |
| script | CodingScript | the pricing fix | Reasoning, steps, failing and passing test runs, diff, the file before and after with previews, summary and pull request step |
| onOpenPullRequest | () => void | – | The person approved opening the pull request |
| className | string | – | Extra classes on the section |
Sign in to see the code
Preview it freely. A free account copies code and prompts a few times a day.