@quickback-dev/cli 0.10.16 → 0.11.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (253) hide show
  1. package/dist/commands/compile.d.ts.map +1 -1
  2. package/dist/commands/compile.js +40 -2
  3. package/dist/commands/compile.js.map +1 -1
  4. package/dist/docs/content.d.ts.map +1 -1
  5. package/dist/docs/content.js +15 -10
  6. package/dist/docs/content.js.map +1 -1
  7. package/dist/index.js +1 -1
  8. package/dist/index.js.map +1 -1
  9. package/dist/skill/SKILL.md +142 -1051
  10. package/dist/skill/agents/quickback-specialist/AGENT.md +36 -0
  11. package/dist/skill/docs/changelog.md +1225 -0
  12. package/dist/skill/docs/compiler/claude-code-skill.md +312 -0
  13. package/dist/skill/docs/compiler/cloud-compiler/authentication.md +63 -0
  14. package/dist/skill/docs/compiler/cloud-compiler/cli.md +307 -0
  15. package/dist/skill/docs/compiler/cloud-compiler/endpoints.md +78 -0
  16. package/dist/skill/docs/compiler/cloud-compiler/index.md +65 -0
  17. package/dist/skill/docs/compiler/cloud-compiler/local-compiler.md +115 -0
  18. package/dist/skill/docs/compiler/cloud-compiler/troubleshooting.md +76 -0
  19. package/dist/skill/docs/compiler/config/agents.md +144 -0
  20. package/dist/skill/docs/compiler/config/auth.md +109 -0
  21. package/dist/skill/docs/compiler/config/bindings.md +176 -0
  22. package/dist/skill/docs/compiler/config/domains.md +149 -0
  23. package/dist/skill/docs/compiler/config/index.md +419 -0
  24. package/dist/skill/docs/compiler/config/output.md +338 -0
  25. package/dist/skill/docs/compiler/config/providers.md +248 -0
  26. package/dist/skill/docs/compiler/config/security.md +255 -0
  27. package/dist/skill/docs/compiler/config/single-tenant.md +128 -0
  28. package/dist/skill/docs/compiler/config/variables.md +157 -0
  29. package/dist/skill/docs/compiler/definitions/access.md +445 -0
  30. package/dist/skill/docs/compiler/definitions/actions.md +884 -0
  31. package/dist/skill/docs/compiler/definitions/concepts.md +52 -0
  32. package/dist/skill/docs/compiler/definitions/feature.md +164 -0
  33. package/dist/skill/docs/compiler/definitions/firewall.md +285 -0
  34. package/dist/skill/docs/compiler/definitions/guards.md +241 -0
  35. package/dist/skill/docs/compiler/definitions/index.md +219 -0
  36. package/dist/skill/docs/compiler/definitions/masking.md +241 -0
  37. package/dist/skill/docs/compiler/definitions/read.md +220 -0
  38. package/dist/skill/docs/compiler/definitions/schema.md +697 -0
  39. package/dist/skill/docs/compiler/definitions/validation.md +35 -0
  40. package/dist/skill/docs/compiler/definitions/views.md +292 -0
  41. package/dist/skill/docs/compiler/getting-started/claude-code.md +126 -0
  42. package/dist/skill/docs/compiler/getting-started/full-example.md +431 -0
  43. package/dist/skill/docs/compiler/getting-started/hand-crafted.md +178 -0
  44. package/dist/skill/docs/compiler/getting-started/index.md +192 -0
  45. package/dist/skill/docs/compiler/getting-started/patterns.md +225 -0
  46. package/dist/skill/docs/compiler/getting-started/template-blog.md +280 -0
  47. package/dist/skill/docs/compiler/getting-started/template-cloudflare.md +260 -0
  48. package/dist/skill/docs/compiler/getting-started/template-empty.md +112 -0
  49. package/dist/skill/docs/compiler/getting-started/templates.md +111 -0
  50. package/dist/skill/docs/compiler/index.md +85 -0
  51. package/dist/skill/docs/compiler/targets/hono-api/cloudflare.md +94 -0
  52. package/dist/skill/docs/compiler/targets/hono-api/database/d1.md +246 -0
  53. package/dist/skill/docs/compiler/targets/hono-api/database/index.md +16 -0
  54. package/dist/skill/docs/compiler/targets/hono-api/database/neon.md +144 -0
  55. package/dist/skill/docs/compiler/targets/hono-api/database/using-d1.md +39 -0
  56. package/dist/skill/docs/compiler/targets/hono-api/index.md +37 -0
  57. package/dist/skill/docs/compiler/targets/hono-api/using-the-api/actions-api.md +323 -0
  58. package/dist/skill/docs/compiler/targets/hono-api/using-the-api/batch-operations.md +357 -0
  59. package/dist/skill/docs/compiler/targets/hono-api/using-the-api/caching.md +105 -0
  60. package/dist/skill/docs/compiler/targets/hono-api/using-the-api/crud.md +652 -0
  61. package/dist/skill/docs/compiler/targets/hono-api/using-the-api/errors.md +224 -0
  62. package/dist/skill/docs/compiler/targets/hono-api/using-the-api/index.md +37 -0
  63. package/dist/skill/docs/compiler/targets/hono-api/using-the-api/openapi.md +203 -0
  64. package/dist/skill/docs/compiler/targets/hono-api/using-the-api/query-params.md +199 -0
  65. package/dist/skill/docs/compiler/targets/hono-api/using-the-api/views-api.md +161 -0
  66. package/dist/skill/docs/compiler/targets/index.md +47 -0
  67. package/dist/skill/docs/compiler/targets/supabase-rls/index.md +55 -0
  68. package/dist/skill/docs/compiler/targets/supabase-rls/limitations.md +48 -0
  69. package/dist/skill/docs/compiler/targets/supabase-rls/mappings.md +99 -0
  70. package/dist/skill/docs/compiler/targets/supabase-rls/setup.md +88 -0
  71. package/dist/skill/docs/compiler/troubleshooting.md +120 -0
  72. package/dist/skill/docs/index.md +77 -0
  73. package/dist/skill/docs/stack/account-ui/customization.md +378 -0
  74. package/dist/skill/docs/stack/account-ui/environment-variables.md +325 -0
  75. package/dist/skill/docs/stack/account-ui/features/admin.md +76 -0
  76. package/dist/skill/docs/stack/account-ui/features/api-keys.md +22 -0
  77. package/dist/skill/docs/stack/account-ui/features/avatars.md +37 -0
  78. package/dist/skill/docs/stack/account-ui/features/cli-authorize.md +21 -0
  79. package/dist/skill/docs/stack/account-ui/features/index.md +291 -0
  80. package/dist/skill/docs/stack/account-ui/features/organizations.md +29 -0
  81. package/dist/skill/docs/stack/account-ui/features/passkeys.md +31 -0
  82. package/dist/skill/docs/stack/account-ui/features/passwordless.md +28 -0
  83. package/dist/skill/docs/stack/account-ui/features/sessions.md +20 -0
  84. package/dist/skill/docs/stack/account-ui/hooks.md +209 -0
  85. package/dist/skill/docs/stack/account-ui/index.md +147 -0
  86. package/dist/skill/docs/stack/account-ui/library-usage.md +257 -0
  87. package/dist/skill/docs/stack/account-ui/standalone.md +149 -0
  88. package/dist/skill/docs/stack/account-ui/with-quickback.md +160 -0
  89. package/dist/skill/docs/stack/account-ui/worker.md +362 -0
  90. package/dist/skill/docs/stack/auth/api-keys.md +15 -0
  91. package/dist/skill/docs/stack/auth/device-auth.md +14 -0
  92. package/dist/skill/docs/stack/auth/index.md +64 -0
  93. package/dist/skill/docs/stack/auth/jwt-optimization.md +245 -0
  94. package/dist/skill/docs/stack/auth/plugins/aws-ses.md +127 -0
  95. package/dist/skill/docs/stack/auth/plugins/combo-auth.md +74 -0
  96. package/dist/skill/docs/stack/auth/plugins/index.md +340 -0
  97. package/dist/skill/docs/stack/auth/plugins/upgrade-anonymous.md +155 -0
  98. package/dist/skill/docs/stack/auth/security.md +455 -0
  99. package/dist/skill/docs/stack/auth/using-auth.md +39 -0
  100. package/dist/skill/docs/stack/cms/actions.md +199 -0
  101. package/dist/skill/docs/stack/cms/components.md +479 -0
  102. package/dist/skill/docs/stack/cms/connecting.md +199 -0
  103. package/dist/skill/docs/stack/cms/dashboard.md +39 -0
  104. package/dist/skill/docs/stack/cms/index.md +158 -0
  105. package/dist/skill/docs/stack/cms/inline-editing.md +136 -0
  106. package/dist/skill/docs/stack/cms/pages.md +275 -0
  107. package/dist/skill/docs/stack/cms/record-layouts.md +151 -0
  108. package/dist/skill/docs/stack/cms/schema-format.md +437 -0
  109. package/dist/skill/docs/stack/cms/schema-registry.md +200 -0
  110. package/dist/skill/docs/stack/cms/security.md +203 -0
  111. package/dist/skill/docs/stack/cms/table-views.md +142 -0
  112. package/dist/skill/docs/stack/index.md +65 -0
  113. package/dist/skill/docs/stack/queues/handlers.md +317 -0
  114. package/dist/skill/docs/stack/queues/index.md +56 -0
  115. package/dist/skill/docs/stack/queues/using-queues.md +192 -0
  116. package/dist/skill/docs/stack/realtime/durable-objects.md +488 -0
  117. package/dist/skill/docs/stack/realtime/index.md +73 -0
  118. package/dist/skill/docs/stack/realtime/partyserver-rooms.md +146 -0
  119. package/dist/skill/docs/stack/realtime/using-realtime.md +211 -0
  120. package/dist/skill/docs/stack/storage/index.md +17 -0
  121. package/dist/skill/docs/stack/storage/kv.md +204 -0
  122. package/dist/skill/docs/stack/storage/r2.md +232 -0
  123. package/dist/skill/docs/stack/storage/using-kv.md +70 -0
  124. package/dist/skill/docs/stack/storage/using-r2.md +55 -0
  125. package/dist/skill/docs/stack/vector/embeddings.md +554 -0
  126. package/dist/skill/docs/stack/vector/index.md +44 -0
  127. package/dist/skill/docs/stack/vector/using-embeddings.md +186 -0
  128. package/dist/skill/docs/stack/webhooks/inbound.md +186 -0
  129. package/dist/skill/docs/stack/webhooks/index.md +36 -0
  130. package/dist/skill/docs/stack/webhooks/outbound.md +281 -0
  131. package/package.json +1 -1
  132. package/src/skill/SKILL.md +142 -1051
  133. package/src/skill/agents/quickback-specialist/AGENT.md +36 -0
  134. package/src/skill/docs/changelog.md +1225 -0
  135. package/src/skill/docs/compiler/claude-code-skill.md +312 -0
  136. package/src/skill/docs/compiler/cloud-compiler/authentication.md +63 -0
  137. package/src/skill/docs/compiler/cloud-compiler/cli.md +307 -0
  138. package/src/skill/docs/compiler/cloud-compiler/endpoints.md +78 -0
  139. package/src/skill/docs/compiler/cloud-compiler/index.md +65 -0
  140. package/src/skill/docs/compiler/cloud-compiler/local-compiler.md +115 -0
  141. package/src/skill/docs/compiler/cloud-compiler/troubleshooting.md +76 -0
  142. package/src/skill/docs/compiler/config/agents.md +144 -0
  143. package/src/skill/docs/compiler/config/auth.md +109 -0
  144. package/src/skill/docs/compiler/config/bindings.md +176 -0
  145. package/src/skill/docs/compiler/config/domains.md +149 -0
  146. package/src/skill/docs/compiler/config/index.md +419 -0
  147. package/src/skill/docs/compiler/config/output.md +338 -0
  148. package/src/skill/docs/compiler/config/providers.md +248 -0
  149. package/src/skill/docs/compiler/config/security.md +255 -0
  150. package/src/skill/docs/compiler/config/single-tenant.md +128 -0
  151. package/src/skill/docs/compiler/config/variables.md +157 -0
  152. package/src/skill/docs/compiler/definitions/access.md +445 -0
  153. package/src/skill/docs/compiler/definitions/actions.md +884 -0
  154. package/src/skill/docs/compiler/definitions/concepts.md +52 -0
  155. package/src/skill/docs/compiler/definitions/feature.md +164 -0
  156. package/src/skill/docs/compiler/definitions/firewall.md +285 -0
  157. package/src/skill/docs/compiler/definitions/guards.md +241 -0
  158. package/src/skill/docs/compiler/definitions/index.md +219 -0
  159. package/src/skill/docs/compiler/definitions/masking.md +241 -0
  160. package/src/skill/docs/compiler/definitions/read.md +220 -0
  161. package/src/skill/docs/compiler/definitions/schema.md +697 -0
  162. package/src/skill/docs/compiler/definitions/validation.md +35 -0
  163. package/src/skill/docs/compiler/definitions/views.md +292 -0
  164. package/src/skill/docs/compiler/getting-started/claude-code.md +126 -0
  165. package/src/skill/docs/compiler/getting-started/full-example.md +431 -0
  166. package/src/skill/docs/compiler/getting-started/hand-crafted.md +178 -0
  167. package/src/skill/docs/compiler/getting-started/index.md +192 -0
  168. package/src/skill/docs/compiler/getting-started/patterns.md +225 -0
  169. package/src/skill/docs/compiler/getting-started/template-blog.md +280 -0
  170. package/src/skill/docs/compiler/getting-started/template-cloudflare.md +260 -0
  171. package/src/skill/docs/compiler/getting-started/template-empty.md +112 -0
  172. package/src/skill/docs/compiler/getting-started/templates.md +111 -0
  173. package/src/skill/docs/compiler/index.md +85 -0
  174. package/src/skill/docs/compiler/targets/hono-api/cloudflare.md +94 -0
  175. package/src/skill/docs/compiler/targets/hono-api/database/d1.md +246 -0
  176. package/src/skill/docs/compiler/targets/hono-api/database/index.md +16 -0
  177. package/src/skill/docs/compiler/targets/hono-api/database/neon.md +144 -0
  178. package/src/skill/docs/compiler/targets/hono-api/database/using-d1.md +39 -0
  179. package/src/skill/docs/compiler/targets/hono-api/index.md +37 -0
  180. package/src/skill/docs/compiler/targets/hono-api/using-the-api/actions-api.md +323 -0
  181. package/src/skill/docs/compiler/targets/hono-api/using-the-api/batch-operations.md +357 -0
  182. package/src/skill/docs/compiler/targets/hono-api/using-the-api/caching.md +105 -0
  183. package/src/skill/docs/compiler/targets/hono-api/using-the-api/crud.md +652 -0
  184. package/src/skill/docs/compiler/targets/hono-api/using-the-api/errors.md +224 -0
  185. package/src/skill/docs/compiler/targets/hono-api/using-the-api/index.md +37 -0
  186. package/src/skill/docs/compiler/targets/hono-api/using-the-api/openapi.md +203 -0
  187. package/src/skill/docs/compiler/targets/hono-api/using-the-api/query-params.md +199 -0
  188. package/src/skill/docs/compiler/targets/hono-api/using-the-api/views-api.md +161 -0
  189. package/src/skill/docs/compiler/targets/index.md +47 -0
  190. package/src/skill/docs/compiler/targets/supabase-rls/index.md +55 -0
  191. package/src/skill/docs/compiler/targets/supabase-rls/limitations.md +48 -0
  192. package/src/skill/docs/compiler/targets/supabase-rls/mappings.md +99 -0
  193. package/src/skill/docs/compiler/targets/supabase-rls/setup.md +88 -0
  194. package/src/skill/docs/compiler/troubleshooting.md +120 -0
  195. package/src/skill/docs/index.md +77 -0
  196. package/src/skill/docs/stack/account-ui/customization.md +378 -0
  197. package/src/skill/docs/stack/account-ui/environment-variables.md +325 -0
  198. package/src/skill/docs/stack/account-ui/features/admin.md +76 -0
  199. package/src/skill/docs/stack/account-ui/features/api-keys.md +22 -0
  200. package/src/skill/docs/stack/account-ui/features/avatars.md +37 -0
  201. package/src/skill/docs/stack/account-ui/features/cli-authorize.md +21 -0
  202. package/src/skill/docs/stack/account-ui/features/index.md +291 -0
  203. package/src/skill/docs/stack/account-ui/features/organizations.md +29 -0
  204. package/src/skill/docs/stack/account-ui/features/passkeys.md +31 -0
  205. package/src/skill/docs/stack/account-ui/features/passwordless.md +28 -0
  206. package/src/skill/docs/stack/account-ui/features/sessions.md +20 -0
  207. package/src/skill/docs/stack/account-ui/hooks.md +209 -0
  208. package/src/skill/docs/stack/account-ui/index.md +147 -0
  209. package/src/skill/docs/stack/account-ui/library-usage.md +257 -0
  210. package/src/skill/docs/stack/account-ui/standalone.md +149 -0
  211. package/src/skill/docs/stack/account-ui/with-quickback.md +160 -0
  212. package/src/skill/docs/stack/account-ui/worker.md +362 -0
  213. package/src/skill/docs/stack/auth/api-keys.md +15 -0
  214. package/src/skill/docs/stack/auth/device-auth.md +14 -0
  215. package/src/skill/docs/stack/auth/index.md +64 -0
  216. package/src/skill/docs/stack/auth/jwt-optimization.md +245 -0
  217. package/src/skill/docs/stack/auth/plugins/aws-ses.md +127 -0
  218. package/src/skill/docs/stack/auth/plugins/combo-auth.md +74 -0
  219. package/src/skill/docs/stack/auth/plugins/index.md +340 -0
  220. package/src/skill/docs/stack/auth/plugins/upgrade-anonymous.md +155 -0
  221. package/src/skill/docs/stack/auth/security.md +455 -0
  222. package/src/skill/docs/stack/auth/using-auth.md +39 -0
  223. package/src/skill/docs/stack/cms/actions.md +199 -0
  224. package/src/skill/docs/stack/cms/components.md +479 -0
  225. package/src/skill/docs/stack/cms/connecting.md +199 -0
  226. package/src/skill/docs/stack/cms/dashboard.md +39 -0
  227. package/src/skill/docs/stack/cms/index.md +158 -0
  228. package/src/skill/docs/stack/cms/inline-editing.md +136 -0
  229. package/src/skill/docs/stack/cms/pages.md +275 -0
  230. package/src/skill/docs/stack/cms/record-layouts.md +151 -0
  231. package/src/skill/docs/stack/cms/schema-format.md +437 -0
  232. package/src/skill/docs/stack/cms/schema-registry.md +200 -0
  233. package/src/skill/docs/stack/cms/security.md +203 -0
  234. package/src/skill/docs/stack/cms/table-views.md +142 -0
  235. package/src/skill/docs/stack/index.md +65 -0
  236. package/src/skill/docs/stack/queues/handlers.md +317 -0
  237. package/src/skill/docs/stack/queues/index.md +56 -0
  238. package/src/skill/docs/stack/queues/using-queues.md +192 -0
  239. package/src/skill/docs/stack/realtime/durable-objects.md +488 -0
  240. package/src/skill/docs/stack/realtime/index.md +73 -0
  241. package/src/skill/docs/stack/realtime/partyserver-rooms.md +146 -0
  242. package/src/skill/docs/stack/realtime/using-realtime.md +211 -0
  243. package/src/skill/docs/stack/storage/index.md +17 -0
  244. package/src/skill/docs/stack/storage/kv.md +204 -0
  245. package/src/skill/docs/stack/storage/r2.md +232 -0
  246. package/src/skill/docs/stack/storage/using-kv.md +70 -0
  247. package/src/skill/docs/stack/storage/using-r2.md +55 -0
  248. package/src/skill/docs/stack/vector/embeddings.md +554 -0
  249. package/src/skill/docs/stack/vector/index.md +44 -0
  250. package/src/skill/docs/stack/vector/using-embeddings.md +186 -0
  251. package/src/skill/docs/stack/webhooks/inbound.md +186 -0
  252. package/src/skill/docs/stack/webhooks/index.md +36 -0
  253. package/src/skill/docs/stack/webhooks/outbound.md +281 -0
