Skip to content

mdyzma/ai-secrets-manager

Repository files navigation

PySecret-AI

Local-first Python secrets manager for AI API keys.

Features

  • OS keyring as primary backend.
  • AES-256-GCM encrypted SQLite fallback backend.
  • Master-password unlock with session cache timeout.
  • Typer CLI (pysecret) with masked input.
  • Provider aliases for OpenAI, Anthropic, Gemini, and Mistral.
  • Built-in provider aliases also include Ollama and Pinecone.
  • Custom providers can be registered with a custom environment variable name.
  • TTL expiration support.
  • Live provider validation (check) against models endpoints.

Install

pip install -e .

Quick Start

pysecret set openai
pysecret set ollama
pysecret set pinecone
pysecret set-custom acme-ai ACME_AI_KEY
pysecret list
pysecret get openai --inject-env
pysecret check
import pysecret

key = pysecret.get("openai")

Security Notes

  • Fallback storage never writes plaintext secrets to disk.
  • In-memory wiping is best-effort due to Python runtime behavior.

About

Small python tool to manage secrets and API keys

Resources

License

Security policy

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages