Documentation
¶
Index ¶
- func IsInitialized(dir string) bool
- func RegeneratePackageFiles(configDir string) error
- func Scaffold(dir string, modelsSnippet string, nixhomePath string, force bool) error
- func ScaffoldProject(dir string) error
- func ScaffoldProjectForce(dir string) error
- func ScaffoldVagrantfile(dir, vagrantBox, nixhomePath string) error
- func SyncNixhome(srcPath, configDir string) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func IsInitialized ¶
IsInitialized returns true when devcell.toml exists in dir.
func RegeneratePackageFiles ¶ added in v0.3.0
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 ScaffoldProject ¶ added in v0.3.0
ScaffoldProject writes a .devcell.toml in the given directory. Returns os.ErrExist if the file already exists.
func ScaffoldProjectForce ¶ added in v0.3.0
ScaffoldProjectForce writes a .devcell.toml, overwriting if it exists.
func ScaffoldVagrantfile ¶
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
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.