npm CLI
The @harborclient/team-hub npm package includes an optional deployment CLI under team-hub deploy. It wraps Docker Compose around the prebuilt GHCR image.
IMPORTANT
The npm package is not the production application artifact. Docker remains the runtime and process manager. Advanced operators can ignore this CLI and use Docker Compose directly.
Prerequisites
- Node.js 24+
- Docker Engine and the Compose plugin on the same machine
- Access to pull
ghcr.io/harborclient/team-hub(public package, or authenticated if private)
Verify the CLI includes deploy commands:
team-hub --helpdeploy must appear under Commands. If you see error: unknown command 'deploy', upgrade:
npm install --global @harborclient/team-hub@latestInstall and start
npm install --global @harborclient/team-hub
team-hub deploy install
team-hub deploy statusdeploy install:
- Verifies
dockeranddocker composeare available. - Creates a managed deployment directory (default
~/.config/team-hub). - Writes
compose.yamlfrom the bundled template. - Creates
.envfrom.env.exampleonly when.envdoes not already exist (never overwrites). - Pulls the configured GHCR image and starts the stack.
Override the deployment directory with --dir <path> or TEAM_HUB_DEPLOY_DIR. Select an image tag with --version <tag> (defaults to the CLI package version).
Commands
| Command | Behavior |
|---|---|
team-hub deploy install | Prepare files, pull image, start |
team-hub deploy start | docker compose up -d --remove-orphans |
team-hub deploy stop | docker compose stop (keeps volumes) |
team-hub deploy restart | Recreate with --force-recreate --remove-orphans |
team-hub deploy update | Pull image and recreate; preserves .env and volumes |
team-hub deploy status | Docker availability, container state, health, image refs |
team-hub deploy logs [--tail N] | Follow Compose logs |
team-hub deploy version | CLI version plus configured/running image |
team-hub deploy uninstall | Stop/remove containers; keep files and volumes |
team-hub deploy uninstall --purge | Also delete deployment files and named volumes (confirm, or pass --yes) |
Examples:
team-hub deploy logs --tail 200
team-hub deploy update
team-hub deploy uninstall --purge --yesWhat the CLI does not do
- Build the application Docker image locally
- Run
npm install -gto update itself (update the npm package separately) - Start the Node server as a host daemon without Docker
Admin commands after install
Deployment management uses team-hub deploy … on the host. Application administration (user create, migrate, …) still runs inside the container — see Docker Compose — Using the CLI in the container.
Related guides
- Docker Compose — direct Compose deployment without the CLI
- VPS — Linux host install details
- Deploy overview — image tags and architecture
