From 88e9c101908a9bbf6ee505104dd81c61adff5059 Mon Sep 17 00:00:00 2001 From: Arshia Mohammadei Date: Thu, 23 Jul 2026 03:51:39 +0330 Subject: [PATCH] add installation scripts and project documentation --- README.md | 245 ++++++++++++++++++++++++++++++++++++++++++++ install/install.ps1 | 101 ++++++++++++++++++ install/install.sh | 105 +++++++++++++++++++ 3 files changed, 451 insertions(+) create mode 100644 README.md create mode 100644 install/install.ps1 create mode 100644 install/install.sh diff --git a/README.md b/README.md new file mode 100644 index 0000000..84bf288 --- /dev/null +++ b/README.md @@ -0,0 +1,245 @@ +# ๐Ÿ Hive CLI + +

+Your local development environment, orchestrated. +

+ +

+A powerful CLI tool for managing, running and exposing your applications. +

+ +

+ +[![Build](https://github.com/HiveSofts/hive-cli/actions/workflows/build.yml/badge.svg)](https://github.com/HiveSofts/hive-cli/actions) +[![Release](https://img.shields.io/github/v/release/HiveSofts/hive-cli)](https://github.com/HiveSofts/hive-cli/releases) + +

+ + +--- + +## ๐Ÿš€ About Hive + +Hive CLI is a developer-focused command line tool designed to simplify local development workflows. + +It helps you initialize projects, manage environments, run services, handle secrets, view logs and expose local applications with a simple command. + +Built with Rust for speed, reliability and cross-platform support. + +--- + +## โœจ Features + +- ๐Ÿ Project initialization +- โšก Fast command execution +- ๐Ÿ”ฅ Environment management +- ๐Ÿ” Secrets management +- ๐Ÿ“œ Logs management +- ๐Ÿš€ Local application runner +- ๐ŸŒ Public tunnel exposure +- ๐Ÿ“ฆ Project registry +- ๐Ÿฉบ Environment diagnostics +- ๐Ÿ–ฅ Cross-platform support + + +--- + +## ๐Ÿ“ฆ Installation + + +### Linux / macOS + +```bash +curl -fsSL https://raw.githubusercontent.com/HiveSofts/hive-cli/main/install/install.sh | bash +```` + +### Windows + +PowerShell: + +```powershell +irm https://raw.githubusercontent.com/HiveSofts/hive-cli/main/install/install.ps1 | iex +``` + +Verify installation: + +```bash +hive --version +``` + +--- + +## ๐Ÿ›  Usage + +Initialize Hive in your project: + +```bash +hive init +``` + +Run application: + +```bash +hive run +``` + +Run specific script: + +```bash +hive run dev +``` + +Check project status: + +```bash +hive status +``` + +Manage environment: + +```bash +hive env +``` + +Manage secrets: + +```bash +hive secrets +``` + +Expose local service: + +```bash +hive expose +``` + +View logs: + +```bash +hive logs +``` + +--- + +## ๐Ÿ“š Commands + +| Command | Description | +| ------------ | ---------------------------------- | +| `init` | Initialize Hive in current project | +| `run` | Run project scripts | +| `logs` | View application logs | +| `env` | Manage environment variables | +| `secrets` | Manage secrets | +| `expose` | Create public tunnel | +| `status` | Show project information | +| `projects` | Manage registered projects | +| `scripts` | Manage project scripts | +| `doctor` | Check system requirements | +| `completion` | Generate shell completion | + +--- + +## โš™๏ธ Project Structure + +After initialization: + +``` +your-project/ + +โ”œโ”€โ”€ .hive/ +โ”‚ +โ”œโ”€โ”€ config.yml +โ”œโ”€โ”€ .env +โ”œโ”€โ”€ .secrets +โ””โ”€โ”€ logs/ +``` + +Hive stores project configuration inside `.hive` and keeps your development environment organized. + +--- + +## ๐Ÿ— Development + +Clone repository: + +```bash +git clone git@github.com:HiveSofts/hive-cli.git + +cd hive-cli +``` + +Build: + +```bash +cargo build +``` + +Run: + +```bash +cargo run -- --help +``` + +Release build: + +```bash +cargo build --release +``` + +--- + +## ๐Ÿงช Supported Platforms + +| Platform | Status | +| -------- | ------ | +| Linux | โœ… | +| Windows | โœ… | +| macOS | ๐Ÿšง | + +--- + +## ๐Ÿ›ฃ Roadmap + +* [x] Hive Init +* [x] Hive Run +* [x] Hive Env +* [x] Hive Secrets +* [x] Hive Logs +* [x] Hive Expose foundation +* [x] Automatic releases +* [ ] Cloud tunnel service +* [ ] Team collaboration +* [ ] Plugin system +* [ ] Package manager + +--- + +## ๐Ÿค Contributing + +Contributions are welcome. + +Before submitting a pull request: + +```bash +cargo fmt +cargo test +cargo clippy +``` + +--- + +## ๐Ÿ“„ License + +MIT License + +--- + +## ๐Ÿ HiveSofts + +Built with โค๏ธ and Rust by HiveSofts. + +``` +github.com/HiveSofts/hive-cli +``` + +``` diff --git a/install/install.ps1 b/install/install.ps1 new file mode 100644 index 0000000..485bd81 --- /dev/null +++ b/install/install.ps1 @@ -0,0 +1,101 @@ +$ErrorActionPreference = "Stop" + + +$Repo = "HiveSofts/hive-cli" +$Binary = "hive.exe" + + +Write-Host "" +Write-Host "๐Ÿ Hive CLI Installer" +Write-Host "โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”" +Write-Host "" + + +$Release = Invoke-RestMethod ` +"https://api.github.com/repos/$Repo/releases/latest" + + +$Version = $Release.tag_name + + +Write-Host "Version: $Version" +Write-Host "" + + +$Asset = "hive-windows.exe" + + +$DownloadUrl = ` +"https://github.com/$Repo/releases/download/$Version/$Asset" + + + +$temp = Join-Path ` +$env:TEMP ` +$Binary + + + +Write-Host "โฌ‡๏ธ Downloading Hive..." + +Invoke-WebRequest ` +-Uri $DownloadUrl ` +-OutFile $temp + + + +$InstallDir = "$env:USERPROFILE\.hive\bin" + + +if (!(Test-Path $InstallDir)) { + New-Item ` + -ItemType Directory ` + -Path $InstallDir | Out-Null +} + + + +$Target = Join-Path ` +$InstallDir ` +$Binary + + + +Move-Item ` +-Force ` +$temp ` +$Target + + + +Write-Host "" +Write-Host "โš™๏ธ Updating PATH..." + + + +$currentPath = [Environment]::GetEnvironmentVariable( +"Path", +"User" +) + + +if ($currentPath -notlike "*$InstallDir*") { + + [Environment]::SetEnvironmentVariable( + "Path", + "$currentPath;$InstallDir", + "User" + ) + +} + + + +Write-Host "" +Write-Host "โœ… Hive installed successfully" +Write-Host "" + +Write-Host "Restart terminal then run:" +Write-Host "" + +Write-Host " hive --help" diff --git a/install/install.sh b/install/install.sh new file mode 100644 index 0000000..109e72c --- /dev/null +++ b/install/install.sh @@ -0,0 +1,105 @@ +#!/usr/bin/env bash + +set -e + +REPO="HiveSofts/hive-cli" +BINARY="hive" + +INSTALL_DIR="/usr/local/bin" + +VERSION=$(curl -s https://api.github.com/repos/$REPO/releases/latest \ +| grep '"tag_name":' \ +| sed -E 's/.*"([^"]+)".*/\1/') + +if [ -z "$VERSION" ]; then + echo "โŒ Failed to detect latest Hive version" + exit 1 +fi + + +echo "" +echo "๐Ÿ Hive CLI Installer" +echo "โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”" +echo "Version: $VERSION" +echo "" + + +OS="$(uname -s)" +ARCH="$(uname -m)" + + +case "$OS" in + Linux) + PLATFORM="linux" + ;; + + Darwin) + PLATFORM="macos" + ;; + + *) + echo "โŒ Unsupported operating system" + exit 1 + ;; +esac + + +case "$ARCH" in + x86_64) + ARCH="x86_64" + ;; + + aarch64|arm64) + ARCH="aarch64" + ;; + + *) + echo "โŒ Unsupported architecture: $ARCH" + exit 1 + ;; +esac + + +ASSET="hive-$PLATFORM" + + +DOWNLOAD_URL="https://github.com/$REPO/releases/download/$VERSION/$ASSET" + + +echo "โฌ‡๏ธ Downloading Hive..." +echo "$DOWNLOAD_URL" + + +TMP=$(mktemp) + + +curl -L "$DOWNLOAD_URL" -o "$TMP" + + +chmod +x "$TMP" + + +echo "" +echo "๐Ÿ“ฆ Installing Hive..." + + +if [ -w "$INSTALL_DIR" ]; then + mv "$TMP" "$INSTALL_DIR/$BINARY" +else + sudo mv "$TMP" "$INSTALL_DIR/$BINARY" +fi + + +echo "" +echo "โœ… Hive installed successfully" +echo "" + +echo "Version:" +hive --version || true + +echo "" + +echo "Run:" +echo " hive --help" + +echo "" \ No newline at end of file