Link a directory to a project with .apivault.json
You can now save a project binding, default run command, environment, and vault key in an .apivault.json file in your project root. The CLI uses it whenever you work in that directory.
# Link the current directory to a project apivault link <id> # See the active project and where it came from apivault projects current # Remove the link apivault unlink
apivault projects use <id> now links the current directory by default. Pass --global to set a system-wide default instead.
#Config scopes
All apivault config commands now accept --local (-l) and --global (-g). Local settings take precedence over global ones.
A minimal project file can hold the project binding and run defaults without storing credentials. Replace your-project-id with the ID from apivault projects list:
{
"project": "your-project-id",
"run": {
"env": "Development",
"command": "npm run dev"
}
}Check this file before committing it. A vaultKey field contains a secret. If you store one locally, add the file to .gitignore; otherwise keep it out of the repository and supply the vault key through the prompt, APIVAULT_KEY, or global configuration. apivault config set vaultKey can write to the local file when one exists.
Learn more in the project linking guide.