create-bun-api

agent
Security Audit
Fail
Health Pass
  • License — License: Apache-2.0
  • Description — Repository has a description
  • Active repo — Last push 0 days ago
  • Community trust — 11 GitHub stars
Code Fail
  • process.env — Environment variable access in evals/acceptance/helpers.ts
  • network request — Outbound network request in evals/acceptance/helpers.ts
  • process.env — Environment variable access in evals/lib/server.ts
  • network request — Outbound network request in evals/lib/server.ts
  • spawnSync — Synchronous process spawning in evals/run.ts
  • process.env — Environment variable access in evals/run.ts
  • spawnSync — Synchronous process spawning in evals/tasks.ts
Permissions Pass
  • Permissions — No dangerous permissions requested

No AI report is available for this listing yet.

SUMMARY

Create an agent-ready Bun + Elysia HTTP API (SQLite, JWT auth, OpenAPI) with one non-interactive command: bun create bun-api my-api. Ships AGENTS.md, Agent Skills, and a verify script for AI coding agents.

README.md

create-bun-api

Ask DeepWiki

An agent-ready starter for Bun HTTP APIs. One command creates a working Elysia + SQLite + JWT API
that installs from a lockfile, makes its first commit, and proves itself with its own verify script.
The project ships with AGENTS.md and Agent Skills, so coding agents (Claude Code, Codex, Cursor,
Gemini CLI, and others) follow the same conventions every time.

Status: pre-release, not yet published to npm (roadmap). This replaces the Rust
bun-cli crate (0.3.x); see docs/decisions/0001-agent-first-redesign.md
for why.

Quick start

Once published:

bun create bun-api my-api        # or: bunx create-bun-api my-api
cd my-api && bun run dev          # http://localhost:3000 · API docs at /docs

From this repository today:

bun install
bun src/cli.ts ../my-api

What you get

Stack Bun, Elysia 1.4, bun:sqlite, jose (JWT), OpenAPI docs via @elysiajs/openapi
Endpoints /health, /auth/register, /auth/login, /users/me
Safety defaults argon2id at 64 MiB, correct HTTP status codes, secrets redacted from logs, .env gitignored, config validated at boot
Proof bun run verify: typecheck, lint, test, then boot and GET /health, with --json output
For agents AGENTS.md (+ CLAUDE.md importing it) and skills in .agents/skills/ and .claude/skills/

It needs no database server or credentials, so tests and verify run offline once dependencies are installed.

Using it from scripts and agents

bunx create-bun-api describe                       # every command, flag, exit code, and template, as JSON
bunx create-bun-api my-api --yes --json            # never prompts; prints one JSON result
bunx create-bun-api my-api --dry-run --json        # lists the files it would write
bunx create-bun-api doctor --json                  # checks prerequisites and prints fixes
Exit code Meaning
0 Success
2 Usage error or invalid name (error.hint suggests one)
3 Missing prerequisite (run doctor)
4 Target directory isn't empty; nothing was changed
5 bun install failed; nothing was left on disk
6 The new project failed verify; it was kept for inspection
1 Anything else

The JSON output follows schemas/result.v1.json.

Skills

Skill Use when
create-bun-api Starting a new project
add-endpoint Adding a route or resource
add-model Adding or changing a table
verify-and-debug Before finishing any task, or when something fails

Contributing

Project layout, rules, and test commands are in AGENTS.md. Humans and agents use the same
instructions. The roadmap is docs/PLAN.md, releases follow
docs/releasing.md, and changes are listed in CHANGELOG.md.

License

Licensed under either the Apache License, Version 2.0 or the
MIT license, at your option.

Unless you explicitly state otherwise, any contribution you intentionally submit for inclusion in
this project, as defined in the Apache-2.0 license, is dual-licensed as above, without any
additional terms or conditions.

Projects generated by create-bun-api belong to you. Use any license you like for them.

Reviews (0)

No results found