Getting started

cubek docs

Your agent does the work: give it the prompt below. The reference is the cubek Skill, the same page your agent reads, split into sections for people.

For your agentCopy this and give it to the AI you're building with.
Build this with cubek (https://cubek.dev).
1. Install the CLI: curl -fsSL https://cubek.dev/install | sh
2. Run `cubek skill` and read all of it before writing code; it covers cubek's TypeScript subset, database and deploy. If this project already exists, port it the way the Skill describes.
3. Run `cubek login`, show me the URL it prints, and wait; it finishes on its own.
4. Keep `cubek check` and `cubek test` clean, deploy with `cubek deploy --prod`, and reply with the live URL.
No shell? Read https://cubek.dev/SKILL.md in full instead.
Prefer the terminal?
curl -fsSL https://cubek.dev/install | sh
cubek init my-app && cd my-app
cubek login
cubek deploy --prod

In depth

Every sub-skill, as a page (agents: cubek skill <topic>).

  • Database: The core Skill's "Schema and db " section comes first.
  • HTTP: Depth for routes across files, middleware, CORS, webhooks, outbound fetch , Claude and other AI APIs, responses and errors.
  • SEO and feeds: Search engines, social cards and feeds for server-rendered pages: meta tags, canonical URLs, OpenGraph, JSON-LD, Atom/RSS, sitemap, robots.txt.
  • Auth: Sign-up, sign-in, sessions, sign-out, guarded routes, roles, API tokens and rate limits.
  • Frontend: Islands, mount points, live queries, realtime, collaborative editing, SPAs, design and web fonts.
  • Tasks: Background work: queued tasks, delays, retries, cron, and running them by hand.
  • Time zones: Time zones: scheduling, per-day reports, local times in pages and emails.
  • Storage: Files: uploads through a form, direct browser uploads with signed URLs, downloads, listing and deleting.
  • Web Push: Web Push notifications (Chrome, Firefox, Edge, Safari; iPhone/iPad from iOS 16.4 as a Home Screen app).
  • Crypto: Hashes, MACs, passwords (bcrypt, argon2id imports), signatures (ES256, Ed25519), ECDH, HKDF and encryption (AES-GCM, XChaCha20-Poly1305): native code in cryp...
  • Workspaces: Several apps of one organization in one directory: typed calls (RPC), durable events, a shared database.
  • Testing: What to test and how: pure logic with cubek test (bun), routes and data with cubek dev + curl, and cubek check after every edit.
  • Deploy: Previews, production, rollback, domains, secrets, logs, metrics and data recovery.

Start with cubek init, then routes, schema.ts and pages as below. Porting is the same: handlers into routes, tables into schema.ts, views into pages or client/, then fix what cubek check reports. cubek does not host an app as-is (no Node, Docker or server npm). The work is fast: never estimate in days or weeks; start building now and iterate with cubek check.

cubek-ts: statically typed TypeScript run by cubek's bytecode runtime, same behavior under bun.

Sub-skills, read when needed (also cubek skill <topic>):

  • https://cubek.dev/skills/database.md: queries, derived, races, transactions, SQL, migrations, seeds
  • https://cubek.dev/skills/http.md: route files, middleware, cors, webhooks, fetch, Claude API, errors
  • https://cubek.dev/skills/seo.md: meta tags, OpenGraph, JSON-LD, RSS/Atom feeds, sitemap, robots
  • https://cubek.dev/skills/auth.md: sign-up, sessions, roles, API tokens, rate limits
  • https://cubek.dev/skills/frontend.md: design, web fonts, islands, Preact/React, SPA, live queries, realtime
  • https://cubek.dev/skills/tasks.md: queues, delays, retries, cron, task run
  • https://cubek.dev/skills/time.md: time zones, scheduling, per-day reports
  • https://cubek.dev/skills/storage.md: uploads, signed URLs, downloads
  • https://cubek.dev/skills/push.md: Web Push, iPhone too
  • https://cubek.dev/skills/crypto.md: hashes, bcrypt, TOTP, JWT, encryption
  • https://cubek.dev/skills/workspaces.md: several apps, RPC, events, shared db
  • https://cubek.dev/skills/testing.md: unit tests, route checks with curl
  • https://cubek.dev/skills/deploy.md: previews, prod, domains, secrets, logs, rollback