create-nextly-app 0.0.2-alpha.7 → 0.0.2-alpha.70
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 -9
- package/dist/cli.cjs +3047 -32460
- package/dist/cli.cjs.map +1 -1
- package/dist/cli.d.cts +1 -1
- package/dist/cli.d.ts +1 -1
- package/dist/cli.mjs +3048 -3602
- package/dist/cli.mjs.map +1 -1
- package/dist/create-nextly-5wiGMVI6.mjs +52550 -0
- package/dist/create-nextly-5wiGMVI6.mjs.map +1 -0
- package/dist/create-nextly-BbKGDrEC.cjs +52628 -0
- package/dist/create-nextly-BbKGDrEC.cjs.map +1 -0
- package/dist/index.cjs +3 -24861
- package/dist/index.d.cts +40 -34
- package/dist/index.d.ts +40 -34
- package/dist/index.mjs +1 -6
- package/package.json +28 -19
- package/skills/nextly-authentication/SKILL.md +187 -0
- package/skills/nextly-collections/SKILL.md +215 -0
- package/skills/nextly-deploy/SKILL.md +248 -0
- package/skills/nextly-install/SKILL.md +121 -0
- package/templates/base/.env.example +21 -6
- package/templates/base/AGENTS.md.template +226 -0
- package/templates/base/CLAUDE.md.template +1 -0
- package/templates/base/gitignore +42 -0
- package/templates/base/next.config.ts +11 -17
- package/templates/base/src/app/admin/[[...params]]/page.tsx +3 -0
- package/templates/base/src/app/admin/api/media/[[...path]]/route.ts +26 -0
- package/templates/base/src/app/globals.css +15 -2
- package/templates/base/src/app/layout.tsx +32 -18
- package/templates/base/src/lib/site-url.ts +55 -0
- package/templates/base/src/types/generated/nextly-types.ts +6 -4
- package/templates/base/src/types/generated/plugin-admin-components.generated.ts +6 -0
- package/templates/base/src/types/generated/plugin-admin-imports.generated.ts +32 -0
- package/templates/base/tsconfig.json +8 -1
- package/templates/blank/src/{components → app/(frontend)/components}/ThemeToggle.tsx +55 -24
- package/templates/blank/src/app/(frontend)/page.tsx +2 -2
- package/templates/blank/src/app/globals.css +37 -1
- package/templates/blank/src/app/layout.tsx +28 -18
- package/templates/blank/src/instrumentation.ts +32 -0
- package/templates/plugin/AGENTS.md.template +125 -0
- package/templates/plugin/CLAUDE.md.template +1 -0
- package/templates/plugin/README.md +48 -0
- package/templates/plugin/dev/.env.example +11 -0
- package/templates/plugin/dev/next.config.ts +43 -0
- package/templates/plugin/dev/nextly.config.ts +17 -0
- package/templates/plugin/dev/src/app/admin/[[...params]]/page.tsx +24 -0
- package/templates/plugin/dev/src/app/admin/api/[[...params]]/route.ts +19 -0
- package/templates/plugin/dev/src/app/layout.tsx +13 -0
- package/templates/plugin/dev/src/instrumentation.ts +25 -0
- package/templates/plugin/dev/src/seed-dev-user.ts +51 -0
- package/templates/plugin/dev/src/types/generated/plugin-admin-components.generated.ts +8 -0
- package/templates/plugin/dev/src/types/generated/plugin-admin-imports.generated.ts +37 -0
- package/templates/plugin/dev/tsconfig.json +22 -0
- package/templates/plugin/eslint.config.mjs +19 -0
- package/templates/plugin/gitignore +13 -0
- package/templates/plugin/src/admin/SettingsPage.tsx +57 -0
- package/templates/plugin/src/admin/index.ts +24 -0
- package/templates/plugin/src/collections/example.ts +13 -0
- package/templates/plugin/src/index.ts +6 -0
- package/templates/plugin/src/plugin.test.ts +35 -0
- package/templates/plugin/src/plugin.ts +48 -0
- package/templates/plugin/src/types.ts +17 -0
- package/templates/plugin/template.json +14 -0
- package/templates/plugin/tsconfig.json +18 -0
- package/templates/plugin/tsdown.config.ts +30 -0
- package/templates/plugin/vitest.config.ts +27 -0
- package/dist/chunk-RPGFJSDP.mjs +0 -28835
- package/dist/chunk-RPGFJSDP.mjs.map +0 -1
- package/dist/index.cjs.map +0 -1
- package/dist/index.mjs.map +0 -1
- package/templates/blank/src/access/README.md +0 -22
- package/templates/blank/src/collections/README.md +0 -22
- package/templates/blank/src/lib/README.md +0 -15
- package/templates/blank/src/singles/README.md +0 -19
- /package/templates/blank/src/{components → app/(frontend)/components}/README.md +0 -0
package/README.md
CHANGED
|
@@ -30,22 +30,46 @@ bun create nextly-app@alpha my-app
|
|
|
30
30
|
The CLI walks you through:
|
|
31
31
|
|
|
32
32
|
1. Project name (or `.` to install in the current directory)
|
|
33
|
-
2. Template (`blank` or `
|
|
33
|
+
2. Template (`blank`, `blog` or `plugin`)
|
|
34
34
|
3. Schema approach (`code-first` or `visual`), only for templates that support both
|
|
35
35
|
4. Database (`sqlite`, `postgresql`, or `mysql`)
|
|
36
36
|
5. Database connection string (skipped for SQLite)
|
|
37
37
|
|
|
38
|
+
### Which release a project gets
|
|
39
|
+
|
|
40
|
+
A project gets the release of Nextly its CLI belongs to: `create-nextly-app@<version>` declares `nextly` and every `@nextlyhq/*` package at exactly `<version>`, so the templates, the agent guide and the skills it writes match what is installed. To start on another release, run that release's CLI; to upgrade later, move every Nextly package to the new version together.
|
|
41
|
+
|
|
42
|
+
Adding Nextly to an app that already has a Nextly package at another version, or declared as a range, stops before changing anything and says what to set. With `--branch` or `--local-template`, the packages come from the `alpha` tag, the active release line, and `--use-yalc` links local builds.
|
|
43
|
+
|
|
38
44
|
After scaffolding, `pnpm dev` runs the project. Visit [http://localhost:3000/admin/setup](http://localhost:3000/admin/setup) to create the first admin user.
|
|
39
45
|
|
|
40
46
|
## Templates
|
|
41
47
|
|
|
42
|
-
| Template
|
|
43
|
-
|
|
|
44
|
-
| **blank**
|
|
45
|
-
| **blog**
|
|
48
|
+
| Template | Description |
|
|
49
|
+
| ---------- | ----------------------------------------------------------------------------------- |
|
|
50
|
+
| **blank** | Empty config. Define your own collections from scratch. |
|
|
51
|
+
| **blog** | Posts, categories, tags, frontend pages, RSS, sitemap, and admin-editable homepage. |
|
|
52
|
+
| **plugin** | A publishable Nextly plugin package, with a playground app to try it in. |
|
|
46
53
|
|
|
47
54
|
More templates (portfolio, e-commerce, SaaS admin) are planned.
|
|
48
55
|
|
|
56
|
+
### Plugin template
|
|
57
|
+
|
|
58
|
+
`--template plugin` creates a library to publish on npm rather than an app, so
|
|
59
|
+
it skips the schema-approach and database questions. Run from inside a
|
|
60
|
+
Next.js app, it still creates the plugin in its own directory.
|
|
61
|
+
|
|
62
|
+
- `src/` holds the plugin. Only the built `dist/` is published.
|
|
63
|
+
- `dev/` is a small Nextly app on SQLite that registers the plugin. `pnpm dev`
|
|
64
|
+
runs it, and `/admin` opens signed in as `dev@nextly.local`, a user created
|
|
65
|
+
on first start under `next dev` only.
|
|
66
|
+
- `pnpm test` boots the plugin in an in-memory Nextly; `pnpm build` builds it.
|
|
67
|
+
|
|
68
|
+
By default the plugin is copied from the template bundled in the CLI, and its
|
|
69
|
+
Nextly packages are pinned to that CLI's release, so its files and its
|
|
70
|
+
packages come from the same release. Any `--branch`, `main` included,
|
|
71
|
+
`--local-template` or `--use-yalc` uses the live template instead.
|
|
72
|
+
|
|
49
73
|
## Schema approaches
|
|
50
74
|
|
|
51
75
|
| Approach | Description |
|
|
@@ -64,6 +88,9 @@ pnpm create nextly-app@alpha my-blog --template blog --approach code-first
|
|
|
64
88
|
# Blank project with PostgreSQL
|
|
65
89
|
pnpm create nextly-app@alpha my-app --template blank --database postgresql
|
|
66
90
|
|
|
91
|
+
# A plugin package with its playground app
|
|
92
|
+
pnpm create nextly-app@alpha my-plugin --template plugin
|
|
93
|
+
|
|
67
94
|
# Skip prompts entirely (defaults: blank, SQLite, local storage)
|
|
68
95
|
pnpm create nextly-app@alpha my-app -y
|
|
69
96
|
```
|
|
@@ -73,10 +100,10 @@ pnpm create nextly-app@alpha my-app -y
|
|
|
73
100
|
| Flag | Short | Description | Default |
|
|
74
101
|
| ------------------- | ----- | ------------------------------------------------------------ | ------------------ |
|
|
75
102
|
| `--yes` | `-y` | Skip prompts and use defaults (blank, SQLite, local storage) | `false` |
|
|
76
|
-
| `--template <name>` | `-t` | Project template: `blank`, `blog`
|
|
103
|
+
| `--template <name>` | `-t` | Project template: `blank`, `blog`, `plugin` | Interactive prompt |
|
|
77
104
|
| `--approach <type>` | `-a` | Schema approach: `code-first`, `visual` | Interactive prompt |
|
|
78
105
|
| `--database <db>` | `-d` | Database: `sqlite`, `postgresql`, `mysql` | Interactive prompt |
|
|
79
|
-
| `--branch <branch>` | `-b` | Git branch
|
|
106
|
+
| `--branch <branch>` | `-b` | Git branch to take the template from | This release |
|
|
80
107
|
| `--version` | `-V` | Print the CLI version | |
|
|
81
108
|
| `--help` | `-h` | Show help text | |
|
|
82
109
|
|
|
@@ -122,9 +149,9 @@ Contributions of every size are welcome. Start with the [Contributing guide](htt
|
|
|
122
149
|
|
|
123
150
|
## Telemetry
|
|
124
151
|
|
|
125
|
-
The Nextly CLI (`create-nextly-app` and `nextly`) collects
|
|
152
|
+
The Nextly CLI (`create-nextly-app` and `nextly`) collects usage data under a random ID, to help us improve the tool: never your name, project contents, file paths or secrets. It is off in CI, Docker, production and non-interactive shells, and `nextly telemetry disable` turns it off.
|
|
126
153
|
|
|
127
|
-
See [nextlyhq.com/docs/telemetry](https://nextlyhq.com/docs/telemetry) for the full list of what is and is not collected, and for
|
|
154
|
+
See [nextlyhq.com/docs/telemetry](https://nextlyhq.com/docs/telemetry) for the full list of what is and is not collected, and for the environment variable that also turns it off (`NEXTLY_TELEMETRY_DISABLED=1`).
|
|
128
155
|
|
|
129
156
|
## License
|
|
130
157
|
|