herolauncher

module
v1.0.2 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Mar 23, 2025 License: Apache-2.0

README

HeroLauncher

Go Tests Go Lint Build Release

HeroLauncher is a comprehensive launcher application written in V language with multiple modules:

  • Installer Module: Handles installation of dependencies and components
  • Web Server Module: Provides a web UI, Swagger UI, and OpenAPI REST interface (v3.1.0)
  • IPFS Server Module: Manages IPFS functionality

Features

  • Web server with modern UI
  • OpenAPI v3.1.0 REST interfaces
  • Swagger UI for API documentation
  • Command execution with job tracking
  • Package management (apt, brew, scoop)
  • IPFS integration

Installation

Prerequisites
Building from Source
v .  # Build the project

Usage

Running HeroLauncher
# Run with default settings
./herolauncher

# Run with web server on a specific port
./herolauncher -w -p 9090

# Enable IPFS server
./herolauncher -i

# Run in installer mode
./herolauncher --install

# Show help
./herolauncher -h
Command Line Options
  • -w, --web: Enable web server (default: true)
  • -p, --port: Web server port (default: 9001)
  • --host: Web server host (default: localhost)
  • -i, --ipfs: Enable IPFS server
  • --install: Run in installer mode
  • -h, --help: Show help message

API Documentation

When the web server is running, you can access the Swagger UI at:

http://localhost:9001/swagger

The OpenAPI specification is available at:

http://localhost:9001/openapi.json

Project Structure

/
├── modules/
│   ├── installer/       # Installer module
│   ├── webserver/       # Web server module
│   │   ├── endpoints/
│   │   │   ├── executor/       # Command execution endpoint
│   │   │   └── packagemanager/ # Package management endpoint
│   └── ipfs/           # IPFS server module
├── main.v              # Main application entry point
└── v.mod               # V module definition

Development

Running Tests
# Run all tests
./test.sh

# Run tests with debug output
./test.sh --debug

The test script will run all Go tests in the project and display a summary of the results at the end. You can exclude specific packages by uncommenting them in the EXCLUDED_MODULES array in the test.sh file.

Continuous Integration and Deployment

This project uses GitHub Actions for CI/CD:

  • Go Tests: Runs all tests using the test.sh script on every push and pull request
  • Go Lint: Performs linting using golangci-lint to ensure code quality
  • Build: Builds the application for multiple platforms (Linux Intel/ARM, macOS Intel/ARM, Windows) and makes the binaries available as artifacts
  • Release: Creates GitHub releases with binaries for all platforms when a new tag is pushed
Downloading Binaries from CI

The Build workflow creates binaries for multiple platforms and makes them available as artifacts. To download the binaries:

  1. Go to the Actions tab in the repository
  2. Click on the latest successful Build workflow run
  3. Scroll down to the Artifacts section
  4. Download the artifact for your platform:
    • herolauncher-linux-amd64.tar.gz for Linux (Intel)
    • herolauncher-linux-arm64.tar.gz for Linux (ARM)
    • herolauncher-darwin-amd64.tar.gz for macOS (Intel)
    • herolauncher-darwin-arm64.tar.gz for macOS (ARM)
    • herolauncher-windows-amd64.zip for Windows
  5. Extract the archive to get the binaries
  6. The archive contains the following executables:
    • pmclient-[platform]: Process Manager client
    • telnettest-[platform]: Telnet test utility
    • webdavclient-[platform]: WebDAV client
    • webdavserver-[platform]: WebDAV server
  7. Run the desired executable from the command line
Creating a New Release

To create a new release:

  1. Use the release script:
# Run the release script
./scripts/release.sh

This script will:

  • Get the latest release from GitHub
  • Ask for a new version number
  • Create a git tag with the new version
  • Push the tag to GitHub
  1. Alternatively, you can manually create and push a tag:
# Tag a new version
git tag v1.0.0

# Push the tag to trigger the release workflow
git push origin v1.0.0
  1. The Release workflow will automatically:

    • Build the binaries for all platforms
    • Create a GitHub release with the tag name
    • Upload the binaries as assets to the release
    • Generate release notes based on the commits since the last release
  2. Once the workflow completes, the release will be available on the Releases page

Docker

A Docker image is automatically built and pushed to Docker Hub on each push to main/master and on tag releases. To use the Docker image:

# Pull the latest image
docker pull username/herolauncher:latest

# Run the container
docker run -p 9001:9001 username/herolauncher:latest

Replace username with the actual Docker Hub username configured in the repository secrets.

License

MIT

Directories

Path Synopsis
cmd
pmclient command
processmanager command
telnettest command
vfsdavserver command
webdavclient command
webdavserver command
pkg
dedupestor
Package dedupestor provides a key-value store with deduplication based on content hashing
Package dedupestor provides a key-value store with deduplication based on content hashing
heroscript/paramsparser
Package paramsparser provides functionality for parsing and manipulating parameters from text in a key-value format with support for multiline strings.
Package paramsparser provides functionality for parsing and manipulating parameters from text in a key-value format with support for multiline strings.
heroscript/paramsparser/example command
Example usage of the paramsparser package
Example usage of the paramsparser package
mcp/cmd/openapi command
mcp/cmd/v command
openapi/cmd command
ourdb
Package ourdb provides a simple key-value database implementation with history tracking
Package ourdb provides a simple key-value database implementation with history tracking
processmanager
Package processmanager provides functionality for managing and monitoring processes.
Package processmanager provides functionality for managing and monitoring processes.
radixtree
Package radixtree provides a persistent radix tree implementation using the ourdb package for storage
Package radixtree provides a persistent radix tree implementation using the ourdb package for storage
system/stats
Package stats provides functions for measuring system statistics including CPU, memory, disk, and processes.
Package stats provides functions for measuring system statistics including CPU, memory, disk, and processes.
vfs
vfs/vfslocal
Package vfslocal provides a local filesystem implementation of the VFS interface
Package vfslocal provides a local filesystem implementation of the VFS interface
vfs/vfsnested
Package vfsnested provides a virtual filesystem implementation that can contain multiple nested VFS instances
Package vfsnested provides a virtual filesystem implementation that can contain multiple nested VFS instances
vm
ui/videoconf module

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL