Getting started

Create an account, store your first key, and run your app with it in a few minutes. The CLI steps need Node.js 18.17 or newer.

  1. Create an account

    Sign up at /auth/register with Google or email and password. You are then asked to create your first project, the workspace that holds your keys and team members. You can set up two-factor authentication and passkeys at any time from Settings → Security & MFA.

  2. Add your first API key

    Open the dashboard and click Add key. Fill in:

    • Name — becomes the environment variable name, so use letters, digits and underscores (e.g. STRIPE_SECRET)
    • Service — label like Stripe, OpenAI, or Custom
    • Environment — Production, Staging, Development, etc. Choose Development to follow this guide
    • Secret value — the raw API key
    Vault key reminder
    Keys are encrypted at rest. If you use custom encryption mode, keep your vault key handy or saved in a password manager — see Security → Encryption.
  3. Install and connect the CLI

    Choose your preferred installation method:

    Shell
    npm install -g apivault

    Start the browser sign-in flow from your terminal.

    Sign inShell
    apivault login

    Approve the connection in your browser. The CLI saves the token in your operating system's credential store (Keychain, Credential Manager or the Secret Service). Back in your terminal, confirm which account the CLI is using.

    Confirm your accountShell
    apivault whoami
  4. Find the ID or slug of the project that contains the key you added.

    Find the projectShell
    apivault projects list

    From your app's root directory, replace <id> with the ID or slug. The link is saved to .apivault.json, which is safe to commit.

    Link your directoryShell
    apivault link <id>

    Confirm that the CLI lists the key you added. Its value appears masked.

    Verify the linked projectShell
    apivault keys list
    Read about project linking
  5. Run your app with secrets

    Inject all keys for an environment directly into a child process — no .env file needed:

    Secret injectionShell
    apivault run --env Development -- npm run dev

    Each key's name becomes an environment variable in the child process. Local dotenv files are temporarily hidden while the command runs.

    Replace STRIPE_SECRET with the name of the key you added. The command prints true if the variable is set without exposing its value.

    Check a keyShell
    apivault run --env Development -- node -e "console.log(Boolean(process.env.STRIPE_SECRET))"
    Read the run command reference
  6. Connect an AI agent (optional)

    To let an AI tool use your vault, add the MCP server to it. In Cursor, that means adding this to your MCP config:

    Cursor mcp.jsonJSON
    {
      "mcpServers": {
        "apivault": {
          "url": "https://mcp.apivault.tech/mcp"
        }
      }
    }

    On first use, Cursor opens your browser. Choose the project and the scopes your agent needs (read, write, reveal), then approve. Manage active connections in Settings → MCP Connections.

    AI Agent Skill
    Using Cursor, Claude Code, Windsurf, or Antigravity? Install our official Agent Skill to give your AI assistants built-in procedures for safe secret management.
    See setup for other AI tools

Next steps