aikeyenv
v1.0.0
Published
AI Environment Manager — secure API key handling for AI agents with demo/production switching
Maintainers
Readme
aienv
AI Environment Manager — secure API key handling for AI agents.
What It Does
- Separates demo and production API keys
- Flags all requests as coming from an AI agent
- One line switch from demo to production
- Real keys never exposed in demo mode
Install
npm install aienv
Usage
Create a .aienv.toml file in your project:
[aienv] mode = "demo"
[agent] name = "my-agent" origin = true scope = "health-check"
[keys] stripe = "sk_test_xxx" openai = "sk-demo-xxx"
[production] env_path = ".env"
Then in your code:
const { loadAiEnv } = require('aienv') const env = loadAiEnv() console.log(env.keys.stripe)
