CLI tool for oroio Factory Droid API Key Manager
Project description
oroio CLI
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
- Homepage: https://github.com/notdp/oroio
- Documentation: https://github.com/notdp/oroio/tree/main/docs
- Issue Tracker: https://github.com/notdp/oroio/issues
- PyPI: https://pypi.org/project/oroio/
Made with โค๏ธ by the oroio team
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
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
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
5c7f267467a8a23f1e63fdc9b931d21bb6609f6077486c2003a3859d32d7e368
|
|
| MD5 |
59d6c522919d4b69c41a84d21839f151
|
|
| BLAKE2b-256 |
9e7d5c9c21ec848a2ab5f70dbd7039844bcd15f5cbec9b60a61f87d68b7a2eec
|
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
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
3ee3f606de76d096fc246189dd41bbf988773b03123843fad9d8d9c623d09481
|
|
| MD5 |
1612be37e4ee5ad18d51fea270bf5c32
|
|
| BLAKE2b-256 |
ec7a460d702e0a2de3dc626bd1434cc0616511f4bb1290dc73b826ad17b96870
|