@dimah-s3/cli 0.4.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 ADDED
@@ -0,0 +1,64 @@
1
+ # `@dimah-s3/cli`
2
+
3
+ Scaffold an official [dimah-s3](https://dimah-s3.vercel.app) starter.
4
+
5
+ ## Usage
6
+
7
+ ```bash
8
+ npx @dimah-s3/cli@latest create my-app
9
+ pnpm dlx @dimah-s3/cli@latest create my-app
10
+ ```
11
+
12
+ Scaffold into the current directory (the folder name becomes the package name):
13
+
14
+ ```bash
15
+ npx @dimah-s3/cli@latest create .
16
+ ```
17
+
18
+ Non-interactive:
19
+
20
+ ```bash
21
+ npx @dimah-s3/cli@latest create my-app --yes --template nextjs
22
+ ```
23
+
24
+ ### Options
25
+
26
+ | Flag | Description |
27
+ | ---------------------------- | --------------------------------------------------------- |
28
+ | `-t, --template <id>` | Template id (`nextjs`) |
29
+ | `--package-manager <pm>` | `pnpm` \| `npm` \| `yarn` \| `bun` (default: detected) |
30
+ | `--install` / `--no-install` | Install dependencies (default: prompt / yes with `--yes`) |
31
+ | `--git` / `--no-git` | Initialize git (default: prompt / yes with `--yes`) |
32
+ | `--overwrite` | Replace the contents of a non-empty directory |
33
+ | `-y, --yes` | Skip prompts and use defaults |
34
+ | `--version` | Print the CLI version |
35
+
36
+ ### Behavior
37
+
38
+ - **Project name** is required with `--yes` or on a non-TTY (CI / piped input).
39
+ Interactive runs still prompt when the directory argument is omitted.
40
+ - **Other prompts** are only used on an interactive terminal. Non-interactive
41
+ sessions fall back to defaults for template / install / git.
42
+ - **Non-empty target:** the run stops unless `--overwrite` is passed (or the
43
+ prompt is confirmed). Overwriting clears the directory contents but keeps
44
+ `.git` and `.env`, and never removes the directory itself.
45
+ - **Failed install:** the project is kept and the final instructions tell you to
46
+ install manually; the exit code is still non-zero.
47
+ - **Git:** initializes on `main` and makes an initial commit. Skipped when the
48
+ target is already inside a repository.
49
+
50
+ ### Exit codes
51
+
52
+ | Code | Meaning |
53
+ | ----- | ---------------------------- |
54
+ | `0` | Success |
55
+ | `1` | Failure |
56
+ | `130` | Cancelled (Ctrl+C or a "no") |
57
+
58
+ ## Templates
59
+
60
+ Templates ship inside the CLI package (snapshotted from [`templates/`](../../templates) at build time).
61
+
62
+ ## License
63
+
64
+ MIT