Skip to main content

A command-line agent.

Project description

Heare Developer CLI

Heare Developer CLI is a powerful and interactive coding assistant that leverages Anthropic's Claude AI models to help developers with various tasks. It provides a sandbox environment where you can perform file operations, execute bash commands, and interact with an AI assistant for coding-related queries and tasks.

Key Features

  1. Advanced AI Models: Access to Claude 3 models (Opus, Sonnet, Sonnet-3.5, Haiku) for varied needs and performance levels
  2. Intelligent File Handling: Smart file mention system using @ syntax for referencing files
  3. Sandbox Environment: Configurable sandbox modes for controlled file operations
  4. Tool Integration: Built-in tools for file and system operations, including Plane.so API integration for task management
  5. Command Auto-completion: Intelligent command and path completion
  6. Multi-line Input Support: Easy handling of multi-line code and text input
  7. Token Usage Tracking: Real-time monitoring of token usage and associated costs
  8. Rate Limiting Protection: Built-in rate limit handling with exponential backoff
  9. Permission Management: Granular control over file and system operations
  10. Rich Command History: Searchable command history with auto-suggestions

Installation

  1. Clone the repository:

    git clone https://github.com/clusterfudge/heare-developer.git
    cd heare-developer
    
  2. Install the required dependencies:

    pip install -r requirements.txt
    
  3. Set up your Anthropic API key:

    export ANTHROPIC_API_KEY=your_api_key_here
    

    Or create a .env file containing:

    ANTHROPIC_API_KEY=your_api_key_here
    
  4. (Optional) Set up your Plane.so API key for task management:

    export PLANE_API_KEY=your_plane_api_key_here
    

    Or create a ~/.plane-secret file containing just your API key.

Usage

Basic usage:

python -m heare.developer.cli [sandbox_path]

Command Line Options

  • sandbox_path: Path to initialize the sandbox (default: current directory)
  • --model: Choose the Claude AI model (default: sonnet-3.5)
    • Available options: opus, sonnet, sonnet-3.5, haiku
  • --summary-cache: Specify path for summary cache (default: ~/.cache/heare.summary_cache)
  • --sandbox-mode: Set sandbox mode for file operations
    • Options: REMEMBER_PER_RESOURCE, FORGET_IMMEDIATELY, REMEMBER_FOREVER
  • --prompt: Provide initial prompt (prefix with @ to read from file)

Interactive Features

  1. File References: Use @ syntax to reference files in your messages:

    > Can you explain the code in @src/main.py?
    
  2. Multi-line Input:

    > {
    Here's my multi-line
    input that can include
    code or text
    }
    
  3. Command Auto-completion:

    • Press Tab to auto-complete commands and file paths
    • @ followed by partial path triggers file path completion
  4. Available Commands:

    • /quit or /exit: Exit the CLI
    • /restart: Clear chat history and start over
    • Various tool-specific commands (shown on startup)
  5. Plane.so Integration:

    • Manage tasks, issues, and projects directly through the CLI
    • List workspaces, projects, and issues
    • Create, update, and link issues
    • Add comments and create subtasks
    • See docs/plane_tools_examples.md for detailed usage examples

Sandbox Modes

  • REMEMBER_PER_RESOURCE: Remember permissions per resource (default)
  • FORGET_IMMEDIATELY: Ask for permission each time
  • REMEMBER_FOREVER: Remember all permissions

Development

Environment Setup

  1. The project uses Python 3.11+. Make sure you have the appropriate Python version installed.

  2. Clone the repository:

    git clone https://github.com/clusterfudge/heare-developer.git
    cd heare-developer
    
  3. Set up a development environment using uv (recommended):

    # Install uv if you don't have it
    pip install uv
    
    # Create and activate a virtual environment
    uv venv
    source .venv/bin/activate  # On Windows: .venv\Scripts\activate
    
    # Install dependencies including development tools
    uv pip install -e ".[dev]"
    

    Alternatively, you can use pip:

    # Create and activate a virtual environment
    python -m venv .venv
    source .venv/bin/activate  # On Windows: .venv\Scripts\activate
    
    # Install dependencies including development tools
    pip install -e ".[dev]"
    
  4. Install pre-commit hooks:

    pre-commit install
    

    This sets up automatic code quality checks that run before each commit, including:

    • autoflake: Removes unused imports and variables
    • ruff: Lints and fixes code issues
    • ruff-format: Formats code consistently
  5. Run tests to verify your setup:

    pytest
    

The project follows a modular architecture:

  • heare/developer/: Core CLI and developer tools
  • heare/pm/: Project management functionality (WIP)
  • tests/: Test suite

Contributing

To contribute:

  1. Fork the repository
  2. Create a feature branch
  3. Make your changes, adding tests for new functionality
  4. Ensure all tests pass and pre-commit checks succeed
  5. Submit a pull request

License

[Insert your chosen license here]

Acknowledgements

This project uses:

  • Anthropic's Claude AI models
  • Rich for terminal UI
  • Prompt Toolkit for command line interface
  • Various other open source packages (see requirements.txt)
  1. Available Commands:

    • /quit or /exit: Exit the CLI
    • /restart: Clear chat history and start over
    • Various tool-specific commands (shown on startup)
  2. Plane.so Integration:

    • Manage tasks, issues, and projects directly through the CLI
    • List workspaces, projects, and issues
    • Create, update, and link issues
    • Add comments and create subtasks
    • See docs/plane_tools_examples.md for detailed usage examples
  3. Google Services Integration:

    • Manage Google API authentication tokens for Gmail and Calendar
    • Generate, export, and import authentication tokens
    • Support for headless/remote environments
    • See docs/google_auth_cli.md for auth setup and docs/google_tools_examples.md for usage examples

Project details


Release history Release notifications | RSS feed

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

heare_developer-0.9.9.tar.gz (276.6 kB view details)

Uploaded Source

Built Distribution

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

heare_developer-0.9.9-py3-none-any.whl (156.3 kB view details)

Uploaded Python 3

File details

Details for the file heare_developer-0.9.9.tar.gz.

File metadata

  • Download URL: heare_developer-0.9.9.tar.gz
  • Upload date:
  • Size: 276.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.12.9

File hashes

Hashes for heare_developer-0.9.9.tar.gz
Algorithm Hash digest
SHA256 53ba2c284e68cb3620cd24154033090df49a41093f4b798e781f5d6a390221f4
MD5 4806be3c7b9e1c13ea199b5ab18ba257
BLAKE2b-256 9eacc815b09fba9bf58cddebcf5af72322d47e641bdae3117b0882508e653b2f

See more details on using hashes here.

Provenance

The following attestation bundles were made for heare_developer-0.9.9.tar.gz:

Publisher: publish-to-pypi.yml on clusterfudge/heare-developer

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file heare_developer-0.9.9-py3-none-any.whl.

File metadata

  • Download URL: heare_developer-0.9.9-py3-none-any.whl
  • Upload date:
  • Size: 156.3 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.12.9

File hashes

Hashes for heare_developer-0.9.9-py3-none-any.whl
Algorithm Hash digest
SHA256 70cbfbc1afc964ed0c2e4e6e1f57e76a935fddd2c53c8ffd2767b3e96573b37c
MD5 b28dc61210e913eeeaef4863220fe288
BLAKE2b-256 9d55e701c91aab19ce46ce35d67c779a116849dbcdb3a4d2c503cbaea033617e

See more details on using hashes here.

Provenance

The following attestation bundles were made for heare_developer-0.9.9-py3-none-any.whl:

Publisher: publish-to-pypi.yml on clusterfudge/heare-developer

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

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