scaffold

package
v0.3.0 Latest Latest
Warning

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

Go to latest
Published: Mar 25, 2026 License: Apache-2.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func IsInitialized

func IsInitialized(dir string) bool

IsInitialized returns true when devcell.toml exists in dir.

func RegeneratePackageFiles added in v0.3.0

func RegeneratePackageFiles(configDir string) error

RegeneratePackageFiles regenerates package.json and pyproject.toml from devcell.toml. Call this before any build to ensure derived files are in sync with config.

func Scaffold

func Scaffold(dir string, modelsSnippet string, nixhomePath string, force bool) error

func ScaffoldProject added in v0.3.0

func ScaffoldProject(dir string) error

ScaffoldProject writes a .devcell.toml in the given directory. Returns os.ErrExist if the file already exists.

func ScaffoldProjectForce added in v0.3.0

func ScaffoldProjectForce(dir string) error

ScaffoldProjectForce writes a .devcell.toml, overwriting if it exists.

func ScaffoldVagrantfile

func ScaffoldVagrantfile(dir, vagrantBox, nixhomePath string) error

ScaffoldVagrantfile writes a Vagrantfile to dir substituting:

  • {{VAGRANT_BOX}} with vagrantBox (empty → falls back to MACOS_BOX env var at runtime)
  • {{NIXHOME_PATH}} with nixhomePath (empty → falls back to NIXHOME_PATH env var at runtime)

Skips writing if a Vagrantfile already exists (idempotent).

func SyncNixhome added in v0.3.0

func SyncNixhome(srcPath, configDir string) error

SyncNixhome copies the nixhome directory from srcPath into configDir/nixhome/. It replaces any existing nixhome copy to ensure fresh content each build. Also removes the outer flake.lock so nix regenerates it from the inner nixhome's inputs — prevents stale lock from pinning different nixpkgs than the base image, which would cause a full re-download.

Types

This section is empty.

Jump to

Keyboard shortcuts

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