Skip to main content

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.

Release files for hey-python 1.0.3

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for hey-python 1.0.3
File Size Uploaded
hey_python-1.0.3.tar.gz 20.7 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for hey-python 1.0.3
File Interpreter ABI Platform
hey_python-1.0.3-py3-none-any.whl Python 3 none any Details

Total release size: 44.5 kB

Release files / hey_python-1.0.3.tar.gz

Download URL hey_python-1.0.3.tar.gz
Size 20.7 kB
Tags Source
SHA-256 checksum
How to use checksums
23cda34ce200ce30ec2ef25e4c414e4b7e62f2498c0b701ca6853d738f6b2db2
BLAKE2b-256 checksum
How to use checksums
4ed33c6fbf9cc5a0cd5e6247551a4e67382c6180480b6ea731bf66c202f9c576
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.11.0

Release files / hey_python-1.0.3-py3-none-any.whl

Download URL hey_python-1.0.3-py3-none-any.whl
Size 23.8 kB
Tags Python 3
SHA-256 checksum
How to use checksums
c265172e632d7692a16b1b82e60345ccfe3cc75676ac5a9ce28003b85002fcb0
BLAKE2b-256 checksum
How to use checksums
380d54a2f57bc1582771e17a899f3efa597d8a64fdd200954713418d1dd7f1c0
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.11.0

Release history Release notifications | RSS feed

This release

1.0.3 This release

2 release files

1.0.2

2 release files

1.0.0

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page