CLI reference
storeenv init
Create a StoreEnv project for this folder (Git optional), or with a repository URL scaffold its public template.
zsh
$ cd ~/code/my-app$ storeenv init --name my-appCreated ada/my-app prj_2e9c6fff13445929678925f6Wrote .storeenv.json (safe to commit: it holds the project id and environment rules, never secrets)Next: storeenv push to upload your env files.
$ storeenv init [repo-url]
Arguments
<repo-url> | Public template mode: a repository URL, for example https://github.com/acme/cakeshop. |
Flags
--name <value> | Project name (default: the folder name). |
--namespace <value> | Your username or an organization you administer (default: your username). |
--kind <app|library> | A library is shared by other projects. One of: app, library. Default: app. |
--description <value> | One line about the project. |
--link-remotes | Add this repository's remotes as (unverified) links. Default: true. |
--new | Create a new project even if one of yours is already linked to this repository. |
--clone | Also git clone the repository. |
--suffix <value> | Write .env.<suffix> files (use --suffix '' for plain .env). |
--force | Overwrite files that already exist. |
More examples
$ cd ~/code/shared-stripe$ storeenv init --name shared-stripe --kind libraryCreated ada/shared-stripe prj_043c53d08d558af11c8f8171Wrote .storeenv.json (safe to commit: it holds the project id and environment rules, never secrets)Next: storeenv push to upload your env files.
Good to know
- Works in any folder, with or without Git. In a Git repository, commit .storeenv.json: everyone who clones the code then finds the same project. The file never holds secrets.
- In a Git repository, init also adds the repository's remotes and first commit to the project as unverified hints (--no-link-remotes to skip).
- If one of your projects is already linked to this repository, init refuses and suggests storeenv link; --new creates another project anyway.
- --kind library makes a project other projects import from (see Imports and libraries).
- Template mode: storeenv init <url of a public repository> scaffolds a published template's env files without signing in. Templates are published from public GitHub repositories so far.
Related commands
Global flags
--project <value> | Project as <namespace/name> or its id (default: .storeenv.json, then this repository's remotes). |
--env <value> | Environment name. |
--json | Machine readable output. |
--yes, -y | Skip confirmations. |
--color | Coloured output (--no-color to turn off). Default: true. |
--verbose | Show debug details. |
--api <value> | API base URL of a self-hosted StoreEnv. |
--trust-writer <value> | Trust a writer for this run: @login=SE:XXXX-XXXX-XXXX. |
--allow-unsigned | pull and diff: use values that aren't signed by a trusted writer, after you confirm on a terminal (or with STOREENV_ALLOW_UNSIGNED=1). Never applies to run or copy. |