Create a new secret.
Parameters for creating the secret.
Optionaloptions: RequestOptions<unknown>Request options.
The created Secret instance.
Get a Secret instance by name without making an API call. Use getInfo() on the returned Secret to fetch the actual data.
The literal, account-scoped name of the secret (including sec_-prefixed names).
A Secret instance.
Get an exact-ID handle without an API call. Its methods never fall back to a name. Use the handle's update/delete methods, not the name-only manager methods. Pass its .id explicitly to gateway/MCP bindings; environment-secret maps require names.
Update an existing secret's value.
The secret to update (Secret object or name string).
Parameters for updating the secret.
Optionaloptions: RequestOptions<unknown>Request options.
The updated Secret instance.
const runloop = new RunloopSDK();
// Using a secret name string
const updated = await runloop.secret.update('DATABASE_PASSWORD', {
value: 'my-new-password',
});
// Or using a Secret object
const secret = runloop.secret.fromName('DATABASE_PASSWORD');
const updated2 = await runloop.secret.update(secret, {
value: 'another-new-password',
});
List all secrets.
Optionalparams: SecretListParamsOptional filter parameters.
Optionaloptions: RequestOptions<unknown>Request options.
An array of Secret instances.
Delete a secret.
The secret to delete (Secret object or name string).
Optionaloptions: RequestOptions<unknown>Request options.
The deleted secret metadata.
Secret SDK interface for managing secrets.
Remarks
Overview
The
SecretOpsclass provides methods for managing secrets, which are encrypted key-value pairs that can be injected into devboxes as environment variables. Secrets are identified by account-scoped names. Name reads/updates select the greatest ID at lookup; name deletion removes every selected match, nonatomically. Use fromId() for exact row operations.Usage
This interface is accessed via RunloopSDK.secret. You should construct a RunloopSDK instance and use it from there:
Example