Metadata-Version: 2.4
Name: cmdhlp
Version: 0.1.0
Summary: Translate or explain command-line help text using DeepSeek AI
Home-page: https://github.com/HouXinyv/cmdhlp
Author: HouXinyv
License: AGPL-3.0
Classifier: Programming Language :: Python :: 3
Classifier: License :: OSI Approved :: GNU Affero General Public License v3
Classifier: Operating System :: OS Independent
Classifier: Environment :: Console
Classifier: Topic :: Utilities
Requires-Python: >=3.8
Description-Content-Type: text/markdown
License-File: LICENSE
Requires-Dist: httpx>=0.24.0
Dynamic: author
Dynamic: classifier
Dynamic: description
Dynamic: description-content-type
Dynamic: home-page
Dynamic: license
Dynamic: license-file
Dynamic: requires-dist
Dynamic: requires-python
Dynamic: summary

# cmdhlp

Translate or explain command-line help text using DeepSeek AI.

Package name: `cmdhlp` | Command: `hlp`

## Install

```bash
pip install cmdhlp
# or
pipx install cmdhlp
```

## Quick Start

```bash
# 1. Set your DeepSeek API key
hlp config set api_key sk-your-key-here

# 2. Register shell shortcuts (optional)
hlp init
source ~/.zshrc  # or restart your terminal

# 3. Use it
nvm --help | hlp trans    # Translate help text to Chinese
nvm --help | hlp expl     # Explain the command in Chinese

# With shortcuts (after hlp init):
nvm --help | TT           # Same as hlp trans
nvm --help | EE           # Same as hlp expl
```

## Commands

| Command | Description |
|---|---|
| `hlp trans` | Translate piped help text to Chinese |
| `hlp expl` | Explain piped help text in Chinese |
| `hlp config set <key> <value>` | Set config (api_key, model, base_url) |
| `hlp config show` | Show current config |
| `hlp config reset` | Reset config to defaults |
| `hlp init` | Register shell shortcuts (TT, EE) |
| `hlp uninit` | Remove shell shortcuts |

## Configuration

Config file: `~/.config/hlp/config.json`

| Key | Default | Description |
|---|---|---|
| `api_key` | (empty) | DeepSeek API key |
| `model` | `deepseek-chat` | Model name |
| `base_url` | `https://api.deepseek.com` | API base URL |

Environment variable `DEEPSEEK_API_KEY` overrides config file.

## License

AGPL-3.0
