diff --git a/cmd/commandline/init/init.go b/cmd/commandline/init/init.go index 81d2bd5..cb92af5 100644 --- a/cmd/commandline/init/init.go +++ b/cmd/commandline/init/init.go @@ -214,6 +214,12 @@ func (m model) createPlugin() { return } + // create .env.example + if err := writeFile(filepath.Join(plugin_dir, ".env.example"), string(ENV_EXAMPLE)); err != nil { + log.Error("failed to write .env.example file: %s", err) + return + } + err = createPythonEnvironment( plugin_dir, manifest.Meta.Runner.Entrypoint, diff --git a/cmd/commandline/init/template.go b/cmd/commandline/init/template.go index e627f20..973f2c5 100644 --- a/cmd/commandline/init/template.go +++ b/cmd/commandline/init/template.go @@ -6,3 +6,6 @@ import ( //go:embed templates/README.md var README []byte + +//go:embed templates/.env.example +var ENV_EXAMPLE []byte diff --git a/cmd/commandline/init/templates/python/.env.example b/cmd/commandline/init/templates/.env.example similarity index 100% rename from cmd/commandline/init/templates/python/.env.example rename to cmd/commandline/init/templates/.env.example