CAPforge GitHub npm

Your AI already codes.
Make it get CAP right.
// CLEAN COMPILE ✓

General-purpose models hallucinate CDS: annotation terms that don't exist, OData v2 syntax mixed into v4, invented fields. CAPforge connects your agent (Claude Code, Cursor…) to the real compiler and SAP's official best practices — and doesn't let it stop until the code compiles.

claude — CAP project
> add an Incident entity with draft and a value help ▸ cap_scaffold_entity — model + projection + annotations + CSV + i18n ▸ cap_write_files — 5 files written ▸ cap_validate — cds compile… ✗ [ERROR] annotations.cds:12 — 'UI.LineItm' is not a valid term agent reads the error and corrects… ▸ cap_validate — cds compile… ✓ CLEAN COMPILE — entity ready, draft enabled

The real loop: generate → compile → correct → green. No babysitting.

The problem

Every failed AI iteration is tokens and minutes down the drain

There's barely any public CAP code in training data. The result: your copilot nails React on the first try, but with CAP it enters the "doesn't compile → fix it → still broken" loop. You pay the API either way — and get scrap. And what does compile often doesn't fit your project: invented entities, ignored catalogs, your conventions nowhere to be seen.

The solution, two levels

Free: it compiles. Pro: it merges.

Free · open source
Your AI stops making up CAP syntax.
→ the code compiles
  • Full scaffolding: model with aspects (cuid, managed), projection, Fiori annotations, CSV, i18n
  • Validation loop against real cds compile and cds lint
  • Sourced knowledge core from official SAP docs (capire), cited and maintained
  • Draft, Object Page, modern value helps — plus UI5 freestyle sections with their own validation
$0 — npm install and go. Your model, your key (BYOK).
Pro · teams
Your AI generates like your senior: it knows YOUR project.
→ the code merges
  • Codebase-aware: reads your real CDS model — reuses your entities and catalogs, never invents fields
  • Your house conventions enforced across everything the team generates
  • Migration mode: legacy (freestyle, OData v2) → modern CAP/Fiori following your patterns
  • CI checks: nothing reaches the branch below your standard
per seat/month — paid by whoever saves the hours: your company. Coming soon.

How it works

Three steps, zero friction

01Register it in your agent — 4 lines in Claude Code's or Cursor's .mcp.json, command npx -y capforge.
02Open your CAP project and ask for your entity in plain language.
03CAPforge guides, validates, and doesn't stop until the ✓ green.

Uncomfortable questions

Answered head-on

I already pay for Claude/Cursor/my API. Why pay more?

Exactly. Every failed iteration gets billed the same: you pay tokens for code that doesn't compile. CAPforge doesn't replace your AI — it makes the one you already pay for get it right the first time. Fewer iterations, fewer tokens, less babysitting. Free already gives you that; Pro also makes the output fit your project without rework.

Won't models just learn CAP on their own?

Generic syntax — yes, they'll improve. That's why that part is free and open source. What no model will ever have in its training data is your data model, your catalogs and your conventions. That's Pro, and it doesn't expire.

What about Joule, SAP's copilot?

Joule lives inside SAP Build's closed ecosystem, with its licensing and its pace. CAPforge works in the tools your team already uses and loves — Claude Code, Cursor, VS Code — with whatever model you choose. It complements rather than competes: we're the small, open, sharp piece.

Does my code leave my machine?

No. CAPforge runs locally as an MCP server. It calls no LLM and sends nothing anywhere: your agent brings the model (your key, your data agreement) and CAPforge contributes knowledge and validation on your disk.

Start free

Give your AI the compiler and the rules.
Keep the credit for yourself.

$ npx -y capforge