Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
95 changes: 94 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,100 @@ We love contributions! Please feel free to:
- 🔧 Submit pull requests
- ⭐ Star this repository

Check out [CONTRIBUTING](https://github.com/celtrix-os/Celtrix/blob/main/CONTRIBUTING.md) to see how to contribute to Celtrix.
## 🛠️ Local Development Setup (For Contributors)

If you’d like to contribute to **Celtrix** — a CLI tool for quickly creating web apps with your preferred stack — here’s how you can set it up and run it locally on your machine 👇

### ✅ Prerequisites

Make sure you have these installed before you start:

- **Node.js** – v16 or higher
- **npm** – (comes with Node)
- **Git**

Check your versions:

```bash
node -v
npm -v
```

### 📦 1. Fork & Clone the Repository

Start by forking the repo and cloning it locally:

```bash
git clone https://github.com/<your-username>/Celtrix.git
cd Celtrix
```

*(replace `<your-username>` with your GitHub account)*

### 📁 2. Install Dependencies

Install all required packages with:

```bash
npm install
```

### 🔗 3. Link the CLI Globally

Link the local CLI version to your global environment. This lets you use `celtrix` as a command while working on it:

```bash
npm link
```

✅ Now you can run `celtrix` anywhere in your terminal and it will use **your local dev version** instead of the published npm package.

### ▶️ 4. Run the CLI from Source

After linking, try generating a test app to confirm everything is working:

```bash
celtrix my-test-app
```

This should scaffold a new MERN project using your local code.

### 🧪 5. Testing Your Changes

- Make code changes inside the `bin/`, `commands/`, `utils/`, or `templates/` directories.
- Run the CLI again (`celtrix my-app`) to test your changes immediately.
- If you modify module paths or add new dependencies, re-run:

```bash
npm install
npm link
```

> Optional: If test scripts exist in the future, run `npm test` to verify your changes.

### 🚀 6. Publishing (Maintainers Only)

If you’re a maintainer and want to publish a new version:

```bash
npm run release:patch # or release:minor / release:major
```

This will bump the version and publish the package to npm.

### 🛠️ Troubleshooting

- **Command not found:** Run `npm link` again or restart your terminal.
- **Permission errors:** Try using `sudo npm link` (on macOS/Linux).
- **CLI not updating:** Unlink and re-link to refresh the global reference:

```bash
npm unlink -g celtrix
npm link
```

✅ **That’s it!** You’re now ready to contribute to Celtrix and improve the CLI for everyone 💪


---

Expand Down