Metadata-Version: 2.4
Name: apiport
Version: 0.1.5
Summary: CLI tool for managing API secrets
Home-page: https://github.com/michniks2001/code-coffee-hack
Author: Samuel Michnik
Author-email: Samuel Michnik <michniksamuel@gmail.com>, Vikas Rawat <vikasrawcoder@gmail.com>
License: MIT
Project-URL: Homepage, https://github.com/michniks2001/code-coffee-hack
Project-URL: Bug Tracker, https://github.com/michniks2001/code-coffee-hack/issues
Classifier: Programming Language :: Python :: 3
Classifier: License :: OSI Approved :: MIT License
Classifier: Operating System :: OS Independent
Requires-Python: >=3.6
Description-Content-Type: text/markdown
License-File: LICENSE
Requires-Dist: cryptography>=45.0.0
Requires-Dist: python-dotenv>=1.0.0
Provides-Extra: ai
Requires-Dist: google-generativeai>=0.3.0; extra == "ai"
Dynamic: author
Dynamic: home-page
Dynamic: license-file
Dynamic: requires-python

# 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

```bash
# Basic installation
pip install apiport

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

## Usage

### Adding Secrets

```bash
# 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

```bash
# List all secret names
apiport list

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

### Deleting Secrets

```bash
# Delete a specific secret
apiport delete API_KEY

# Delete all secrets (reset the vault)
apiport delete
```

### Updating Secrets

```bash
# Update an existing secret
apiport update API_KEY new_secret_value
```

### Importing to .env File

```bash
# 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
