|
| 1 | +# Installation Guide |
| 2 | + |
| 3 | +## For Users |
| 4 | + |
| 5 | +### Quick Start (Recommended) |
| 6 | + |
| 7 | +The easiest way to use CreateForge is with `npx` - no installation required: |
| 8 | + |
| 9 | +```bash |
| 10 | +npx createforge |
| 11 | +``` |
| 12 | + |
| 13 | +This will run the latest version directly from npm. |
| 14 | + |
| 15 | +### Global Installation |
| 16 | + |
| 17 | +If you want to install CreateForge globally on your system: |
| 18 | + |
| 19 | +```bash |
| 20 | +npm install -g createforge |
| 21 | +``` |
| 22 | + |
| 23 | +After installation, you can use either command: |
| 24 | + |
| 25 | +```bash |
| 26 | +createforge create my-app |
| 27 | +# or |
| 28 | +forge create my-app |
| 29 | +``` |
| 30 | + |
| 31 | +### Verify Installation |
| 32 | + |
| 33 | +Check that CreateForge is installed correctly: |
| 34 | + |
| 35 | +```bash |
| 36 | +forge --version |
| 37 | +# or |
| 38 | +createforge --version |
| 39 | +``` |
| 40 | + |
| 41 | +## Usage Examples |
| 42 | + |
| 43 | +### Create a new project interactively |
| 44 | +```bash |
| 45 | +npx createforge |
| 46 | +``` |
| 47 | + |
| 48 | +### Create with specific template |
| 49 | +```bash |
| 50 | +npx createforge my-saas --template nextjs-saas |
| 51 | +``` |
| 52 | + |
| 53 | +### Create and open in browser |
| 54 | +```bash |
| 55 | +npx createforge my-app --live |
| 56 | +``` |
| 57 | + |
| 58 | +### Add plugins to existing project |
| 59 | +```bash |
| 60 | +cd my-app |
| 61 | +forge add stripe |
| 62 | +forge add clerk |
| 63 | +``` |
| 64 | + |
| 65 | +### Check project health |
| 66 | +```bash |
| 67 | +forge health |
| 68 | +``` |
| 69 | + |
| 70 | +### Initialize GitHub and deployment |
| 71 | +```bash |
| 72 | +forge init --deploy vercel |
| 73 | +``` |
| 74 | + |
| 75 | +## For Developers |
| 76 | + |
| 77 | +### Install from Source |
| 78 | + |
| 79 | +1. Clone the repository: |
| 80 | +```bash |
| 81 | +git clone https://github.com/Om7035/createforge.git |
| 82 | +cd createforge |
| 83 | +``` |
| 84 | + |
| 85 | +2. Install dependencies: |
| 86 | +```bash |
| 87 | +npm install |
| 88 | +``` |
| 89 | + |
| 90 | +3. Build the project: |
| 91 | +```bash |
| 92 | +npm run build |
| 93 | +``` |
| 94 | + |
| 95 | +4. Link locally for testing: |
| 96 | +```bash |
| 97 | +npm link |
| 98 | +``` |
| 99 | + |
| 100 | +Now you can use `forge` or `createforge` commands globally, pointing to your local development version. |
| 101 | + |
| 102 | +### Development Mode |
| 103 | + |
| 104 | +Run in watch mode while developing: |
| 105 | +```bash |
| 106 | +npm run dev |
| 107 | +``` |
| 108 | + |
| 109 | +### Run Tests |
| 110 | +```bash |
| 111 | +npm test |
| 112 | +``` |
| 113 | + |
| 114 | +## Publishing to npm |
| 115 | + |
| 116 | +When ready to publish (for maintainers): |
| 117 | + |
| 118 | +1. Update version in `package.json` |
| 119 | +2. Build the project: |
| 120 | +```bash |
| 121 | +npm run build |
| 122 | +``` |
| 123 | + |
| 124 | +3. Publish to npm: |
| 125 | +```bash |
| 126 | +npm publish |
| 127 | +``` |
| 128 | + |
| 129 | +## Troubleshooting |
| 130 | + |
| 131 | +### Command not found after global install |
| 132 | + |
| 133 | +If you get "command not found" after `npm install -g createforge`: |
| 134 | + |
| 135 | +1. Check npm global bin path: |
| 136 | +```bash |
| 137 | +npm bin -g |
| 138 | +``` |
| 139 | + |
| 140 | +2. Make sure this path is in your system's PATH environment variable |
| 141 | + |
| 142 | +3. On Windows, you may need to restart your terminal |
| 143 | + |
| 144 | +### Permission errors on Linux/Mac |
| 145 | + |
| 146 | +If you get permission errors during global install: |
| 147 | + |
| 148 | +```bash |
| 149 | +sudo npm install -g createforge |
| 150 | +``` |
| 151 | + |
| 152 | +Or configure npm to use a different directory: |
| 153 | +```bash |
| 154 | +mkdir ~/.npm-global |
| 155 | +npm config set prefix '~/.npm-global' |
| 156 | +export PATH=~/.npm-global/bin:$PATH |
| 157 | +``` |
| 158 | + |
| 159 | +### Module not found errors |
| 160 | + |
| 161 | +Make sure all dependencies are installed: |
| 162 | +```bash |
| 163 | +npm install |
| 164 | +npm run build |
| 165 | +``` |
| 166 | + |
| 167 | +## Requirements |
| 168 | + |
| 169 | +- **Node.js**: 18.0.0 or higher |
| 170 | +- **npm**: 7.0.0 or higher |
| 171 | +- **Git**: Required for project initialization |
| 172 | + |
| 173 | +## Uninstalling |
| 174 | + |
| 175 | +To remove CreateForge from your system: |
| 176 | + |
| 177 | +```bash |
| 178 | +npm uninstall -g createforge |
| 179 | +``` |
| 180 | + |
| 181 | +## Support |
| 182 | + |
| 183 | +- 📖 [Documentation](https://github.com/Om7035/createforge#readme) |
| 184 | +- 🐛 [Report Issues](https://github.com/Om7035/createforge/issues) |
| 185 | +- 💬 [Discussions](https://github.com/Om7035/createforge/discussions) |
0 commit comments