@usecontextlayer/cli 0.14.2 → 0.15.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 +36 -0
  2. package/dist/auth-CMrKVwsH.mjs +6847 -0
  3. package/dist/auth-CMrKVwsH.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 +500 -192
  8. package/dist/cli.mjs.map +1 -1
  9. package/dist/{app-CJgT3IKd.mjs → resources-5FTDu19i.mjs} +263 -5552
  10. package/dist/resources-5FTDu19i.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 +44 -0
  14. package/dist/template/app/root.tsx +28 -0
  15. package/dist/template/app/routes/home.tsx +16 -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 +2 -1
  23. package/dist/template/workers/local-resources/index.ts +1 -0
  24. package/dist/template/workers/local-resources/wrangler.jsonc +19 -0
  25. package/dist/vite.d.mts +4439 -11
  26. package/dist/vite.d.mts.map +1 -1
  27. package/dist/vite.mjs +95 -9
  28. package/dist/vite.mjs.map +1 -1
  29. package/package.json +20 -3
  30. package/dist/app-CJgT3IKd.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,36 @@
1
+ # @usecontextlayer/cli
2
+
3
+ Create, connect, and publish ContextLayer apps with the `ctx` CLI.
4
+
5
+ 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.
6
+
7
+ Start with login, then create and run your app:
8
+
9
+ ```sh
10
+ npx @usecontextlayer/cli login
11
+ npx @usecontextlayer/cli init my-app
12
+ cd my-app
13
+ pnpm dev
14
+ ```
15
+
16
+ Approve login in your browser. Open the local URL printed by the development server. Initialization prints your app's dashboard link and hosted URL; the hosted URL becomes usable after a successful Git push deployment.
17
+
18
+ The generated app's README explains local development, connections, and publication. The [SDK guide](https://www.npmjs.com/package/@usecontextlayer/sdk) describes loaders, tools, and the shared app layout.
19
+
20
+ Authorization connects a service account to ContextLayer; assignment binds it to a connection slug declared by your app. After approving authorization in your browser, use the assignment command to choose the account. Already connected accounts can go directly to assignment. The SDK's Gmail recipe includes this full sequence.
21
+
22
+ Command syntax and options live in the CLI's help:
23
+
24
+ ```sh
25
+ npx @usecontextlayer/cli --help
26
+ ```
27
+
28
+ Publish from the generated app's `main` branch:
29
+
30
+ ```sh
31
+ git add .
32
+ git commit
33
+ git push -u origin main
34
+ ```
35
+
36
+ The native Git remote starts ContextLayer's build and deployment pipeline.