BlueForge Docs

client.vault.set

Store a new vault secret.

Signature

class Client {
  vault: {
    set(projectId: string, name: string, value: string): Promise<{ stored: boolean; name: string }>
  }
}

Parameters

NameTypeRequiredNotes
projectId
string
yesProject ID
name
string
yesSecret name (alphanumeric + underscore)
value
string
yesSecret value

Examples

import { Client } from '@blueforge/client'
const bf = new Client({ apiKey: process.env.BF_API_KEY!, url: 'https://your-project.blueforge.dev' })
await bf.vault.set('proj_abc', 'API_KEY', 'sk-...')

Throws

ErrorCondition
ApiError
API request failed
NetworkError
Network issue

Pitfalls

  • Idempotent overwrite — if a secret with the same name already exists, it is silently overwritten with the new value (no warning)
  • Case-sensitive — secret names are case-sensitive;
    API_KEY
    and
    api_key
    are distinct entries
  • Name constraints — only alphanumeric characters and underscores are allowed in secret names
  • Value size — secret values may be subject to a size limit (check your plan's documentation)

See also

{auto-injected}

Tested against

{auto-injected}