@suronai/sdk
v2.0.2
Published
Ultra-simple secrets SDK for Node.js — fetch secrets with Telegram approval via SURON
Readme
@suronai/sdk
Node.js secrets SDK — fetch secrets with Telegram approval, powered by SURON.
npm install @suronai/sdkUsage
import 'dotenv/config' // loads SURON_URL + SURON_TOKEN
import { SURON } from '@suronai/sdk'
const env = await SURON.connect()
// Single secret — blocks until approved via Telegram
const key = await env.get('API_KEY')
// Multiple secrets at startup — one Telegram prompt per key, in order
const { DB, REDIS, API } = await env.getAll(['DB', 'REDIS', 'API'])Required .env
SURON_URL=https://your-deployment.convex.cloud
SURON_TOKEN=sk_your_app_token_hereGet your token with the CLI: suron apps create --name my-app
How it works
- App calls
env.get('KEY')at runtime - SURON checks if approved for this session → returns cached value if yes
- If not → Telegram notification sent to the owner
- Owner taps Approve or Deny
- Approved → secret returned and cached until app restarts
- Denied → throws
Error: Access denied for 'KEY'
Full documentation
License
MIT
