Skip to main content

CLI tool for managing API secrets

Project description

APIPort

A command-line tool for securely managing API secrets.

Features

  • Secure Storage: All secrets are encrypted using Fernet symmetric encryption
  • Multiple Input Formats: Add secrets individually or in bulk from files
  • AI-Powered Parsing: Intelligently extract secrets from various text formats (with optional AI integration)
  • Environment File Integration: Easily import secrets to your .env files
  • Simple Command-Line Interface: Intuitive commands for managing your secrets

Installation

# Basic installation
pip install apiport

# With AI-powered parsing capabilities
pip install apiport[ai]

Usage

Adding Secrets

# Add a single secret
apiport add API_KEY=your_secret_key

# Add multiple secrets at once
apiport add API_KEY=your_secret_key DB_PASSWORD=your_db_password

# Add secrets from a file
apiport add --file secrets.txt

Listing Secrets

# List all secret names
apiport list

# List secrets with their values (debug mode)
apiport list --debug

Deleting Secrets

# Delete a specific secret
apiport delete API_KEY

# Delete all secrets (reset the vault)
apiport delete

Updating Secrets

# Update an existing secret
apiport update API_KEY new_secret_value

Importing to .env File

# Import a specific secret to .env
apiport import API_KEY

# Import multiple secrets
apiport import API_KEY DB_PASSWORD

# Import all secrets
apiport import

AI-Powered Parsing

When installed with the [ai] extra, APIPort can use Google's Generative AI to intelligently extract secrets from various text formats. This is especially useful for parsing complex or non-standard formats.

To use this feature:

  1. Install with AI support: pip install apiport[ai]
  2. Set your Gemini API key in your environment: export GEMINI_API_KEY=your_key
  3. Use the file import feature: apiport add --file your_complex_file.txt

Security

  • All secrets are encrypted using Fernet symmetric encryption
  • Encryption keys are stored locally in ~/.apiport_key
  • The encrypted vault is stored in ~/.apiport/vault.port

License

MIT

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

apiport-0.1.5.tar.gz (8.0 kB view details)

Uploaded Source

Built Distribution

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

apiport-0.1.5-py3-none-any.whl (8.5 kB view details)

Uploaded Python 3

File details

Details for the file apiport-0.1.5.tar.gz.

File metadata

  • Download URL: apiport-0.1.5.tar.gz
  • Upload date:
  • Size: 8.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.13.1

File hashes

Hashes for apiport-0.1.5.tar.gz
Algorithm Hash digest
SHA256 afbfdfa18df817879839aacdb0f4677f5135322412d276a6198642b67608f4e8
MD5 8d1e646f5a8bbf7d2e54e18eb55c7008
BLAKE2b-256 00cf152739588addec3850f40693fbde8d1a516bd730a8cb08f3cfdfce49ae58

See more details on using hashes here.

File details

Details for the file apiport-0.1.5-py3-none-any.whl.

File metadata

  • Download URL: apiport-0.1.5-py3-none-any.whl
  • Upload date:
  • Size: 8.5 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.13.1

File hashes

Hashes for apiport-0.1.5-py3-none-any.whl
Algorithm Hash digest
SHA256 3864b06e570f5c30c1caf10ffef0980409f8290b6f9b14042b8240e1d1af6354
MD5 f83593c192ea99fd8756e80ebd19b0e8
BLAKE2b-256 1d0640fb478c73588f03cb7d38f09715ffb4e2320e92019916c8501b46ad7e4b

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