aiprompts | ||
cmd | ||
pkg | ||
scripts | ||
.gitignore | ||
go.mod | ||
go.sum | ||
LICENSE | ||
README.md |
HeroAgent
Quick Install
You can install HeroLauncher using our install script:
# Install the latest version
curl -fsSL https://raw.githubusercontent.com/freeflowuniverse/heroagent/main/scripts/install.sh | bash
# Install a specific version
curl -fsSL https://raw.githubusercontent.com/freeflowuniverse/heroagent/main/scripts/install.sh | bash -s 1.0.0
The script will:
- Download the appropriate binary for your platform
- Install it to
~/heroagent/bin
- Add the installation directory to your PATH
- Create symlinks in
/usr/local/bin
if possible
Manual Installation
You can also download the binaries manually from the Releases page.
Building from Source
# Clone the repository
git clone https://github.com/freeflowuniverse/heroagent.git
cd heroagent
# Build the project
go build -o bin/heroagent ./cmd/processmanager
Prerequisites
- Go 1.23 or later
- For IPFS functionality: IPFS installed
Usage
Running HeroLauncher
# Run with default settings
./heroagent
# Run with web server on a specific port
./heroagent -w -p 9090
# Enable IPFS server
./heroagent -i
# Run in installer mode
./heroagent --install
# Show help
./heroagent -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:
- Go to the Actions tab in the repository
- Click on the latest successful Build workflow run
- Scroll down to the Artifacts section
- Download the artifact for your platform:
heroagent-linux-amd64.tar.gz
for Linux (Intel)heroagent-linux-arm64.tar.gz
for Linux (ARM)heroagent-darwin-amd64.tar.gz
for macOS (Intel)heroagent-darwin-arm64.tar.gz
for macOS (ARM)heroagent-windows-amd64.zip
for Windows
- Extract the archive to get the binaries
- The archive contains the following executables:
pmclient-[platform]
: Process Manager clienttelnettest-[platform]
: Telnet test utilitywebdavclient-[platform]
: WebDAV clientwebdavserver-[platform]
: WebDAV server
- Run the desired executable from the command line
Creating a New Release
To create a new release:
- 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
- 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
-
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
-
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/heroagent:latest
# Run the container
docker run -p 9001:9001 username/heroagent:latest
Replace username
with the actual Docker Hub username configured in the repository secrets.
License
MIT