buildconfig

package
v0.4.0 Latest Latest
Warning

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

Go to latest
Published: Aug 3, 2026 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

View Source
const Filename = "arctl.yaml"

Filename is the project-root file name. Filename TBD per design doc; using arctl.yaml.

Variables

This section is empty.

Functions

func EnsureGitignored

func EnsureGitignored(projectDir, entry string) error

EnsureGitignored appends `entry` to <projectDir>/.gitignore if not already present. Creates the file if missing. No-op if entry is already in the file.

func Path

func Path(projectDir string) string

Path returns the canonical arctl.yaml path under projectDir.

func Write

func Write(projectDir string, cfg *Config) error

Write serializes cfg to arctl.yaml in projectDir, overwriting any existing file.

func WriteDotEnv

func WriteDotEnv(projectDir string, required, optional []string) error

WriteDotEnv writes a `.env` file under projectDir listing required and optional env vars (sourced from the plugin's EnvSpec) with empty values ready for the user to fill in. If both lists are empty no file is written.

Callers should also ensure `.env` is gitignored (see EnsureGitignored) so secrets aren't committed by accident.

Types

type Config

type Config struct {
	Framework   string   `yaml:"framework"`
	Language    string   `yaml:"language"`
	RequiredEnv []string `yaml:"requiredEnv,omitempty"`
	// Port is set for MCPServer projects to expose HTTP transport. arctl run
	// maps it to the host and the MCP runtime binds 0.0.0.0:<port>.
	Port int `yaml:"port,omitempty"`
	// Transport identifies the MCP transport for MCPServer projects:
	// "http" or "stdio". Empty for agent projects; empty on MCPServer is
	// treated as "http" for back-compat.
	Transport string `yaml:"transport,omitempty"`
}

Config is the per-project build-config. Future fields are additive; older arctl ignores unknown keys.

func Read

func Read(projectDir string) (*Config, error)

Read parses arctl.yaml from projectDir.

Jump to

Keyboard shortcuts

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