@usecontextlayer/cli 0.14.3 → 0.16.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 (32) hide show
  1. package/README.md +38 -0
  2. package/dist/auth-DOsE8GwJ.mjs +6847 -0
  3. package/dist/auth-DOsE8GwJ.mjs.map +1 -0
  4. package/dist/auth.d.mts +23 -0
  5. package/dist/auth.d.mts.map +1 -0
  6. package/dist/auth.mjs +2 -0
  7. package/dist/cli.mjs +177 -74
  8. package/dist/cli.mjs.map +1 -1
  9. package/dist/{resources-DEdwfmku.mjs → resources-B-EYHG1j.mjs} +198 -5665
  10. package/dist/resources-B-EYHG1j.mjs.map +1 -0
  11. package/dist/rolldown-runtime-EAsCxrDo.mjs +14 -0
  12. package/dist/template/AGENTS.md +13 -0
  13. package/dist/template/README.md +46 -0
  14. package/dist/template/app/root.tsx +28 -0
  15. package/dist/template/app/routes/home.tsx +17 -3
  16. package/dist/template/databases/updates/drizzle.config.ts +8 -0
  17. package/dist/template/databases/updates/migrations/0000_create_updates.sql +6 -0
  18. package/dist/template/databases/updates/migrations/meta/0000_snapshot.json +14 -0
  19. package/dist/template/databases/updates/migrations/meta/_journal.json +13 -0
  20. package/dist/template/databases/updates/migrations/migrations.js +10 -0
  21. package/dist/template/databases/updates/schema.ts +8 -0
  22. package/dist/template/workers/app.ts +3 -2
  23. package/dist/template/workers/local-resources/index.ts +6 -0
  24. package/dist/template/workers/local-resources/wrangler.jsonc +19 -0
  25. package/dist/vite.d.mts +4427 -3
  26. package/dist/vite.d.mts.map +1 -1
  27. package/dist/vite.mjs +94 -10
  28. package/dist/vite.mjs.map +1 -1
  29. package/package.json +19 -3
  30. package/dist/resources-DEdwfmku.mjs.map +0 -1
  31. package/dist/template/workers/local-tools/index.ts +0 -1
  32. package/dist/template/workers/local-tools/wrangler.jsonc +0 -5
package/README.md ADDED
@@ -0,0 +1,38 @@
1
+ # @usecontextlayer/cli
2
+
3
+ Create and deploy ContextLayer slates, and connect accounts with the `ctx` CLI.
4
+
5
+ The [domain model](https://github.com/usecontextlayer/contextlayer/blob/main/ARCHITECTURE.md#domain-model) defines slates, declarations, resources, Owners, and assignments.
6
+
7
+ Use Node.js 24 or newer, pnpm, and Git. Git author identity must be configured; initialization displays Git's configuration instructions when it is missing.
8
+
9
+ Start with login, then create and run your slate:
10
+
11
+ ```sh
12
+ npx @usecontextlayer/cli login
13
+ npx @usecontextlayer/cli init my-slate
14
+ cd my-slate
15
+ pnpm dev
16
+ ```
17
+
18
+ Approve login in your browser. Open the local URL printed by the development server. Initialization prints your slate's dashboard link and hosted URL; the hosted URL becomes usable after a successful Git push deployment.
19
+
20
+ The checkout's README explains local development, connections, and deployment. The [SDK guide](https://www.npmjs.com/package/@usecontextlayer/sdk) describes loaders, tools, and the shared app layout.
21
+
22
+ Connect an account to ContextLayer in your browser, then assign the connected account to a connection declared by your slate. Already connected accounts can go directly to assignment. The SDK's Gmail recipe includes this full sequence.
23
+
24
+ Command syntax and options live in the CLI's help:
25
+
26
+ ```sh
27
+ npx @usecontextlayer/cli --help
28
+ ```
29
+
30
+ Deploy from the checkout's `main` branch:
31
+
32
+ ```sh
33
+ git add .
34
+ git commit
35
+ git push -u origin main
36
+ ```
37
+
38
+ The native Git remote starts ContextLayer's build and deployment pipeline.