@sparrowengg/nexgate
v0.0.1-beta.9
Published
Nexus cli
Downloads
585
Maintainers
Keywords
Readme
@sparrowengg/nexgate
Official CLI tool for initializing Nexgate projects
Features
- 🚀 Quick Project Setup - Initialize new Nexgate projects with a single command
- 📦 Template-Based - Uses the official Nexgate template repository
- 🎯 Interactive Prompts - User-friendly prompts for project configuration
- ⚡ Zero Configuration - Works out of the box with sensible defaults
Prerequisites
- Node.js >= 18.0.0
- npm or yarn package manager
- Access to the Nexgate template repository (https://bitbucket.org/surveysparrow/nexgate-template)
Installation
Global Installation (Recommended)
Install the CLI globally to use it from anywhere:
npm install -g @sparrowengg/nexgateAfter installation, verify it's working:
nexgate --versionNote: If you get command not found: nexgate after global installation, ensure your npm global bin directory is in your PATH. You can check with npm bin -g and add it to your shell configuration if needed.
Local Installation
If you prefer to install it locally in your project:
npm install --save-dev @sparrowengg/nexgateWhen installed locally, you need to use npx to run the command:
npx nexgate initUsage
Initialize a New Project
The primary command is init, which creates a new Nexgate project:
nexgate initThis will prompt you for:
- Project name: The display name for your project (default: "My Project")
- Directory name: The folder name where the project will be created (auto-generated from project name if not provided)
Example
$ nexgate init
? Project name: My Awesome App
? Directory name: my-awesome-app
Cloning template from https://bitbucket.org/surveysparrow/nexgate-template.git to /path/to/my-awesome-app...
Template cloned successfully.With Project Name Argument
You can also provide the project name directly:
nexgate init my-project-nameThis will skip the project name prompt and use "my-project-name" as the default directory name.
Using npx (No Installation Required)
You can also use the CLI without installing it:
npx @sparrowengg/nexgate initHow It Works
- The CLI prompts for project name and directory name
- Automatically converts project names to valid package names (lowercase, kebab-case)
- Clones the official Nexgate template from Bitbucket
- Updates the project's
package.jsonwith your project name - Your new project is ready to use in the specified directory
Starter Commands
After initializing your project:
cd my-project-name
yarn install
yarn devTroubleshooting
Command Not Found
If nexgate command is not found after global installation:
- Check if it's installed:
npm list -g @sparrowengg/nexgate - Verify your PATH includes npm's global bin directory:
npm bin -g - Add to PATH if needed (macOS/Linux):
echo 'export PATH="$(npm bin -g):$PATH"' >> ~/.zshrc source ~/.zshrc
Template Clone Fails
- Ensure you have internet access
- Verify you have access to the private Bitbucket repository
- Check that Git is installed and configured
License
MIT
