@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.
- package/README.md +38 -0
- package/dist/auth-DOsE8GwJ.mjs +6847 -0
- package/dist/auth-DOsE8GwJ.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 +177 -74
- package/dist/cli.mjs.map +1 -1
- package/dist/{resources-DEdwfmku.mjs → resources-B-EYHG1j.mjs} +198 -5665
- package/dist/resources-B-EYHG1j.mjs.map +1 -0
- package/dist/rolldown-runtime-EAsCxrDo.mjs +14 -0
- package/dist/template/AGENTS.md +13 -0
- package/dist/template/README.md +46 -0
- package/dist/template/app/root.tsx +28 -0
- package/dist/template/app/routes/home.tsx +17 -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 +3 -2
- package/dist/template/workers/local-resources/index.ts +6 -0
- package/dist/template/workers/local-resources/wrangler.jsonc +19 -0
- package/dist/vite.d.mts +4427 -3
- package/dist/vite.d.mts.map +1 -1
- package/dist/vite.mjs +94 -10
- 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,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.
|