@hlos/cli
HLOS CLI - Secrets management and AI assistant for developers.
Hidden Layers for Open Secrets
Installation
npm install -g @hlos/cli
Or use with npx:
npx @hlos/cli --help
Quick Start
hlos auth login
hlos init
hlos secrets set DATABASE_URL=postgres://localhost/myapp
hlos secrets set API_KEY=sk-abc123 --description "Production API key"
hlos run npm start
Commands
Authentication
hlos auth login
hlos auth whoami
hlos auth logout
Secrets Management
hlos secrets list
hlos secrets list --space space_abc123
hlos secrets set DATABASE_URL=postgres://localhost/myapp
hlos secrets set API_KEY=sk-abc123 --description "Production API key"
hlos secrets get API_KEY
export API_KEY=$(hlos secrets get API_KEY)
hlos secrets delete OLD_API_KEY
hlos secrets export > .env
hlos secrets export --format json > secrets.json
hlos secrets export --format shell
Running Commands
hlos run npm start
hlos run node server.js
hlos run -- docker-compose up -d
hlos run --space space_abc123 npm test
Project Initialization
hlos init
hlos init --space space_abc123
hlos init --import .env
Configuration
hlos config list
hlos config get apiUrl
hlos config set defaultSpace space_abc123
hlos config set apiUrl https://custom.hlos.com
hlos config reset
Project Configuration
Create an hlos.yaml file in your project root:
space: space_abc123
This allows you to run commands without specifying --space every time.
How It Works
- Authenticate:
hlos auth login opens your browser for secure OAuth authentication
- Configure:
hlos init links your project to an HLOS space
- Manage: Use
hlos secrets to manage your environment variables
- Run:
hlos run <command> fetches secrets and injects them as env vars
Your secrets are stored securely in HLOS and never touch your local filesystem (except temporarily in memory during command execution).
Environment Variables
The CLI respects these environment variables:
HLOS_API_URL - Override the API URL (default: https://hlos.ai)
HLOS_SPACE - Default space ID
Security
- Secrets are fetched over HTTPS and held only in memory
- OAuth tokens are stored in your OS keychain/credential store
- Secrets are never written to disk
- Each project can have its own space with isolated secrets
Examples
Basic Node.js Project
cd my-node-app
hlos init
hlos secrets set DATABASE_URL=postgres://user:pass@localhost/mydb
hlos secrets set JWT_SECRET=super-secret-key
hlos secrets set STRIPE_KEY=sk_test_...
hlos run npm start
Docker Compose
hlos secrets export > .env
hlos run docker-compose up
CI/CD Integration
npm install -g @hlos/cli
echo "$HLOS_TOKEN" | hlos auth token
hlos secrets export > .env
Contributing
See the main HLOS repository for contribution guidelines.
License
MIT