bama
BAMA: Build Any Mac App. Agent skills to research, clone, design, build, optimize, and test native macOS apps with Swift and SwiftUI.
Describe your business logic to an agent. Mantle generates the matching Admin UI, API, MCP and WebMCP tools. Open source. Deploy to your own Cloudflare account.
SkillsTypeScript · JavaScriptGitHub @aotterOnlineOwner unconfirmed
Have you tried it? One tap is enough. No sign-in needed.
AotterMantle SDK: agent-native CMS runtime, manifests, admin UI, and Cloudflare adapter.
Translation pending
Taken from the repository README
Loading the full README. The saved excerpt is shown below.
Be the dungeon master. Don’t code every corridor.
Schema. View. Procedure. Trigger. Four atoms from which your world takes shape.
Speak it in plain YAML, and the dungeon wakes—whole, lit from within, and yours to command.
Mantle is an embeddable application engine for TypeScript. Define your data,
queries, actions, and triggers in a Manifest, then use them through typed APIs,
HTTP endpoints, agent tools, and a staff console when your app needs one.Read the full README ↗Mantle is an agent-native application SDK. You declare Schemas, Views, Procedures and Triggers in YAML manifests, and the Mantle compiler turns them into native SQL for SQLite, Cloudflare D1 and PostgreSQL, plus typed TypeScript operations. It is for developers and AI coding agents building publishing sites, internal operations apps and agent-facing APIs on Cloudflare Workers or Bun.
Mantle is not a framework. Your application keeps its entry point, routes,
auth and database handles, and selects only the surfaces it needs: REST, an
MCP (Model Context Protocol) server, a web module for llms.txt and sitemaps,
Better Auth sign-in, and a native admin console.
uiSchema. Admin customization.web() module serves llms.txt, a sitemap, Markdown alternates and
canonical head tags from public Views.
Public pages.mantle help prints the docs that match your
installed version, mantle init writes an app shell, and pnpm accept
runs role-based acceptance of the running app.
Build with an agent.Give admins a workspace for content, operational records, reports, and actions. In browsers supporting WebMCP, agents can discover and invoke admin tools from Admin, inspect the current page, and navigate alongside the user. Calls use the current admin session and retain server-side authorization and concurrency checks.
Explore your application's Schemas, Views, Procedures, Triggers, and their relationships in the admin-only Developer UI. Its HTTP, MCP, and WebMCP docs show the application's projected routes and tool schemas, with links back to the owning definitions.
Developer UI rendered locally from the intake example. The graph describes compiled declarations; it does not certify runtime or deployment health.
The application serves the console at /admin from the Admin that mantle bundle
builds into dist/client/admin; this view draws from the admin-only
GET /admin/api/developer-console.
| Interface | Integration guide |
|---|---|
| HTTP | Writes: Procedures and Triggers |
| Remote MCP | Endpoints, tools, and authentication |
| Browser WebMCP | WebMCP in Admin |
An intake application needs request records, a submission action, and an admin inbox. Its admin View can be as small as:
apiVersion: cms.mantle.aotter.net/v2
kind: View
metadata: { name: recent-requests }
spec:
title: Recent requests
surface: admin
sql: |
SELECT id, name, email, message, created_at FROM requests
ORDER BY created_at DESC LIMIT 50
Together with the requests Schema, this defines the read used by the admin
report and its MCP tool. A Procedure handles submissions, with Triggers choosing
HTTP and MCP exposure.
For a complete runnable application, see the reference service.
Install the Mantle skill to get guided setup for your application and the features you need:
npx skills add aotter/mantle@mantle
Ask your agent to follow the installed skill and describe what you want to build.
Without a version the skill follows main, the latest stable release. To match
your application's SDK exactly, add its release tag:
npx skills add aotter/mantle#v0.2.0@mantle. main can lag an alpha release on develop.
See the agent setup guide for supported
editors, plugins, and project instructions.
Use Node 22.22+ and install an exact 0.2.x version of @aotter/mantle, with
matching Admin/UI packages when selected. npx mantle help prints the
installed docs one topic at a time.
mantle init <directory> writes a Cloudflare D1 app shell once: email OTP
sign-in, admin and user roles, Admin, MCP and REST. The app owns that code
from then on; mantle init never overwrites it. To add Mantle to an app you
already have, skip init and write manifests.
After you edit manifests, run
mantle generate <target> <output-directory> <manifest>..., for example
mantle generate cloudflare-d1 generated manifests/*.yaml.
The generator writes native TypeScript/SQL and Workers split-build settings;
your application supplies its entry, routes, auth and database handles. In an
app written by mantle init, pnpm accept starts the app for role-based
acceptance.
Follow the quickstart, then the project and CLI guide. The reference service is a whole service with its smoke test.
Using ChatGPT Sites? Follow Mantle on ChatGPT Sites.
| Start with | Add when you need |
|---|---|
@aotter/mantle | Native generated queries, typed Store, compiler and the mantle CLI. |
Target cloudflare-d1 or cloudflare-postgres | App-owned Worker routing and D1 or postgres.js/Hyperdrive handles. |
Target bun-sqlite or bun-postgres | App-owned Bun server using bun:sqlite or Bun.SQL. |
@aotter/mantle/auth | Sign-in, admin roles, and OAuth for MCP. |
| The reference service | A whole service to read and run. |
PostgreSQL and SQLite are the two built-in dialects. Manifest SQL uses the compiler's PostgreSQL syntax and is rendered for the selected target. PostgreSQL uses Bun.SQL on Bun and postgres.js on Workers; other native handles need an application-owned adapter. Upgrading from 0.1.x: the upgrade guide; an existing PostgreSQL service also reads the release notes.
| Package | Purpose |
|---|---|
@aotter/mantle | Native SDK, private compiler, generator and CLI; selected driver, auth, REST, MCP, web and site/media primitives. |
@aotter/mantle-ui | Pure UI: generic interaction controller, React components, visual kit and design tokens. No SDK dependency. |
@aotter/mantle-admin | Admin app library and thin server, preview and Admin MCP App. Uses UI and public SDK contracts; the SDK remains a peer. |
Mantle is an open-source (Apache-2.0) agent-native application SDK and backend compiler. It compiles YAML manifests (Schemas, Views, Procedures and Triggers) into native SQL for SQLite, Cloudflare D1 and PostgreSQL, plus typed TypeScript operations, on Cloudflare Workers or Bun, with optional REST, MCP, web, auth and admin surfaces.
No. Mantle does not own your entry point, router or auth, and it does not take
control of your app. Your application imports the generated operations, passes
its own database handle and verified caller, and mounts only the surfaces it
selects. mantle generate writes only generated/ and Wrangler build keys.
mantle init writes a starting shell once; after that the code is yours.
Instead of building queries in application code, you declare SQL Views and Procedures in manifests; the compiler checks them and emits native SQL with row policy, single-row write checks and atomic Procedures. A headless CMS is usually a separate product with its own content model. Mantle gives you publishing workflows, an admin console and public pages inside your own application and database, for content you model yourself.
Mantle supports SQLite (Cloudflare D1 or bun:sqlite) and PostgreSQL, on
Cloudflare Workers or Bun, through four generator targets: cloudflare-d1
(Cloudflare D1 on Workers), cloudflare-postgres (PostgreSQL via postgres.js,
usually with Hyperdrive, on Workers), bun-sqlite (bun:sqlite) and
bun-postgres (Bun.SQL). Manifest SQL uses PostgreSQL syntax and is rendered
for the selected dialect.
Coding agents build Mantle apps with the version-matched skill, mantle help
and the compiler's diagnostics; at runtime, AI agents call the app's Model
Context Protocol server at /mcp and /mcp/admin. /mcp serves the tools your
public MCP Triggers expose, and /mcp/admin serves admin tools to admin roles.
Each call keeps its declared authorization, row policy and input checks. See
MCP and agents.
llms.txt, a sitemap and Markdown pages?Yes. The generated web() module reads public Views and serves /llms.txt,
/sitemap.xml, .md Markdown alternates and canonical head tags. SQL controls
what is visible, so unpublished drafts stay out. Your app owns the HTML. For
page layouts, JSON-LD and languages, see
Public pages: SEO, AEO and languages.
No. Apply the generated schema.sql to an empty database for the first
install. After that, migrations belong to the application and its native tool.
mantle init, mantle help and role-only acceptance.llms.txt, sitemap, Markdown alternates, JSON-LD and hreflang.See Contributing for development and review, Support for questions and bugs, and Security for private vulnerability reports. Contributors follow the Code of Conduct.
Apache 2.0. See LICENSE.