infrarun

command module
v0.2.0 Latest Latest
Warning

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

Go to latest
Published: Oct 11, 2025 License: Apache-2.0 Imports: 1 Imported by: 0

README

infrarun

A Go library and command-line tool for running IaC analysis tools.


🚀 Installation

You can install the CLI directly with:

go install github.com/infragov-project/infrarun@latest

Make sure your $GOPATH/bin (or Go’s default install path) is in your PATH.

To use the library in your Go project:

go get github.com/infragov-project/infrarun

Full API documentation is available on pkg.go.dev.


⚙️ Usage

Basic Example
infrarun run KICS

This runs KICS on the current working directory.

Common Commands
Command Description
infrarun run [name] Runs a given tool in the current working directory
infrarun list Lists all available tools

You can also see available commands with:

infrarun help

or get command-specific help:

infrarun <command> --help

📚 Library Reference

If you’re using the Go library directly, see the full reference on 👉 pkg.go.dev/github.com/infragov-project/infrarun

Example usage:

package main

import (
	"fmt"
	"os"

	"github.com/infragov-project/infrarun/pkg/infrarun"
)

func main() {

	tools := infrarun.GetAvailableTools()

	chosenTools := make([]*infrarun.Tool, 0)

	for n, t := range tools {
		fmt.Println(n, "-", t.Image())

		chosenTools = append(chosenTools, &t)
	}

	rep, err := infrarun.RunTools(chosenTools, ".")

	if err != nil {
		panic(err)
	}

	rep.PrettyWrite(os.Stdout)

}

🧪 Development

To build and test locally:

git clone https://github.com/infragov-project/infrarun
cd infrarun
go build
go test ./...

📄 License

This project is licensed under the Apache License, Version 2.0.


✨ Contributing

Contributions are welcome! Please open an issue or pull request on GitHub.

Documentation

The Go Gopher

There is no documentation for this package.

Directories

Path Synopsis
internal
pkg

Jump to

Keyboard shortcuts

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