@grove-dev/cli 0.2.6 → 0.2.13
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 +27 -21
- package/dist/index.js +566 -32
- package/dist/index.js.map +1 -1
- package/dist/package.json +5 -8
- package/dist/template-loader.d.ts +56 -11
- package/dist/template-loader.d.ts.map +1 -1
- package/dist/template-loader.js +144 -28
- package/dist/template-loader.js.map +1 -1
- package/package.json +6 -9
package/README.md
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
> The Grove command line.
|
|
4
4
|
|
|
5
|
-
Scaffolds Grove-powered spaces, orchestrates `@grove-dev/core` commands, and runs framework
|
|
5
|
+
Scaffolds Grove-powered spaces, orchestrates `@grove-dev/core` commands, and runs the framework's `build` / `dev` against the project's own framework adapter.
|
|
6
6
|
|
|
7
7
|
```bash
|
|
8
8
|
pnpm add -g @grove-dev/cli
|
|
@@ -10,29 +10,34 @@ pnpm add -g @grove-dev/cli
|
|
|
10
10
|
|
|
11
11
|
## Design
|
|
12
12
|
|
|
13
|
-
The CLI is intentionally **framework-agnostic**. It depends on `@grove-dev/core` and on `commander`, and treats framework
|
|
13
|
+
The CLI is intentionally **framework-agnostic**. It depends on `@grove-dev/core` and on `commander`, and treats the framework adapter (`@grove-dev/astro`) as a peer dependency. Templates are copied from the framework adapter's `templates/` directory at scaffold time; the CLI does not import or execute framework code at runtime.
|
|
14
14
|
|
|
15
15
|
This means:
|
|
16
16
|
|
|
17
17
|
- `pnpm add -g @grove-dev/cli` only pulls in `@grove-dev/core` and `commander`.
|
|
18
|
-
- `grove new --framework
|
|
18
|
+
- `grove new --framework astro` requires `@grove-dev/astro` to be installed.
|
|
19
19
|
- `grove build` and `grove dev` detect the framework from the project's `package.json` and spawn the matching command.
|
|
20
20
|
|
|
21
|
+
## V1 framework scope
|
|
22
|
+
|
|
23
|
+
`@grove-dev/cli` V1 scaffolds **Astro** projects only. The Next.js and SvelteKit adapters (`@grove-dev/nextjs`, `@grove-dev/svelte`) still exist as skeleton packages, but their templates are not yet functional (no pages / components / layouts) — selecting `--framework nextjs` or `--framework svelte` will fail with an "Unknown framework" error. See [`/CHANGELOG.md`](/CHANGELOG.md) for the plan to land them in v0.3.0.
|
|
24
|
+
|
|
21
25
|
## Commands
|
|
22
26
|
|
|
23
27
|
| Command | Purpose |
|
|
24
28
|
|---|---|
|
|
25
|
-
| `grove new [name] --framework
|
|
26
|
-
| `grove import <source>` | Parse a Markdown awesome list (GitHub URL, raw URL, or local path) into `data/
|
|
27
|
-
| `grove analyze [--limit N]` | Fetch GitHub metadata for each resource that has a repository, write `data/health.yml`. |
|
|
29
|
+
| `grove new [name] --framework astro [--template <t>] [--deploy <p>]` | Scaffold a new space from the Astro template. `--deploy` is `vercel`, `netlify`, `cloudflare`, `github-pages`, or `none` (writes a matching deploy workflow + config file). |
|
|
30
|
+
| `grove import <source>` | Parse a Markdown awesome list (GitHub URL, raw URL, or local path) into `data/records/*.yml`. |
|
|
28
31
|
| `grove validate` | Schema + reference checks. |
|
|
29
|
-
| `grove
|
|
30
|
-
| `sitemap` | Generate `public/sitemap.xml` from generated data. |
|
|
31
|
-
| `grove
|
|
32
|
-
| `grove
|
|
33
|
-
| `grove
|
|
34
|
-
| `grove
|
|
35
|
-
| `grove
|
|
32
|
+
| `grove generate` | Compile `data/records/*.yml` and `grove.config.ts` into `data/generated/records.{full,index,site-config}.json`. |
|
|
33
|
+
| `grove sitemap` | Generate `public/sitemap.xml` from generated data. |
|
|
34
|
+
| `grove llms` | Emit `public/llms.txt` and `public/llms-full.txt`. |
|
|
35
|
+
| `grove sync github` | Optional: enrich records with GitHub metadata (stars, forks, last commit, license). |
|
|
36
|
+
| `grove cleanup stale` | List cleanup candidates to `data/generated/stale-records.json`. |
|
|
37
|
+
| `grove workflows sync` | Re-emit GitHub workflow files (with `--force` to overwrite). |
|
|
38
|
+
| `grove build` | Run the project's framework build command (`pnpm exec astro build`). |
|
|
39
|
+
| `grove dev` | Start the framework dev server (`pnpm exec astro dev`). |
|
|
40
|
+
| `grove run [action]` | Dev-internal: scaffold from LOCAL template and run it (`dev` / `build` / `init`). |
|
|
36
41
|
|
|
37
42
|
## Scaffolding flow
|
|
38
43
|
|
|
@@ -41,20 +46,21 @@ grove new my-space --framework astro --deploy vercel
|
|
|
41
46
|
# 1. resolves @grove-dev/astro/templates/default
|
|
42
47
|
# 2. copies it into ./my-space
|
|
43
48
|
# 3. renames the project in template package.json
|
|
44
|
-
# 4. writes
|
|
45
|
-
# 5. writes deploy
|
|
46
|
-
#
|
|
49
|
+
# 4. writes grove.config.ts, README.md, .gitignore, data/, content/, public/, .github/
|
|
50
|
+
# 5. writes the deploy workflow + config file for the chosen provider
|
|
51
|
+
# (vercel → vercel.json + .github/workflows/deploy-vercel.yml;
|
|
52
|
+
# netlify → netlify.toml + .github/workflows/deploy-netlify.yml;
|
|
53
|
+
# cloudflare → wrangler.jsonc + .github/workflows/deploy-cloudflare.yml;
|
|
54
|
+
# github-pages → .github/workflows/build.yml with actions/deploy-pages;
|
|
55
|
+
# none → no deploy workflow)
|
|
56
|
+
# 6. writes validate-data.yml, issue templates, LICENSE
|
|
47
57
|
```
|
|
48
58
|
|
|
49
59
|
## Peer dependencies
|
|
50
60
|
|
|
51
61
|
| Peer | Purpose |
|
|
52
62
|
|---|---|
|
|
53
|
-
| `@grove-dev/astro` *(
|
|
54
|
-
| `@grove-dev/nextjs` *(optional)* | Required for `--framework nextjs` and `grove build`/`dev` in Next.js projects. |
|
|
55
|
-
| `@grove-dev/svelte` *(optional)* | Required for `--framework svelte` and `grove build`/`dev` in SvelteKit projects. |
|
|
56
|
-
|
|
57
|
-
All three are optional. The CLI only complains when you ask for a framework whose adapter is not installed.
|
|
63
|
+
| `@grove-dev/astro` *(required)* | Required for `--framework astro` and `grove build`/`dev` in Astro projects. |
|
|
58
64
|
|
|
59
65
|
## Development
|
|
60
66
|
|