Skip to main content

An AI-powered CLI assistant that helps with coding and system tasks

Project description

Hey Python

An AI-powered CLI assistant that helps with coding and system tasks using OpenAI's language models.

Installation

pip install hey-python

API Key Configuration

Hey CLI securely manages your OpenAI API key:

  1. First-time use: You'll be prompted to enter your API key

  2. Secure storage options:

    • System keyring: Uses your OS's secure credential storage (preferred)
      • Windows: Windows Credential Locker
      • macOS: Keychain
      • Linux: Secret Service API (GNOME Keyring/KDE Wallet)
    • Fallback storage: When system keyring is unavailable (Docker, minimal servers)
      • Uses file-based encrypted storage in ~/.hey_config/
      • Machine-specific encryption (keys can't be transferred between systems)
  3. Removing a saved key: Use the --remove-api-key option to delete your stored key

    hey --remove-api-key
    

Manual API Key Setup

You can also set your API key using:

  • Environment variable: export OPENAI_API_KEY=your_key_here
  • .env file: Create a .env file in your working directory:
    OPENAI_API_KEY=your_api_key_here
    

Usage

After installation, use the hey command followed by your question or instruction:

# Ask for help
hey help me understand how to use this tool

# Create a simple script
hey create a hello world script in python

# Get system information
hey what files do I have in this directory?

# Create files for a project
hey create a new React component for a login form

Features

  • Secure API Key Management: Keys stored in system's secure credential manager
  • Intelligent File Operations: Create, edit, delete, and rename files
  • Directory Management: Create and remove directories
  • Command Execution: Run shell commands directly
  • Context-Aware: Maintains conversation history for better assistance
  • Syntax Highlighting: Shows diffs and code with proper formatting
  • Streaming Responses: See AI responses in real-time

Examples

# Create a Python script
hey create a script that downloads images from a URL

# Fix errors in code
hey debug this file and fix the bugs: app.js

# Get explanations
hey explain how the authentication works in this project

# Execute commands
hey show me the disk usage in this directory

License

MIT License - See LICENSE.rst for details.

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

hey_python-1.0.3.tar.gz (20.7 kB view details)

Uploaded Source

Built Distribution

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

hey_python-1.0.3-py3-none-any.whl (23.8 kB view details)

Uploaded Python 3

File details

Details for the file hey_python-1.0.3.tar.gz.

File metadata

  • Download URL: hey_python-1.0.3.tar.gz
  • Upload date:
  • Size: 20.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.11.0

File hashes

Hashes for hey_python-1.0.3.tar.gz
Algorithm Hash digest
SHA256 23cda34ce200ce30ec2ef25e4c414e4b7e62f2498c0b701ca6853d738f6b2db2
MD5 03976b512ecfdd4139231ccac667278b
BLAKE2b-256 4ed33c6fbf9cc5a0cd5e6247551a4e67382c6180480b6ea731bf66c202f9c576

See more details on using hashes here.

File details

Details for the file hey_python-1.0.3-py3-none-any.whl.

File metadata

  • Download URL: hey_python-1.0.3-py3-none-any.whl
  • Upload date:
  • Size: 23.8 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.11.0

File hashes

Hashes for hey_python-1.0.3-py3-none-any.whl
Algorithm Hash digest
SHA256 c265172e632d7692a16b1b82e60345ccfe3cc75676ac5a9ce28003b85002fcb0
MD5 e3386f289e162b62848b952e6b5b19f8
BLAKE2b-256 380d54a2f57bc1582771e17a899f3efa597d8a64fdd200954713418d1dd7f1c0

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