Environment Setup
This guide provides instructions for setting up a development environment and contributing to the homelab-helper project.
Prerequisites
Before getting started, ensure you have:
- Go (1.21 or later recommended)
- Node.js (22.21.0 recommended, for documentation development)
- Git for version control
- Make for development automation
- Docker (optional, if using devcontainers)
- A code editor (VSCode recommended)
Quick Start
Option 1: Using Devcontainers (Recommended)
The project includes a devcontainer configuration that sets up a complete development environment.
- Open the project in VSCode with the Dev Containers extension
- Reopen in Container: Press
Ctrl+Shift+P(orCmd+Shift+Pon macOS) and select "Dev Containers: Reopen in Container" - Wait for setup: The devcontainer will automatically run the setup scripts which installs dependencies and tooling
Option 2: Local Development Setup
If you prefer local development without devcontainers:
-
Install Go and Node.js and Make
-
Install project dependencies:
make install-project
This installs npm dependencies and links the homelab CLI globally.
- Install tooling (required for some operations):
By default, this Makefile target installs to the local .bin folder. This directory will need to be added to your system PATH.
Alternatively, use BIN=/usr/local/bin make install-tools to install tools to a system location.
make install-tools
- Install documentation dependencies (if working on docs):
make install-docs
Documentation Development
The project uses Docusaurus for documentation.
Local Documentation Server
Start the development server:
make dev-docs
This starts a local server on localhost:3000 with live reloading.
Code Formatting
The project uses gofmt for formatting Go files and Prettier for everything else. Format on save is configured automatically in devcontainers.