create-clivly 0.8.0 → 0.9.1

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 (2) hide show
  1. package/README.md +70 -14
  2. package/package.json +2 -2
package/README.md CHANGED
@@ -1,46 +1,102 @@
1
1
  # create-clivly
2
2
 
3
- Scaffold [Clivly](https://clivly.com) — an embeddable CRM — into your existing
3
+ Scaffold [Clivly](https://clivly.com) — an embeddable CRM — into your **existing**
4
4
  app. This is the `create-*` entry point for `clivly init`: it runs exactly what
5
5
  `clivly init` runs, with the same flags, against a version-pinned `clivly`
6
6
  runtime.
7
7
 
8
+ > `create-clivly` does **not** create a new application. It scaffolds Clivly
9
+ > into a project you already have.
10
+
11
+ ## Prerequisites
12
+
13
+ | Requirement | Version / note |
14
+ | --- | --- |
15
+ | Node.js | **≥ 22** |
16
+ | An existing app | Next.js, TanStack Start, SvelteKit, Remix or Nuxt for route scaffolding |
17
+ | Drizzle ORM | Required to generate a config. Prisma/Kysely projects hand-write a `fetchPage` source instead |
18
+
19
+ ## Installation
20
+
8
21
  ```bash
9
22
  npm create clivly
10
23
  # or
11
24
  npx create-clivly
12
25
  # or
13
26
  pnpm create clivly
27
+ # or
28
+ yarn create clivly
29
+ # or
30
+ bun create clivly
14
31
  ```
15
32
 
16
- Clivly's stable packages publish on npm's `latest` tag. Use `@next` only when
17
- you are intentionally validating a prerelease build.
33
+ Published on npm's `latest` tag. Use `@next` only when you are deliberately
34
+ validating a prerelease build.
35
+
36
+ ## What it writes
37
+
38
+ | File | Owned by Clivly |
39
+ | --- | --- |
40
+ | `clivly.config.ts` | No — yours to edit |
41
+ | The tick route for your framework | Yes — `--force` to overwrite |
42
+ | The auth-verify route for your framework | Yes — `--force` to overwrite |
18
43
 
19
- It writes your `clivly.config.ts`, scaffolds the CRM routes, extends your
20
- Drizzle schema, and (unless `--no-login`) pairs this machine to your workspace.
44
+ Plus `CLIVLY_SECRET_KEY`, `CLIVLY_SYNC_TRIGGER_URL` and
45
+ `CLIVLY_SYNC_TRIGGER_SECRET` placeholders in your framework's env file
46
+ (`.env.local` on Next.js, `.dev.vars` on Cloudflare Workers, `.env` elsewhere),
47
+ and — unless `--no-login` — it pairs this machine with your workspace.
48
+
49
+ It creates **no database tables** and does **not** modify your ORM schema.
50
+ Clivly Cloud holds the CRM records; your own tables are only ever read.
21
51
 
22
52
  If you run it from a workspace root, it looks for a supported Drizzle app in
23
- that repo and scaffolds there. If it finds more than one, it stops and shows
24
- you the candidate directories instead of guessing.
53
+ that repo and scaffolds there. If it finds more than one, it stops and shows you
54
+ the candidate directories instead of guessing.
25
55
 
26
56
  ## Flags
27
57
 
28
- These are forwarded straight to `clivly init`:
58
+ Forwarded straight to `clivly init` — this is the full set.
29
59
 
30
60
  | Flag | Effect |
31
61
  | --- | --- |
32
- | `--dry-run` | Print the plan and the diff without writing anything |
33
- | `--force` | Overwrite existing files / `.env` values |
34
- | `--schema <path>` | Point at your Drizzle schema explicitly |
62
+ | `--dry-run` | Print the plan without writing anything |
63
+ | `--diff` | Show a diff for files that already exist |
64
+ | `--force` | Overwrite the files Clivly owns, and env values that already have a real value |
65
+ | `--yes` | Skip prompts |
35
66
  | `--no-login` | Skip the browser pairing step |
36
- | `--no-browser` | Don't auto-open the approval URL |
67
+ | `--no-browser` | Pair, but print the approval URL instead of opening it |
68
+ | `--schema <path\|package>` | Point at your Drizzle schema explicitly |
69
+ | `--db-import <specifier>` | Where the Drizzle instance lives, when it is not beside the schema. Accepts `@acme/database#database` |
70
+ | `--auth-import <specifier>` | Where your better-auth instance lives. Same `#exportName` form |
71
+ | `--contact-table <name>` | Use this table as the contact entity, skipping the heuristics |
72
+ | `--company-table <name>` | Same for companies |
73
+
74
+ Full explanations of each flag, plus monorepo behaviour and what happens when no
75
+ contact entity can be found, are in the
76
+ [`clivly` CLI README](https://github.com/amani-joseph/clivly.com/blob/master/packages/cli/README.md#clivly-init).
77
+
78
+ ## Verify
79
+
80
+ ```bash
81
+ npx clivly status
82
+ ```
37
83
 
38
84
  ## Relationship to `clivly`
39
85
 
40
86
  - **`create-clivly`** — the scaffolder you run once to set a project up.
41
- - **`clivly`** — the runtime you import (`import { createClivlySDK } from "clivly/sdk"`) and the CLI you run afterwards (`clivly status`, `clivly dev`, `clivly login`).
87
+ - **`clivly`** — the runtime you import
88
+ (`import { createClivlySDK } from "clivly/sdk"`) and the CLI you run afterwards
89
+ (`clivly status`, `clivly dev`, `clivly login`, `clivly add widget`).
42
90
 
43
91
  `create-clivly` pins the `clivly` version it installs, so the scaffolder and the
44
92
  runtime never drift.
45
93
 
46
- MIT licensed.
94
+ ## Related documentation
95
+
96
+ - **[Connecting to Clivly Cloud](https://github.com/amani-joseph/clivly.com/blob/master/docs/guides/connecting-to-clivly-cloud.md)** — the canonical end-to-end guide
97
+ - [`clivly` CLI README](https://github.com/amani-joseph/clivly.com/blob/master/packages/cli/README.md)
98
+ - [`@clivly/sdk` README](https://github.com/amani-joseph/clivly.com/blob/master/packages/sdk/README.md)
99
+
100
+ ## License
101
+
102
+ MIT
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "create-clivly",
3
- "version": "0.8.0",
3
+ "version": "0.9.1",
4
4
  "private": false,
5
5
  "type": "module",
6
6
  "description": "Scaffold Clivly into your app — the create-* entry point for `clivly init`.",
@@ -34,7 +34,7 @@
34
34
  }
35
35
  },
36
36
  "dependencies": {
37
- "clivly": "0.8.0"
37
+ "clivly": "0.9.1"
38
38
  },
39
39
  "author": "Joseph Amani",
40
40
  "engines": {