Skip to content

Latest commit

 

History

History
90 lines (59 loc) · 1.91 KB

File metadata and controls

90 lines (59 loc) · 1.91 KB

Contributing

Prerequisites

  • Go 1.25+
  • Git
  • Task (or GNU Make, which wraps Task transparently)

Enable Remote Taskfiles:

export TASK_X_REMOTE_TASKFILES=1

Building

Build the CLI binary:

task cli

The binary is placed at dist/unikraft.

To generate documentation (Markdown docs and man pages):

# Generate all docs
task docs

# Generate man pages only
task docs:man

# Generate markdown docs only
task docs:mdx

Output is placed in dist/docs/ and dist/man/.

Running tests

Run unit tests:

task test

Run the linter:

task lint

Run integration tests:

task integration

If integration test expectations change, update the golden files with:

task integration-update

Never edit files in testdata/ manually — always use task integration-update to regenerate them.

Run tests and linting locally before pushing; CI also runs them.

Releasing

Releases are performed by merging into the stable branch and pushing it. CI automatically determines the git tag — no manual tagging is needed.

Architecture

The CLI follows a resource-oriented architecture:

  • Commands (internal/cmd/) — Kong-based command definitions with subcommand routing
  • Resources (internal/resource/) — Unified interface for API objects with field introspection
  • Multi-Metro (internal/multimetro/) — Client abstraction for global infrastructure operations
  • Configuration (internal/config/) — Profile and credential management
  • Telemetry (internal/telemetry/) — Anonymous usage analytics (opt-out via --no-telemetry)

Key Dependencies