# NPM CLI Package for Starship: Complete Guide to @starship-ci/cli

> Discover the @starship-ci/cli NPM package orchestrating Cosmos blockchain deployments and management via YAML. Install the global starship binary for complete infrastructure control.

- Repository: [Hyperweb/starship](https://github.com/hyperweb-io/starship)
- Tags: how-to-guide
- Published: 2026-03-03

---

**The official NPM CLI package for Starship is `@starship-ci/cli`, which installs a global `starship` binary that orchestrates deployment, configuration, and lifecycle management of Cosmos blockchain infrastructure through a YAML-driven interface.**

The **NPM CLI package for Starship**, published as `@starship-ci/cli`, provides the official command-line interface for the hyperweb-io/starship project. This package enables developers to manage Starship deployments—spinning up multi-chain Cosmos environments—directly from their terminal using a configuration-driven workflow.

## Installing the Starship NPM CLI

Install the package globally to register the `starship` command on your system PATH.

```bash
npm install -g @starship-ci/cli

```

When installed, the package exposes a binary named **`starship`** that points to [`./index.js`](https://github.com/hyperweb-io/starship/blob/main/./index.js), as defined in [`packages/packages/cli/package.json`](https://github.com/hyperweb-io/starship/blob/main/packages/packages/cli/package.json) lines 2-24. This binary serves as the entry point for all CLI operations.

## Architecture and Source Code Structure

The CLI implementation resides in `packages/packages/cli/` and follows a modular architecture with three core components.

### Package Configuration

The [`package.json`](https://github.com/hyperweb-io/starship/blob/main/package.json) file declares the package metadata, dependencies, and binary registration:

- **Binary name**: `starship`
- **Entry point**: [`./index.js`](https://github.com/hyperweb-io/starship/blob/main/./index.js) (compiled output)
- **Source entry**: [`src/index.ts`](https://github.com/hyperweb-io/starship/blob/main/src/index.ts)

### CLI Runner Implementation

The main execution logic lives in [`packages/packages/cli/src/index.ts`](https://github.com/hyperweb-io/starship/blob/main/packages/packages/cli/src/index.ts). This runner performs the following sequence:

1. Parses command-line arguments using **`minimist`**.
2. Loads a YAML configuration file when `--config` is provided.
3. Prompts for missing parameters using **`inquirerer`**.
4. Instantiates **`StarshipClient`** (from `@starship-ci/client`) and **`StarshipInstaller`**.
5. Dispatches commands via a `switch` statement handling `start`, `deploy`, `stop`, `verify`, and other operations.

### Utility Functions

Helper utilities in [`packages/packages/cli/src/utils.ts`](https://github.com/hyperweb-io/starship/blob/main/packages/packages/cli/src/utils.ts) provide:

- **`displayVersion`** – Reads the local [`package.json`](https://github.com/hyperweb-io/starship/blob/main/package.json) to output version information.
- **`displayUsage`** – Renders comprehensive help text showing available commands and options.

## Available Commands and Usage Examples

The `starship` binary supports several lifecycle commands for managing blockchain infrastructure.

### Display Help and Version

View available commands and verify installation:

```bash
starship help
starship --version

```

The `--version` flag (or `-v`) invokes `displayVersion()` from [`src/utils.ts`](https://github.com/hyperweb-io/starship/blob/main/src/utils.ts) lines 11-15, which extracts version data directly from the package manifest.

### Deploy Infrastructure

Deploy a Starship environment using a YAML configuration file:

```bash
starship deploy --config ./config/two-chain.yaml

```

The `--config` flag specifies the path to a YAML file describing Helm releases, chain endpoints, and service configurations. Command-line flags such as `--name`, `--version`, and `--timeout` override values defined in the YAML.

### Start Services

Initialize and start the configured services:

```bash
starship start --config ./config/two-chain.yaml

```

This command creates a `StarshipClient` instance with the merged configuration and invokes `client.start()` to provision the infrastructure.

### Verify Deployment Health

Check the status of deployed resources:

```bash
starship verify --config ./config/two-chain.yaml

```

The verify command inspects REST/RPC endpoints, faucet services, registry, explorer, and relayer status to ensure the environment is ready for use.

### Stop and Teardown

Halt running infrastructure:

```bash
starship stop --config ./config/two-chain.yaml

```

### Install Dependencies

Run first-time setup to pull required Docker images and Helm charts:

```bash
starship setup

# Alternative syntax:

starship install

```

Both commands invoke `StarshipInstaller.checkAndInstallDependencies()` to ensure the local environment has all necessary dependencies.

## Configuration File Handling

The CLI relies on YAML configuration files to define multi-chain topologies. When you provide `--config`, the runner loads and validates the file before instantiating the client. If required parameters are missing from both the config file and command-line arguments, **`inquirerer`** prompts the user interactively to supply the values.

## Summary

- **@starship-ci/cli** is the official NPM CLI package for Starship, registered under the binary name `starship`.
- The package source resides in `packages/packages/cli/`, with the main runner implemented in [`src/index.ts`](https://github.com/hyperweb-io/starship/blob/main/src/index.ts) and utilities in [`src/utils.ts`](https://github.com/hyperweb-io/starship/blob/main/src/utils.ts).
- The CLI uses **minimist** for argument parsing and **inquirerer** for interactive prompts.
- Core commands include `deploy`, `start`, `verify`, `stop`, and `setup` (or `install`), all driven by YAML configuration files.
- The architecture instantiates **StarshipClient** and **StarshipInstaller** classes to execute infrastructure operations.

## Frequently Asked Questions

### What is the exact NPM package name for the Starship CLI?

The package is published as **`@starship-ci/cli`** on the NPM registry. Installing it globally registers the `starship` binary, which serves as the primary interface for managing Starship deployments according to the [`package.json`](https://github.com/hyperweb-io/starship/blob/main/package.json) definition in [`packages/packages/cli/package.json`](https://github.com/hyperweb-io/starship/blob/main/packages/packages/cli/package.json).

### How does the Starship CLI handle missing configuration parameters?

When the `--config` flag points to a YAML file, the CLI loads the configuration in [`src/index.ts`](https://github.com/hyperweb-io/starship/blob/main/src/index.ts). If required values are absent from both the file and command-line arguments, the CLI uses **inquirerer** to prompt the user interactively for the missing data before proceeding with execution.

### What parsing libraries does the Starship NPM CLI use?

The CLI relies on **minimist** for parsing command-line arguments into a structured options object, and **inquirerer** for interactive user prompts. These dependencies are invoked in the main runner at [`packages/packages/cli/src/index.ts`](https://github.com/hyperweb-io/starship/blob/main/packages/packages/cli/src/index.ts) before dispatching to specific command handlers.

### Where is the `starship` binary entry point defined in the source code?

The binary is declared in [`packages/packages/cli/package.json`](https://github.com/hyperweb-io/starship/blob/main/packages/packages/cli/package.json) with the key `"starship": "./index.js"`, which points to the compiled JavaScript entry point. The source TypeScript implementation resides in [`packages/packages/cli/src/index.ts`](https://github.com/hyperweb-io/starship/blob/main/packages/packages/cli/src/index.ts), which exports the logic that [`./index.js`](https://github.com/hyperweb-io/starship/blob/main/./index.js) executes at runtime.