import { Secret } from 'e2b'
const info = await Secret.getInfo('stripe_api_key')
// info.secretId -> 'sec_...' stable identifier, new one if you recreate the name
// info.name -> 'stripe_api_key'
// info.version -> 2 the version markers currently resolve to
// info.metadata -> { environment: 'production' }
// info.createdAt -> Date
// info.updatedAt -> Date
await Secret.exists('stripe_api_key') // true
await Secret.exists('typo_api_key') // false
const paginator = Secret.list()
while (paginator.hasNext) {
const secrets = await paginator.nextItems()
console.log(secrets.map((s) => s.name))
}