Cli
Install App
Install App
install-app
Install an app from a GitHub repository.
Usage
nailgun install-app <app> [options]Arguments
<app>- The app to install in format@username/appname
Options
-b, --branch <branch>- The branch to install (default: "master")-f, --force- Force install even if the app already exists
Description
The install-app command clones and installs a Zodula app from a GitHub repository. It handles dependency installation and setup automatically.
App Format
The app argument must be in the format @username/appname:
nailgun install-app @myusername/my-awesome-appExamples
Basic Installation
nailgun install-app @myusername/my-awesome-appInstall from Specific Branch
nailgun install-app @myusername/my-awesome-app --branch developForce Install (Overwrite Existing)
nailgun install-app @myusername/my-awesome-app --forceWhat It Does
- Validates the app format and requirements
- Fetches the remote package.json to get app details
- Checks if the app already exists (unless
--forceis used) - Clones the repository to the
apps/directory - Installs dependencies with
bun install - Sets up the app in your project
Installation Process
$ nailgun install-app @myusername/my-awesome-app
✓ Fetching package.json from https://raw.githubusercontent.com/myusername/my-awesome-app/refs/heads/master/package.json
✓ Cloning repository...
✓ Installing dependencies...
✓ App installed successfully!Force Installation
When using --force, the command will:
- Remove the existing app directory
- Remove
node_modulesandbun.lock - Clone the fresh repository
- Install dependencies
Requirements
- The repository must be publicly accessible on GitHub
- The repository must have a valid
package.json - The app name in
package.jsonmust match the expected format - You must have Git installed and configured
When to Use
Use install-app when:
- You want to add a community app to your project
- You're setting up a project with existing apps
- You need to install apps from specific branches
- You're updating an existing app installation
Tips
- Always check the app's documentation before installing
- Use specific branches for development versions
- Test apps in development before production
- Keep your installed apps updated
- Use
--forcecarefully as it will overwrite existing data
Troubleshooting
If installation fails:
- Verify the repository exists and is accessible
- Check that the username starts with
@ - Ensure the app name is correct
- Verify you have Git installed
- Check your internet connection
- Ensure you have write permissions to the project directory
Example Output
$ nailgun install-app @zodula/example-app
✓ Fetching package.json from https://raw.githubusercontent.com/zodula/example-app/refs/heads/master/package.json
✓ Cloning repository to apps/example-app...
✓ Installing dependencies...
✓ App example-app installed successfully!
Zodula