v1.4.0CLI
•2 min read

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.

Shell
# 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:

.apivault.jsonJSON
{
  "project": "your-project-id",
  "run": {
    "env": "Development",
    "command": "npm run dev"
  }
}

Learn more in the project linking guide.