Metadata-Version: 2.4
Name: jha-cli
Version: 1.0.0
Summary: JHA - Just Help Assistant. LLM-powered CLI command discovery.
Author-email: Amarjit Jha <jha.amarjit@gmail.com>
License: MIT
Project-URL: Homepage, https://github.com/jhaspider/jha-cli
Project-URL: Bug Reports, https://github.com/jhaspider/jha-cli/issues
Project-URL: Source, https://github.com/jhaspider/jha-cli
Keywords: cli,llm,openai,command,assistant
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.8
Classifier: Programming Language :: Python :: 3.9
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Operating System :: OS Independent
Classifier: Development Status :: 4 - Beta
Classifier: Intended Audience :: Developers
Classifier: Topic :: Software Development :: Libraries :: Python Modules
Classifier: Topic :: System :: Shells
Requires-Python: >=3.8
Description-Content-Type: text/markdown
License-File: LICENSE
Requires-Dist: typer>=0.15.1
Requires-Dist: openai>=2.8.1
Requires-Dist: pydantic>=2.10.0
Requires-Dist: python-dotenv>=1.0.1
Requires-Dist: click>=8.1.7
Requires-Dist: rich>=13.9.4
Dynamic: license-file

# JHA - Just Help Assistant

For those - who still are not friend with CLI.

A powerful LLM-based CLI tool that helps you find and execute the right commands for your development workflows.


## Features

✨ **LLM-Powered Command Discovery**
- Query for suitable commands using natural language
- Get explanations for complex commands
- Support for multiple shells (bash, zsh, cmd, powershell)
- Command history tracking for quick re-execution or recall

🔧 **Configuration Management**
- Simple config command to set OpenAI API key
- Choose your preferred LLM model
- Specify your shell
- Persistent configuration storage

📋 **Usage Examples**

```bash
# Check Installation
jha version
jha --help

# Setup your API key, MODEL & Shell
jha config set OPENAI_KEY=sk-xxx-yyy-zzz #Acquire & Set your OpenAI Key
jha config set MODEL=gpt-4o-mini # Set your preferred model
jha config set SHELL=bash # Set the bash you are working on

# Find a command
jha "Move a folder with all its children to another location"

# Get explanation for last command
jhax

# Get explanation for any command
jha explain "<command-goes-here>"

# See all historical commands
jha history 
jha history clear

```

## Installation

### Prerequisites
- Python 3.8+
- pip or poetry

### Development Setup

1. Clone/Download the project

2. Create virtual environment:
```bash
python -m venv venv
source venv/bin/activate  # On Windows: venv\Scripts\activate
```

3. Install dependencies:
```bash
pip install -r requirements.txt
```

4. Install as CLI command:
```bash
pip install -e .
```

## Configuration

Configuration is stored in `~/.jha/config.json`


## Architecture

- **Typer**: CLI framework for argument parsing and command routing
- **OpenAI Python SDK**: LLM integration
- **Click**: Terminal formatting and colors
- **JSONSchema**: Configuration management

## Project Structure

```
jha-cli/
├── src/
│   ├── __init__.py
│   ├── __main__.py           # Entry point
│   ├── cli.py                # Main CLI commands
│   ├── config.py             # Configuration management
│   ├── llm.py                # LLM integration
│   ├── history.py            # Command history tracking
│   └── utils.py              # Utility functions
├── setup.py
├── requirements.txt
└── README.md
```

## Contributing

Feel free to submit issues and enhancement requests!

## License

MIT
