Skip to main content

oroio CLI

PyPI version Python versions License: MIT

Official command-line client for oroio - Factory Droid API Key Manager.

Manage your Factory Droid API keys through a secure, cloud-based microservice or your own self-hosted server.


✨ Features

  • 🔐 Secure Key Storage: Keys encrypted with AES-256-GCM
  • 🔄 Automatic Key Rotation: Smart switching when balance runs low
  • 📊 Usage Tracking: Real-time balance and expiration monitoring
  • 🌐 Multi-Server Support: Connect to any oroio server (cloud or self-hosted)
  • 🎨 Beautiful CLI: Rich terminal output with tables and colors
  • 🚀 Fast & Lightweight: Minimal dependencies, works everywhere

📦 Installation

pip install oroio

Requirements: Python 3.8+


🚀 Quick Start

1. Configure Server (Optional)

By default, connects to http://localhost:8000. To use a different server:

oroio config set-server https://api.oroio.io

2. Register Account

oroio register
# Username: john
# Email: john@example.com
# Password: ********
# ✓ Account created successfully!

3. Login

oroio login
# Username: john
# Password: ********
# ✓ Logged in successfully as john

4. Add API Key

oroio add fk-your-factory-api-key
# ✓ Key added successfully. Total keys: 1

5. List Keys

oroio list

Output:

╭───┬──────────────────────┬────────────┬──────────────────────┬────────────┬────────────╮
│ # │ Key                  │    Balance │        Used / Total  │ Expires    │ Status     │
├───┼──────────────────────┼────────────┼──────────────────────┼────────────┼────────────┤
│ 1 │ fk-abc...xyz         │     450.0K │    50.0K / 500.0K    │ 2025-12-31 │ ● Active   │
╰───┴──────────────────────┴────────────┴──────────────────────┴────────────┴────────────╯

Total: 1 keys

6. Use Key in Commands

oroio run droid
# Using key: fk-abc...
# Running: droid
# [droid starts with FACTORY_API_KEY automatically set]

📚 Command Reference

Configuration

oroio config set-server <URL>   # Set API server
oroio config show               # Show current config
oroio version                   # Show CLI version

Authentication

oroio register                  # Register new account
oroio login                     # Login to server
oroio logout                    # Logout (clear tokens)

Key Management

oroio add <KEY>                 # Add new API key
oroio list                      # List all keys with usage
oroio use <INDEX>               # Switch active key
oroio rm <INDEX>                # Remove key
oroio current                   # Show current key (plaintext)
oroio refresh                   # Refresh usage data

Run Commands

oroio run <COMMAND>             # Run command with API key injected

Examples:

oroio run droid                 # Run droid CLI
oroio run python script.py      # Run Python script
oroio run node app.js           # Run Node.js app

The key is automatically set as:

  • FACTORY_API_KEY (v2 standard)
  • DROID_API_KEY (v1 compatibility)

🌐 Server Options

Option 1: Use Public Server

oroio config set-server https://api.oroio.io
oroio register
oroio login

Option 2: Self-Hosted Server

Deploy your own oroio server:

# Clone repository
git clone https://github.com/notdp/oroio.git
cd oroio/backend

# Start with Docker Compose
docker-compose up -d

Then connect CLI:

pip install oroio
oroio config set-server http://your-server.com
oroio register

Option 3: Local Development

# Start local server
cd oroio/backend
docker-compose up -d

# Connect CLI to localhost (default)
oroio register
oroio login

🔧 Advanced Usage

Environment Variables

Override server URL without config:

export OROIO_API_ENDPOINT=https://api.oroio.io
oroio login

Configuration File

Config is stored in: ~/.oroio-cli/config.json

{
  "api_endpoint": "https://api.oroio.io",
  "access_token": "eyJhbGc...",
  "refresh_token": "eyJhbGc..."
}

Development Installation

git clone https://github.com/notdp/oroio.git
cd oroio/cli
pip install -e .

🆚 Migration from v1

If you used the standalone dk CLI before:

v1 Command v2 Command
dk add oroio add
dk list oroio list
dk use oroio use
dk run oroio run

Note: dk is kept as an alias, so dk commands still work!


🤝 Contributing

Contributions welcome! See CONTRIBUTING.md


📄 License

MIT License - see LICENSE



Made with ❤️ by the oroio team

Metadata

Release files for oroio 2.0.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for oroio 2.0.0
File Size Uploaded Provenance Actions
oroio-2.0.0.tar.gz 12.9 kB Without provenance Details for oroio-2.0.0.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for oroio 2.0.0
File Interpreter ABI Platform Actions
oroio-2.0.0-py3-none-any.whl Python 3 none any Details for oroio-2.0.0-py3-none-any.whl

Total release size: 22.4 kB

Release files / oroio-2.0.0.tar.gz

Download URL oroio-2.0.0.tar.gz
Size 12.9 kB
Tags Source
SHA-256 checksum
How to use checksums
5c7f267467a8a23f1e63fdc9b931d21bb6609f6077486c2003a3859d32d7e368
BLAKE2b-256 checksum
How to use checksums
9e7d5c9c21ec848a2ab5f70dbd7039844bcd15f5cbec9b60a61f87d68b7a2eec
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.13.2

Release files / oroio-2.0.0-py3-none-any.whl

Download URL oroio-2.0.0-py3-none-any.whl
Size 9.5 kB
Tags Python 3
SHA-256 checksum
How to use checksums
3ee3f606de76d096fc246189dd41bbf988773b03123843fad9d8d9c623d09481
BLAKE2b-256 checksum
How to use checksums
ec7a460d702e0a2de3dc626bd1434cc0616511f4bb1290dc73b826ad17b96870
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.13.2

Security for oroio 2.0.0

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release

2.0.0 This release

2 release files No provenance

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page