Skip to main content

CLI tool for oroio Factory Droid API Key Manager

Project description

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


๐Ÿ”— Links


Made with โค๏ธ by the oroio team

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

oroio-2.0.0.tar.gz (12.9 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

oroio-2.0.0-py3-none-any.whl (9.5 kB view details)

Uploaded Python 3

File details

Details for the file oroio-2.0.0.tar.gz.

File metadata

  • Download URL: oroio-2.0.0.tar.gz
  • Upload date:
  • Size: 12.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.13.2

File hashes

Hashes for oroio-2.0.0.tar.gz
Algorithm Hash digest
SHA256 5c7f267467a8a23f1e63fdc9b931d21bb6609f6077486c2003a3859d32d7e368
MD5 59d6c522919d4b69c41a84d21839f151
BLAKE2b-256 9e7d5c9c21ec848a2ab5f70dbd7039844bcd15f5cbec9b60a61f87d68b7a2eec

See more details on using hashes here.

File details

Details for the file oroio-2.0.0-py3-none-any.whl.

File metadata

  • Download URL: oroio-2.0.0-py3-none-any.whl
  • Upload date:
  • Size: 9.5 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.13.2

File hashes

Hashes for oroio-2.0.0-py3-none-any.whl
Algorithm Hash digest
SHA256 3ee3f606de76d096fc246189dd41bbf988773b03123843fad9d8d9c623d09481
MD5 1612be37e4ee5ad18d51fea270bf5c32
BLAKE2b-256 ec7a460d702e0a2de3dc626bd1434cc0616511f4bb1290dc73b826ad17b96870

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page