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.3.tar.gz (7.8 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.3-py3-none-any.whl (8.3 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: apiport-0.1.3.tar.gz
  • Upload date:
  • Size: 7.8 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.3.tar.gz
Algorithm Hash digest
SHA256 6db99cb9947fa2ae3042f6aed552eaa5b028934fa5cc91d4e078d13dbef148ba
MD5 4063a7f0cfe91575444632e20a6e9141
BLAKE2b-256 ec439c0c88d7d85a7d049b170860f58802c4665d9219123a964811ed8fb06e11

See more details on using hashes here.

File details

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

File metadata

  • Download URL: apiport-0.1.3-py3-none-any.whl
  • Upload date:
  • Size: 8.3 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.3-py3-none-any.whl
Algorithm Hash digest
SHA256 87503f4ba6e97388877445ba64c53526fa4c52d2cb65ef1f31c737bc283092e9
MD5 11165116dcbbb933e99b98ee9c244c97
BLAKE2b-256 904c2f113dad17f194c2418569cf7fb2754a295cce500dddb953d0f0260fdecb

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