@@ -0,0 +1,312 @@
1
+ # AI Developer Tools
2
+
3
+ Build Quickback apps faster with AI. The Quickback CLI ships with an MCP server, Claude Code skill, and Cursor IDE rules — so any AI tool can help you write security configurations, define features, and understand your project.
4
+
5
+ ## Quick Install
6
+
7
+ ```bash
8
+ # Install the CLI (includes all AI tools)
9
+ npm install -g @quickback-dev/cli
10
+
11
+ # Claude Code skill
12
+ quickback claude install
13
+
14
+ # Cursor IDE rules
15
+ quickback cursor install
16
+
17
+ # MCP server (configure in your AI tool, see below)
18
+ quickback mcp
19
+ ```
20
+
21
+ ## MCP Server
22
+
23
+ The MCP server makes Quickback documentation and project context available to **any** MCP-compatible AI tool.
24
+
25
+ ### Configuration
26
+
27
+ Add to your AI tool's MCP config:
28
+
29
+ ```json
30
+ {
31
+ "mcpServers": {
32
+ "quickback": {
33
+ "command": "npx",
34
+ "args": ["@quickback-dev/cli", "mcp"]
35
+ }
36
+ }
37
+ }
38
+ ```
39
+
40
+ | Tool | Config File |
41
+ |------|-------------|
42
+ | Claude Desktop | `~/Library/Application Support/Claude/claude_desktop_config.json` (macOS) |
43
+ | Cursor | `.cursor/mcp.json` in your project |
44
+ | VS Code | `.vscode/mcp.json` in your project |
45
+
46
+ ### Available Tools
47
+
48
+ | Tool | Description |
49
+ |------|-------------|
50
+ | `list_topics` | List all 100+ documentation topics |
51
+ | `get_doc` | Get a specific doc (supports fuzzy matching — e.g., "firewall") |
52
+ | `search_docs` | Search documentation by keyword |
53
+ | `read_config` | Read your project's `quickback.config.ts` |
54
+ | `list_features` | List features and their table files |
55
+ | `read_feature` | Read a specific feature's source code |
56
+ | `read_schema_registry` | Read the compiled `schema-registry.json` |
57
+
58
+ All documentation topics are also registered as MCP resources at `quickback://docs/{topic}`.
59
+
60
+ ## Claude Code Skill
61
+
62
+ ### Installation
63
+
64
+ Install via the CLI (recommended):
65
+
66
+ ```bash
67
+ quickback claude install --global # All projects (~/.claude/)
68
+ quickback claude install --local # This project only
69
+ ```
70
+
71
+ Or install the standalone npm package:
72
+
73
+ ```bash
74
+ npm install -g @quickback-dev/skill
75
+ ```
76
+
77
+ Or when creating a new project, the skill is included automatically:
78
+
79
+ ```bash
80
+ npx @quickback-dev/cli create cloudflare my-app
81
+ ```
82
+
83
+ ## What You Get
84
+
85
+ When you install the Quickback skill, you get:
86
+
87
+ ### Quickback Skill
88
+
89
+ Claude understands Quickback concepts and can answer questions about:
90
+
91
+ - **Security layers** - Firewall, Access, Guards, Masking, Actions
92
+ - **Common patterns** - Multi-tenant, owner-scoped, hierarchical access
93
+ - **Best practices** - Field protection, role-based access, PII handling
94
+ - **Database dialects** - SQLite/D1, PostgreSQL, MySQL syntax
95
+
96
+ ### Quickback Specialist Agent
97
+
98
+ Claude also gets a specialized agent that activates automatically when you're:
99
+
100
+ - Creating new resources with schemas and security configurations
101
+ - Configuring security layers (Firewall, Access, Guards, Masking)
102
+ - Defining actions for business logic
103
+ - Debugging configuration issues
104
+
105
+ The agent generates complete, working code in your `quickback/features/` directory.
106
+
107
+ ## Usage
108
+
109
+ ### Let Claude help automatically
110
+
111
+ Just describe what you need. Claude will use Quickback knowledge when relevant:
112
+
113
+ ```
114
+ "Create a tasks resource where users can only see their own tasks,
115
+ but admins can see all tasks in the organization"
116
+ ```
117
+
118
+ ### Invoke directly
119
+
120
+ Use `/quickback` to explicitly activate the skill:
121
+
122
+ ```
123
+ /quickback How do I configure soft delete?
124
+ ```
125
+
126
+ ## Example Conversations
127
+
128
+ ### Building a New Resource
129
+
130
+ **You:** "I need a resource for invoices. Users should only see invoices from their organization. The status field should only be changeable through approve/reject actions. Mask the customer email for non-admins."
131
+
132
+ **Claude:** Creates complete configuration with:
133
+ - Firewall scoped to organization
134
+ - Protected status field with approve/reject actions
135
+ - Email masking with admin bypass
136
+ - Appropriate guards for createable/updatable fields
137
+
138
+ ### Understanding Existing Code
139
+
140
+ **You:** "Explain what this firewall configuration does"
141
+
142
+ **Claude:** Breaks down the WHERE clauses, explains the security implications, and identifies potential issues.
143
+
144
+ ### Debugging Configuration
145
+
146
+ **You:** "My users can see records from other organizations. What's wrong?"
147
+
148
+ **Claude:** Analyzes your firewall setup, checks for `exception: true` or missing organization scope, and suggests fixes.
149
+
150
+ ## What Claude Knows
151
+
152
+ ### Security Layers
153
+
154
+ | Layer | What Claude Helps With |
155
+ |-------|------------------------|
156
+ | **Firewall** | Data isolation patterns, WHERE clause generation, soft delete |
157
+ | **Access** | Role-based permissions, record-level conditions, combining rules |
158
+ | **Guards** | Field protection, createable vs updatable, immutable fields |
159
+ | **Masking** | PII redaction, role-based visibility, mask types |
160
+ | **Actions** | Custom endpoints, protected field updates, input validation |
161
+
162
+ ### Common Patterns
163
+
164
+ Claude recognizes and can implement these patterns:
165
+
166
+ - **Multi-tenant SaaS** - Organization-scoped with role hierarchy
167
+ - **Personal data apps** - Owner-scoped resources
168
+ - **Hierarchical access** - Admins see all, users see own
169
+ - **Public resources** - Reference data, system tables
170
+ - **Workflow resources** - Status fields with action-based transitions
171
+
172
+ ### Database Support
173
+
174
+ Claude generates correct syntax for your database:
175
+
176
+ ```typescript
177
+ // SQLite / Cloudflare D1
178
+ createdAt: integer('created_at', { mode: 'timestamp' })
179
+
180
+ // PostgreSQL / Supabase
181
+ createdAt: timestamp('created_at').defaultNow()
182
+
183
+ // MySQL
184
+ createdAt: timestamp('created_at')
185
+ ```
186
+
187
+ ## Tips for Best Results
188
+
189
+ **Be specific about security requirements:**
190
+
191
+ ```
192
+ // Good
193
+ "Users can only see their own tasks. Admins can see all tasks
194
+ in the organization. The priority field can only be set by admins."
195
+
196
+ // Less helpful
197
+ "Create a tasks resource"
198
+ ```
199
+
200
+ **Describe your user types:**
201
+
202
+ ```
203
+ "We have three roles: admin (full access), manager (can approve),
204
+ and member (can only edit their own records)"
205
+ ```
206
+
207
+ **Mention sensitive fields:**
208
+
209
+ ```
210
+ "The ssn field should be masked for everyone except HR admins"
211
+ ```
212
+
213
+ ## Common Tasks
214
+
215
+ ### Create a complete resource
216
+
217
+ ```
218
+ "Create an employees resource for a multi-tenant HR app. Include
219
+ fields for name, email, department, salary. Mask salary for
220
+ non-admins. Only HR can create/delete employees."
221
+ ```
222
+
223
+ ### Add an action to existing resource
224
+
225
+ ```
226
+ "Add an 'approve' action to the expenses resource that sets
227
+ status to 'approved' and records the approver"
228
+ ```
229
+
230
+ ### Configure access control
231
+
232
+ ```
233
+ "Update the projects resource so managers can edit any project
234
+ in their organization, but members can only edit projects they created"
235
+ ```
236
+
237
+ ### Set up masking
238
+
239
+ ```
240
+ "Add masking to the customers resource: email partially masked,
241
+ phone last 4 digits only, SSN fully redacted except for finance role"
242
+ ```
243
+
244
+ ## Troubleshooting
245
+
246
+ ### Skill not found
247
+
248
+ Verify the skill is installed:
249
+
250
+ ```bash
251
+ ls ~/.claude/skills/quickback/SKILL.md
252
+ ```
253
+
254
+ If missing, reinstall:
255
+
256
+ ```bash
257
+ npm install -g @quickback-dev/skill
258
+ ```
259
+
260
+ ### Claude doesn't understand Quickback
261
+
262
+ Make sure the skill file exists and Claude Code is restarted. You can also invoke it directly with `/quickback` to force it to load.
263
+
264
+ ### Generated code has errors
265
+
266
+ Run `quickback compile` to validate. Share the error messages with Claude for fixes.
267
+
268
+ ## Cursor IDE Rules
269
+
270
+ Cursor rules provide Quickback context when editing `quickback/**/*.ts` files.
271
+
272
+ ### Installation
273
+
274
+ ```bash
275
+ quickback cursor install
276
+ ```
277
+
278
+ This installs `quickback.mdc` to `.cursor/rules/` in your project. Commit this file so your team gets the rules automatically.
279
+
280
+ ### Management
281
+
282
+ ```bash
283
+ quickback cursor status # Check installation
284
+ quickback cursor update # Update to latest version
285
+ quickback cursor remove # Remove the rules
286
+ ```
287
+
288
+ ## Updating
289
+
290
+ To update all AI tools to the latest version:
291
+
292
+ ```bash
293
+ npm update -g @quickback-dev/cli
294
+ quickback claude update # Update Claude skill
295
+ quickback cursor update # Update Cursor rules
296
+ ```
297
+
298
+ The MCP server always uses the latest installed version automatically.
299
+
300
+ ## Resources
301
+
302
+ - [Getting Started with AI Tools](/compiler/getting-started/claude-code) - Setup guide
303
+ - [Getting Started](/compiler/getting-started) - Get your first Quickback project running
304
+ - [Definitions Overview](/compiler/definitions) - Understand the security layer model
305
+ - [npm package](https://www.npmjs.com/package/@quickback-dev/cli) - CLI package
306
+
307
+ ## Feedback
308
+
309
+ Found an issue with the AI tools integration?
310
+
311
+ - [GitHub Issues](https://github.com/kardoe/quickback/issues)
312
+ - [Quickback Documentation](https://docs.quickback.dev)
@@ -0,0 +1,63 @@
1
+ # Authentication
2
+
3
+ The CLI supports two authentication methods: interactive login for development and API keys for CI/CD.
4
+
5
+ ## Interactive Login (Recommended)
6
+
7
+ The CLI uses [OAuth 2.0 Device Authorization](https://datatracker.ietf.org/doc/html/rfc8628) to authenticate:
8
+
9
+ ```bash
10
+ quickback login
11
+ ```
12
+
13
+ A code is displayed in your terminal. Approve it in your browser and you're authenticated. See the [CLI Reference](/compiler/cloud-compiler/cli#login) for the full flow.
14
+
15
+ Credentials are stored at `~/.quickback/credentials.json` and include your session token, user info, and active organization.
16
+
17
+ ## API Key (CI/CD)
18
+
19
+ For non-interactive environments (CI/CD, scripts), use an API key:
20
+
21
+ ```bash
22
+ QUICKBACK_API_KEY=your_api_key quickback compile
23
+ ```
24
+
25
+ Create API keys from your [Quickback account](https://account.quickback.dev/profile). Each key is scoped to your organization.
26
+
27
+ The API key takes precedence over stored credentials from `quickback login`.
28
+
29
+ ## How Tokens Are Validated
30
+
31
+ The compiler-cloud worker validates authentication by forwarding your token to the Quickback API's `/internal/validate` endpoint via a [Cloudflare service binding](https://developers.cloudflare.com/workers/runtime-apis/bindings/service-bindings/). This resolves both session tokens (from `quickback login`) and API keys (from `QUICKBACK_API_KEY`).
32
+
33
+ ## Credential Storage
34
+
35
+ Credentials are stored at `~/.quickback/credentials.json`:
36
+
37
+ ```json
38
+ {
39
+ "token": "...",
40
+ "user": {
41
+ "id": "...",
42
+ "email": "paul@example.com",
43
+ "name": "Paul Stenhouse",
44
+ "tier": "free"
45
+ },
46
+ "expiresAt": "2026-02-16T01:42:21.519Z",
47
+ "organization": {
48
+ "id": "...",
49
+ "name": "Acme",
50
+ "slug": "acme"
51
+ }
52
+ }
53
+ ```
54
+
55
+ Sessions expire after 7 days. Run `quickback login` again to re-authenticate.
56
+
57
+ ## Organizations
58
+
59
+ After login, the CLI auto-selects your organization:
60
+ - **One organization** — automatically set as active.
61
+ - **Multiple organizations** — you're prompted to choose one.
62
+
63
+ The active organization is stored in your credentials and sent with compile requests, so the compiler knows which org context to use.
@@ -0,0 +1,307 @@
1
+ # CLI Reference
2
+
3
+ The Quickback CLI is the fastest way to create, compile, and manage your backend projects.
4
+
5
+ ## Installation
6
+
7
+ ```bash
8
+ npm install -g @quickback-dev/cli
9
+ ```
10
+
11
+ ## Commands
12
+
13
+ ### Create a Project
14
+
15
+ ```bash
16
+ quickback create <template> <name>
17
+ ```
18
+
19
+ **Templates:**
20
+ - `cloudflare` - Cloudflare Workers + D1 + Better Auth (free)
21
+ - `supabase` - Hono + Supabase Postgres + Supabase Auth (free)
22
+ - `blog` - Single-tenant blog (PUBLIC reads, admin writes) (free)
23
+ - `empty` - Cloudflare scaffold, no example features (free)
24
+ - `multi-tenant` - Full SaaS with orgs, teams, billing (pro)
25
+
26
+ **Example:**
27
+ ```bash
28
+ quickback create cloudflare my-app
29
+ ```
30
+
31
+ This scaffolds a complete project with:
32
+ - `quickback.config.ts` - Project configuration
33
+ - `quickback/features/` - Your table definitions
34
+ - Example todos feature with full security configuration
35
+
36
+ ### Compile Definitions
37
+
38
+ ```bash
39
+ quickback compile
40
+ ```
41
+
42
+ Reads your definitions and generates:
43
+ - Database migrations (Drizzle)
44
+ - API route handlers (Hono)
45
+ - TypeScript client SDK
46
+ - OpenAPI specification
47
+
48
+ Run this after making changes to your definitions.
49
+
50
+ #### Generated `src/` is hermetic
51
+
52
+ Every file under `src/` carries a `Generated by quickback.dev` header and is owned by the compiler. Before each compile writes its output, the CLI:
53
+
54
+ 1. Snapshots the existing `src/` tree to `quickback/.archives/src-<ISO-timestamp>/` (a plain recursive copy — `cp -R` semantics, no compression).
55
+ 2. Wipes `src/` entirely.
56
+ 3. Writes the fresh manifest from the compiler.
57
+
58
+ This prevents stale output: removed features stop leaving orphan folders, deleted SPA assets with old content hashes get cleared, and `.DS_Store` files don't keep retired directories alive.
59
+
60
+ The most recent **3** archives are retained (older ones are pruned automatically). If a compile produces unexpected output, your last-known-good tree is sitting in `quickback/.archives/` ready to grep or copy back:
61
+
62
+ ```bash
63
+ ls quickback/.archives/
64
+ # src-2026-04-27T16-31-02-014/
65
+ # src-2026-04-27T16-29-44-882/
66
+ # src-2026-04-27T16-12-19-301/
67
+ ```
68
+
69
+ As a safety net, the wipe is **skipped** when the manifest contains zero files for the target directory — that's almost always an upstream compile bug, and we'd rather keep your last working tree than overwrite it with nothing.
70
+
71
+ ### Initialize Structure
72
+
73
+ ```bash
74
+ quickback init
75
+ ```
76
+
77
+ Creates the Quickback folder structure in an existing project:
78
+ ```
79
+ quickback/
80
+ features/
81
+ quickback.config.ts
82
+ ```
83
+
84
+ ### View Documentation
85
+
86
+ ```bash
87
+ quickback docs # List available topics
88
+ quickback docs <topic> # Show documentation for a topic
89
+ ```
90
+
91
+ **Available topics:**
92
+ - `firewall` - Data isolation layer
93
+ - `access` - Role-based permissions
94
+ - `guards` - Field protection
95
+ - `masking` - PII redaction
96
+ - `actions` - Custom business logic
97
+ - `api` - CRUD endpoints reference
98
+ - `config` - Configuration reference
99
+ - `features` - Schema definitions
100
+
101
+ Documentation is bundled with the CLI and works offline.
102
+
103
+ ### Manage Claude Code Skill
104
+
105
+ ```bash
106
+ quickback claude install # Interactive install
107
+ quickback claude install --global # Install to ~/.claude/skills/
108
+ quickback claude install --local # Install to ./quickback/.claude/
109
+ quickback claude update # Update to latest version
110
+ quickback claude remove # Remove installed skill
111
+ quickback claude status # Check installation status
112
+ ```
113
+
114
+ The Quickback skill for Claude Code provides AI assistance for:
115
+ - Creating resource definitions with proper security layers
116
+ - Configuring Firewall, Access, Guards, and Masking
117
+ - Debugging configuration issues
118
+ - Understanding security patterns
119
+
120
+ ## Authentication
121
+
122
+ ### Login
123
+
124
+ ```bash
125
+ quickback login
126
+ ```
127
+
128
+ Uses the [OAuth 2.0 Device Authorization Grant](https://datatracker.ietf.org/doc/html/rfc8628) (RFC 8628) to authenticate securely without exposing tokens in URLs.
129
+
130
+ **How it works:**
131
+
132
+ 1. The CLI requests a one-time device code from the Quickback API.
133
+ 2. A code is displayed in your terminal (e.g., `AUL8-H93S`).
134
+ 3. Your browser opens to the Quickback account page where you approve the code.
135
+ 4. The CLI detects approval and exchanges it for a session token.
136
+ 5. If you belong to one organization, it's auto-selected. If you have multiple, you choose one.
137
+ 6. Credentials are stored locally.
138
+
139
+ ```
140
+ $ quickback login
141
+
142
+ 🔐 Quickback Login
143
+
144
+ ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
145
+
146
+ Your code: AUL8-H93S
147
+
148
+ Visit: https://account.quickback.dev/cli/authorize
149
+
150
+ ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
151
+
152
+ ✓ Login successful!
153
+ Welcome, Paul Stenhouse!
154
+
155
+ Using organization: Acme
156
+ ✓ Active organization: Acme
157
+ ```
158
+
159
+ This flow works in headless environments (SSH, containers, WSL) since it doesn't require a localhost callback.
160
+
161
+ ### Logout
162
+
163
+ ```bash
164
+ quickback logout
165
+ ```
166
+
167
+ Clears stored credentials from `~/.quickback/credentials.json`.
168
+
169
+ ### Check Auth Status
170
+
171
+ ```bash
172
+ quickback whoami
173
+ ```
174
+
175
+ Shows the currently authenticated user, organization, and token expiration.
176
+
177
+ ### Credential Storage
178
+
179
+ Credentials are stored at `~/.quickback/credentials.json`:
180
+
181
+ ```json
182
+ {
183
+ "token": "...",
184
+ "user": {
185
+ "id": "...",
186
+ "email": "paul@example.com",
187
+ "name": "Paul Stenhouse",
188
+ "tier": "free"
189
+ },
190
+ "expiresAt": "2026-02-16T01:42:21.519Z",
191
+ "organization": {
192
+ "id": "...",
193
+ "name": "Acme",
194
+ "slug": "acme"
195
+ }
196
+ }
197
+ ```
198
+
199
+ Sessions expire after 7 days. Run `quickback login` again to re-authenticate.
200
+
201
+ ### Organizations
202
+
203
+ After login, the CLI auto-selects your organization:
204
+ - **One organization** - automatically set as active.
205
+ - **Multiple organizations** - you're prompted to choose one.
206
+
207
+ The active organization is stored in your credentials and sent with compile requests, so the compiler knows which org context to use.
208
+
209
+ ## Quick Start
210
+
211
+ ```bash
212
+ # 1. Create a new project
213
+ quickback create cloudflare my-app
214
+ cd my-app
215
+
216
+ # 2. Define your tables in quickback/features/
217
+ # (Already has example todos feature)
218
+
219
+ # 3. Compile
220
+ quickback compile
221
+
222
+ # 4. Run
223
+ npm run dev
224
+ ```
225
+
226
+ ## Options
227
+
228
+ | Flag | Description |
229
+ |------|-------------|
230
+ | `-v, --version` | Show version number |
231
+ | `-h, --help` | Show help message |
232
+
233
+ ## Environment Variables
234
+
235
+ | Variable | Description |
236
+ |----------|-------------|
237
+ | `QUICKBACK_API_KEY` | API key for authentication (alternative to `quickback login`) |
238
+ | `QUICKBACK_API_URL` | Override compiler API URL |
239
+
240
+ ### API Key Authentication
241
+
242
+ Use an API key instead of interactive login. Useful for CI/CD pipelines and automated workflows:
243
+
244
+ ```bash
245
+ # Pass API key for a single command
246
+ QUICKBACK_API_KEY=your_api_key quickback compile
247
+
248
+ # Or export for the session
249
+ export QUICKBACK_API_KEY=your_api_key
250
+ quickback compile
251
+ ```
252
+
253
+ The API key takes precedence over stored credentials from `quickback login`.
254
+
255
+ You can create API keys from your [Quickback account](https://account.quickback.dev/profile). Each key is scoped to your organization.
256
+
257
+ ### Custom Compiler URL
258
+
259
+ Point the CLI to a different compiler (local or custom):
260
+
261
+ ```bash
262
+ # Use a local compiler
263
+ QUICKBACK_API_URL=http://localhost:3020 quickback compile
264
+
265
+ # Or export for the session
266
+ export QUICKBACK_API_URL=http://localhost:3020
267
+ quickback compile
268
+ ```
269
+
270
+ See [Local Compiler](/compiler/cloud-compiler/local-compiler) for running the compiler locally with Docker.
271
+
272
+ ## Troubleshooting
273
+
274
+ ### "Command not found: quickback"
275
+
276
+ Make sure the CLI is installed globally:
277
+ ```bash
278
+ npm install -g @quickback-dev/cli
279
+ ```
280
+
281
+ Or use npx:
282
+ ```bash
283
+ npx @quickback-dev/cli create cloudflare my-app
284
+ ```
285
+
286
+ ### Compile errors
287
+
288
+ 1. Check your `quickback.config.ts` exists and is valid
289
+ 2. Ensure all tables in `quickback/features/` have valid exports
290
+ 3. Run `quickback compile` with `--verbose` for detailed output
291
+ 4. For rename-related Drizzle failures in CI/headless runs, configure `compiler.migrations.renames` in `quickback.config.ts`
292
+
293
+ ### Authentication issues
294
+
295
+ Clear credentials and re-authenticate:
296
+ ```bash
297
+ quickback logout
298
+ quickback login
299
+ ```
300
+
301
+ ### "Could not load organizations"
302
+
303
+ This can happen if your session token expired or if the API is temporarily unavailable. Re-login:
304
+ ```bash
305
+ quickback logout
306
+ quickback login
307
+ ```