Sign In

@hlos/cli

Package Overview
Dependencies
Maintainers
1
Versions
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@hlos/cli

HLOS CLI - Secrets management and AI assistant for developers

latest
Source
npmnpm
Version
0.1.0
Version published
Maintainers
1
Created
Source

@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

# Authenticate with HLOS
hlos auth login

# Initialize your project
hlos init

# Set some secrets
hlos secrets set DATABASE_URL=postgres://localhost/myapp
hlos secrets set API_KEY=sk-abc123 --description "Production API key"

# Run your app with secrets injected
hlos run npm start

Commands

Authentication

# Log in via browser OAuth
hlos auth login

# Show current user
hlos auth whoami

# Log out
hlos auth logout

Secrets Management

# List all secrets in current space
hlos secrets list

# List secrets in specific space
hlos secrets list --space space_abc123

# Set a secret
hlos secrets set DATABASE_URL=postgres://localhost/myapp
hlos secrets set API_KEY=sk-abc123 --description "Production API key"

# Get a secret value (raw output, great for piping)
hlos secrets get API_KEY
export API_KEY=$(hlos secrets get API_KEY)

# Delete a secret
hlos secrets delete OLD_API_KEY

# Export secrets
hlos secrets export > .env
hlos secrets export --format json > secrets.json
hlos secrets export --format shell  # Outputs: export KEY="value"

Running Commands

# Run a command with secrets injected as environment variables
hlos run npm start
hlos run node server.js
hlos run -- docker-compose up -d

# Use specific space
hlos run --space space_abc123 npm test

Project Initialization

# Interactive setup
hlos init

# Use specific space
hlos init --space space_abc123

# Import existing .env file
hlos init --import .env

Configuration

# List all config
hlos config list

# Get config value
hlos config get apiUrl

# Set config value
hlos config set defaultSpace space_abc123
hlos config set apiUrl https://custom.hlos.com

# Reset all config
hlos config reset

Project Configuration

Create an hlos.yaml file in your project root:

space: space_abc123
# Optional: environment name
# env: production

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

# Initialize
cd my-node-app
hlos init

# Add your secrets
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_...

# Run your app
hlos run npm start

Docker Compose

# Export secrets to .env for Docker
hlos secrets export > .env

# Or run directly
hlos run docker-compose up

CI/CD Integration

# In your CI script
npm install -g @hlos/cli
echo "$HLOS_TOKEN" | hlos auth token  # Future: direct token auth
hlos secrets export > .env

Contributing

See the main HLOS repository for contribution guidelines.

License

MIT

Keywords

secrets

FAQs

Package last updated on 23 Dec 2025

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts