openai_token  by qy527145

Local management for OpenAI API tokens

Created 2 years ago
268 stars

Top 95.6% on SourcePulse

GitHubView on GitHub
Project Summary

This project provides a command-line tool for local management of OpenAI API tokens, including refresh tokens, access tokens, and session keys. It targets developers and power users who need to programmatically access OpenAI services and manage multiple accounts efficiently, simplifying token retrieval and persistence.

How It Works

The tool operates via a Python script that handles authentication flows to obtain and store various OpenAI token types. It utilizes httpx for network requests, replacing the older requests library, and defaults to system trust chains for HTTPS verification, enhancing security. Token data is persisted locally in a structured JSON file, supporting multiple accounts and backward compatibility with older formats.

Quick Start & Requirements

  • Installation: pip install -r requirements.txt (requires requirements.txt to be present).
  • Prerequisites: Python environment.
  • Dependencies: Listed in requirements.txt (not provided).
  • Usage: Command-line interface with various flags for login, token retrieval, account management, and custom certificate bundles.
  • Documentation: CLI help (--help) and README.

Highlighted Details

  • Supports local management and persistence of multiple OpenAI account tokens (refresh, access, sess_key).
  • Network layer upgraded to httpx with default system trust chain for HTTPS verification.
  • Command-line interface offers comprehensive account and token management features.
  • Option to specify custom CA certificates for secure connections with corporate proxies or self-signed certificates.

Maintenance & Community

No specific details on contributors, community channels, or roadmap are provided in the README.

Licensing & Compatibility

The license is not explicitly stated in the provided README. Compatibility for commercial use is undetermined without a specified license.

Limitations & Caveats

The README does not specify the license, which is crucial for determining commercial use compatibility. The installation requires a requirements.txt file, which is not included in the provided text. The tool relies on OpenAI's authentication mechanisms, which are subject to change by OpenAI.

Health Check
Last Commit

1 month ago

Responsiveness

Inactive

Pull Requests (30d)
0
Issues (30d)
0
Star History
17 stars in the last 30 days

Explore Similar Projects

Feedback? Help us improve.