@usecontextlayer/cli 0.14.3 → 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.
- package/README.md +36 -0
- package/dist/auth-CMrKVwsH.mjs +6847 -0
- package/dist/auth-CMrKVwsH.mjs.map +1 -0
- package/dist/auth.d.mts +23 -0
- package/dist/auth.d.mts.map +1 -0
- package/dist/auth.mjs +2 -0
- package/dist/cli.mjs +141 -38
- package/dist/cli.mjs.map +1 -1
- package/dist/{resources-DEdwfmku.mjs → resources-5FTDu19i.mjs} +152 -5619
- package/dist/resources-5FTDu19i.mjs.map +1 -0
- package/dist/rolldown-runtime-EAsCxrDo.mjs +14 -0
- package/dist/template/AGENTS.md +13 -0
- package/dist/template/README.md +44 -0
- package/dist/template/app/root.tsx +28 -0
- package/dist/template/app/routes/home.tsx +16 -3
- package/dist/template/databases/updates/drizzle.config.ts +8 -0
- package/dist/template/databases/updates/migrations/0000_create_updates.sql +6 -0
- package/dist/template/databases/updates/migrations/meta/0000_snapshot.json +14 -0
- package/dist/template/databases/updates/migrations/meta/_journal.json +13 -0
- package/dist/template/databases/updates/migrations/migrations.js +10 -0
- package/dist/template/databases/updates/schema.ts +8 -0
- package/dist/template/workers/app.ts +2 -1
- package/dist/template/workers/local-resources/index.ts +1 -0
- package/dist/template/workers/local-resources/wrangler.jsonc +19 -0
- package/dist/vite.d.mts +4426 -2
- package/dist/vite.d.mts.map +1 -1
- package/dist/vite.mjs +92 -8
- package/dist/vite.mjs.map +1 -1
- package/package.json +19 -3
- package/dist/resources-DEdwfmku.mjs.map +0 -1
- package/dist/template/workers/local-tools/index.ts +0 -1
- 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.
|