@abyrd9/harbor-cli

1.0.0 • Public • Published

Harbor CLI

A CLI tool for those small side projects that only run a few services. Harbor allows you to:

  1. 🛠️ Define your services in a configuration file
  2. 🚀 Launch your services in a tmux session

Installation

npm i -g @abyrd9/harbor-cli

Prerequisites

Before using Harbor, make sure you have the following installed:

  • tmux (for terminal multiplexing)
  • jq (for JSON processing within tmux)

Quick Start

  1. Initialize your development environment:
harbor dock
  1. Add new services to your configuration:
harbor moor
  1. Launch your services:
harbor launch

Configuration

Harbor uses a configuration file to manage your services:

harbor.json

Contains your service configurations that are used to launch the services:

{
  "services": [
    {
      "name": "frontend",
      "path": "./vite-frontend",
      "command": "npm run dev"
    },
    {
      "name": "api",
      "path": "./go-api",
      "command": "go run ."
    },
    {
      "name": "dashboard",
      "path": "./vite-frontend",
      "command": "npx drizzle-kit studio"
    }
  ]
}

Commands

  • harbor dock: Generate a new harbor.json file
  • harbor moor: Add new services to your harbor.json file
  • harbor launch: Start all services defined in your harbor.json file in a tmux session

Terminal Multiplexer

Harbor uses tmux for managing your services. Some useful shortcuts:

  • Ctrl+a d: Detach from session
  • Ctrl+a c: Create new window
  • Ctrl+a n: Next window
  • Ctrl+a p: Previous window
  • Ctrl+q: Quit session

Contributing

Contributions are welcome! Please feel free to submit a Pull Request.

License

MIT

Package Sidebar

Install

npm i @abyrd9/harbor-cli

Weekly Downloads

12

Version

1.0.0

License

MIT

Unpacked Size

21.5 kB

Total Files

4

Last publish

Collaborators

  • abyrd