@mayrlabs/setup-project 0.1.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 (3) hide show
  1. package/CHANGELOG.md +7 -0
  2. package/README.md +65 -0
  3. package/package.json +55 -0
package/CHANGELOG.md ADDED
@@ -0,0 +1,7 @@
1
+ # @mayrlabs/setup-project
2
+
3
+ ## 0.1.1
4
+
5
+ ### Patch Changes
6
+
7
+ - b326cdd: Implementation
package/README.md ADDED
@@ -0,0 +1,65 @@
1
+ # @mayrlabs/setup-project
2
+
3
+ An interactive CLI tool to quickly scaffold and configure common development tools for your projects.
4
+
5
+ ## Features
6
+
7
+ - **Interactive UI**: Uses `@clack/prompts` for a beautiful terminal experience.
8
+ - **Tool Selection**: Multi-select support for:
9
+ - Husky (Git hooks)
10
+ - Prettier or Oxfmt (Formatter)
11
+ - ESLint or Oxlint (Linter)
12
+ - Lint-staged
13
+ - @t3-oss/env (Environment validation)
14
+ - **Smart Configuration**:
15
+ - Automatically installs dependencies.
16
+ - Creates configuration files (`.prettierrc`, `.eslintrc.json`, `.lintstagedrc`, etc.).
17
+ - Sets up `pre-commit` hooks.
18
+ - Generates typesafe environment validation files (`env.ts` or `env/server.ts` + `env/client.ts`).
19
+
20
+ ## Usage
21
+
22
+ Run the following command in your project root:
23
+
24
+ ```bash
25
+ npx @mayrlabs/setup-project@latest
26
+ ```
27
+
28
+ Follow the interactive prompts to select the tools you need.
29
+
30
+ > [!WARNING]
31
+ > This tool modifies configuration files. It is recommended to use it on a fresh project or commit your changes before running it.
32
+
33
+ ## Configuration Details
34
+
35
+ ### Husky
36
+
37
+ - Initializes Husky.
38
+ - Options to set up `lint-staged` or a custom script as a pre-commit hook.
39
+
40
+ ### Formatter
41
+
42
+ - Choose between **Prettier** and **Oxfmt**.
43
+ - Generates standard configuration.
44
+
45
+ ### Linter
46
+
47
+ - Choose between **ESLint** and **Oxlint**.
48
+ - Generates standard configuration.
49
+
50
+ ### Lint-staged
51
+
52
+ - configure linting for js, ts, jsx, tsx.
53
+ - configure formatting for md, css, json.
54
+ - Automatically uses the selected linter and formatter.
55
+
56
+ ### Env Validation
57
+
58
+ - Supports Next.js, Nuxt, and Core variants.
59
+ - Choose validator: Zod, Valibot, or Arktype.
60
+ - Install presets for common platforms (Vercel, Railway, etc.).
61
+ - Generate split (`env/client.ts`, `env/server.ts`) or joined (`env.ts`) files.
62
+
63
+ ## License
64
+
65
+ MIT
package/package.json ADDED
@@ -0,0 +1,55 @@
1
+ {
2
+ "name": "@mayrlabs/setup-project",
3
+ "version": "0.1.1",
4
+ "description": "Interactive CLI to setup project tools",
5
+ "private": false,
6
+ "publishConfig": {
7
+ "access": "public"
8
+ },
9
+ "keywords": [
10
+ "setup",
11
+ "cli",
12
+ "scaffold",
13
+ "husky",
14
+ "prettier",
15
+ "eslint"
16
+ ],
17
+ "bin": {
18
+ "setup-project": "dist/index.js"
19
+ },
20
+ "files": [
21
+ "dist",
22
+ "README.md",
23
+ "CHANGELOG.md"
24
+ ],
25
+ "homepage": "https://github.com/MayR-Labs/mayrlabs-js/tree/main/packages/setup-project#readme",
26
+ "bugs": {
27
+ "url": "https://github.com/MayR-Labs/mayrlabs-js/issues"
28
+ },
29
+ "repository": {
30
+ "type": "git",
31
+ "url": "git+https://github.com/MayR-Labs/mayrlabs-js.git",
32
+ "directory": "packages/setup-project"
33
+ },
34
+ "license": "MIT",
35
+ "author": "Aghogho Meyoron <youngmayor.dev@gmail.com>",
36
+ "type": "commonjs",
37
+ "main": "dist/index.js",
38
+ "scripts": {
39
+ "build": "tsup"
40
+ },
41
+ "dependencies": {
42
+ "@clack/prompts": "^0.7.0",
43
+ "commander": "^11.1.0",
44
+ "execa": "^8.0.1",
45
+ "fs-extra": "^11.2.0",
46
+ "picocolors": "^1.0.0",
47
+ "zod": "^3.22.4"
48
+ },
49
+ "devDependencies": {
50
+ "@types/fs-extra": "^11.0.4",
51
+ "@types/node": "^20.11.16",
52
+ "tsup": "^8.5.1",
53
+ "typescript": "^5.3.3"
54
+ }
55
+ }