@doubledigit/cli 0.2.0 → 0.2.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.
- package/README.md +102 -0
- package/package.json +3 -2
package/README.md
ADDED
|
@@ -0,0 +1,102 @@
|
|
|
1
|
+
# @doubledigit/cli
|
|
2
|
+
|
|
3
|
+
CLI for Double Digit local setup, project bootstrapping, extension management, and database workflows.
|
|
4
|
+
|
|
5
|
+
Double Digit is a pluggable Next.js/Payload developer control plane. The CLI is the supported command surface for creating a new Double Digit project and managing an existing local workspace.
|
|
6
|
+
|
|
7
|
+
## Usage
|
|
8
|
+
|
|
9
|
+
Run the published package directly:
|
|
10
|
+
|
|
11
|
+
```bash
|
|
12
|
+
npx @doubledigit/cli init my-project
|
|
13
|
+
pnpm dlx @doubledigit/cli init my-project
|
|
14
|
+
```
|
|
15
|
+
|
|
16
|
+
Inside a Double Digit project, use the repo-local shortcut:
|
|
17
|
+
|
|
18
|
+
```bash
|
|
19
|
+
pnpm dd doctor
|
|
20
|
+
pnpm dd onboard
|
|
21
|
+
pnpm dd run
|
|
22
|
+
```
|
|
23
|
+
|
|
24
|
+
If installed globally, the binary is available as `dd`:
|
|
25
|
+
|
|
26
|
+
```bash
|
|
27
|
+
dd doctor
|
|
28
|
+
dd onboard
|
|
29
|
+
dd run
|
|
30
|
+
```
|
|
31
|
+
|
|
32
|
+
## Requirements
|
|
33
|
+
|
|
34
|
+
- Node.js 20 or newer
|
|
35
|
+
- pnpm 9 or newer
|
|
36
|
+
|
|
37
|
+
Enable pnpm through Corepack when needed:
|
|
38
|
+
|
|
39
|
+
```bash
|
|
40
|
+
corepack enable
|
|
41
|
+
```
|
|
42
|
+
|
|
43
|
+
## Core Commands
|
|
44
|
+
|
|
45
|
+
```bash
|
|
46
|
+
dd init <project-name> # scaffold a new Double Digit project
|
|
47
|
+
dd doctor # check local prerequisites and project health
|
|
48
|
+
dd onboard # prepare env, dependencies, DB, migrations, and types
|
|
49
|
+
dd run # bootstrap the runtime DB and start the app
|
|
50
|
+
dd db status # inspect migration state
|
|
51
|
+
dd db migrate # run migrations
|
|
52
|
+
dd db create <target> <name> # create a migration for shared or micro-app schema
|
|
53
|
+
dd add <source> # install an extension
|
|
54
|
+
dd sync # regenerate workspace registries
|
|
55
|
+
dd list # list discovered micro-apps
|
|
56
|
+
dd enable <name> # enable a micro-app
|
|
57
|
+
dd disable <name> # disable a micro-app
|
|
58
|
+
dd remove <name> # remove a micro-app package and wiring
|
|
59
|
+
dd reconcile # detect registry, lock file, and package drift
|
|
60
|
+
dd marketplace <subcommand> # manage marketplace registrations
|
|
61
|
+
dd browse # browse marketplace extensions
|
|
62
|
+
```
|
|
63
|
+
|
|
64
|
+
`add` is also available as `install`, and `remove` is also available as `uninstall`.
|
|
65
|
+
|
|
66
|
+
## New Project Bootstrap
|
|
67
|
+
|
|
68
|
+
```bash
|
|
69
|
+
npx @doubledigit/cli init my-project --yes
|
|
70
|
+
cd my-project
|
|
71
|
+
pnpm dd run
|
|
72
|
+
```
|
|
73
|
+
|
|
74
|
+
Useful `init` options:
|
|
75
|
+
|
|
76
|
+
- `--yes` skips prompts and uses defaults.
|
|
77
|
+
- `--run` bootstraps and starts the app after scaffolding.
|
|
78
|
+
- `--skip-install` skips dependency installation.
|
|
79
|
+
- `--no-git` removes the cloned `.git` directory from the generated project.
|
|
80
|
+
|
|
81
|
+
## Existing Project Setup
|
|
82
|
+
|
|
83
|
+
Use `onboard` for setup-only work:
|
|
84
|
+
|
|
85
|
+
```bash
|
|
86
|
+
pnpm dd onboard
|
|
87
|
+
```
|
|
88
|
+
|
|
89
|
+
Use `run` when you want the CLI to prepare the runtime database and then start the app:
|
|
90
|
+
|
|
91
|
+
```bash
|
|
92
|
+
pnpm dd run
|
|
93
|
+
```
|
|
94
|
+
|
|
95
|
+
Leave `DATABASE_URL` empty in `apps/main-app/.env` to use the default CLI-managed embedded PostgreSQL flow. Provide `DATABASE_URL` through the environment or `.env` when using your own PostgreSQL instance.
|
|
96
|
+
|
|
97
|
+
## Links
|
|
98
|
+
|
|
99
|
+
- Repository: https://github.com/crystalphantom/double-digit
|
|
100
|
+
- Issues: https://github.com/crystalphantom/double-digit/issues
|
|
101
|
+
- Getting started: https://github.com/crystalphantom/double-digit/blob/main/docs/getting-started.md
|
|
102
|
+
- Architecture: https://github.com/crystalphantom/double-digit/blob/main/docs/architecture.md
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@doubledigit/cli",
|
|
3
|
-
"version": "0.2.
|
|
3
|
+
"version": "0.2.1",
|
|
4
4
|
"private": false,
|
|
5
5
|
"description": "CLI for Double Digit local setup and extension management.",
|
|
6
6
|
"license": "MIT",
|
|
@@ -25,7 +25,8 @@
|
|
|
25
25
|
"dd": "./dist/index.js"
|
|
26
26
|
},
|
|
27
27
|
"files": [
|
|
28
|
-
"dist"
|
|
28
|
+
"dist",
|
|
29
|
+
"README.md"
|
|
29
30
|
],
|
|
30
31
|
"exports": {
|
|
31
32
|
".": {
|