apivault projects
The apivault projects command lists the projects you belong to and sets which one the current directory works in. apivault project is an alias. How that choice is resolved is explained in project linking.
Usage
apivault projects list
Lists your projects with their IDs, slugs and your role.
apivault link <id>
Binds the current directory to a project by writing .apivault.json.
Subcommands
projects list
Lists every project you are a member of, with its ID, slug, your role and the owner. projects ls is an alias.
apivault projects list
projects use
Sets the active project for the current directory by saving it to .apivault.json. With --global it sets the fallback project used in directories that are not linked.
# Bind the current directory to a project apivault projects use <id> # Set the global fallback project apivault projects use <id> --global
projects link
Binds the current directory to a project. Also available at the top level as apivault link.
apivault link <id> apivault projects link <id>
projects unlink
Removes the local project file from the current directory. Also available as apivault unlink.
apivault unlink
projects current
Shows the project commands will use and where it came from: the --project flag, the APIVAULT_PROJECT environment variable, the local project file, or the global config.
apivault projects current
Unique options
| Option | Subcommands | Description |
|---|---|---|
-l, --local | use | Save to the current directory's .apivault.json (the default) |
-g, --global | use | Save to ~/.apivault/config.json as the fallback project |
Roles
Your role in a project decides what the CLI can do there:
- Owner/Admin: Full access to manage project settings and keys.
- Editor: Can manage and reveal keys (e.g.,
apivault keys add,apivault run). - Viewer: Can only view keys (e.g.,
apivault keys list, and reveal if permitted).
Members and roles are managed in the web app — see projects & RBAC.
Service tokens
A service token belongs to one project, so projects list refuses to run under one, and asking for any other project is refused. Linking is not needed in a pipeline.
Global options
apivault projects also accepts the global options, such as --json.