Skip to content

sudo-rebase/rebaselabs-config

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 

Repository files navigation

Rebaselabs Configuration Manager

Unified configuration system for all rebaselabs CLI tools.

Installation

pip install rebaselabs-config

Quick Start

# Set your API key
rebaselabs config set --key api_key --value sk_prod_xxxxx

# Set your subscription tier
rebaselabs config set --key tier --value professional

# View configuration
rebaselabs config list

Python Usage

from rebaselabs_config import get_config, get_api_key_manager

# Get configuration
config = get_config()
api_key = config.get("api_key")
tier = config.get("tier")

# Check API limits
manager = get_api_key_manager()
limits = manager.get_limits()
print(f"Requests per hour: {limits['requests_per_hour']}")

CLI Commands

rebaselabs config list [OPTIONS]

List all configuration values for a profile.

rebaselabs config get --key KEY [OPTIONS]

Get a specific configuration value.

rebaselabs config set --key KEY --value VALUE [OPTIONS]

Set a configuration value.

rebaselabs config set-key [OPTIONS]

Set API key interactively (prompts for input, hides password).

rebaselabs config set-tier [OPTIONS]

Select subscription tier interactively.

rebaselabs config show-limits [OPTIONS]

Display API rate limits for current tier.

rebaselabs config status [OPTIONS]

Show full configuration status including tier and rate limits.

Configuration Profiles

Support multiple profiles for different environments:

# Set value in 'test' profile
rebaselabs config set --key api_key --value sk_test_xxxx --profile test

# Use test profile
rebaselabs config list --profile test

Configuration File

Configuration is stored in ~/.config/rebaselabs/config.yml:

default:
  api_key: sk_prod_xxxxx
  tier: professional

test:
  api_key: sk_test_xxxxx
  tier: free

Environment Variables

Override configuration with environment variables:

export REBASELABS_API_KEY=sk_prod_xxxxx
export REBASELABS_TIER=professional

Tier Limits

Tier Requests/Hour Requests/Month Cost
Free 100 10,000 Free
Starter 1,000 100,000 $19/mo
Professional 10,000 1,000,000 $79/mo
Enterprise Unlimited Unlimited Custom

Integration with CLI Tools

All rebaselabs CLI tools support the unified config:

# Data Transform CLI
dt transform --from json --to csv < data.json

# Uses api_key from ~/.config/rebaselabs/config.yml
# Respects tier-based rate limits automatically

License

MIT

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages