Metadata-Version: 2.4
Name: clatcli
Version: 0.1.2
Summary: Command line assistance tool. Describe what you want in plain English; clat generates a shell script and runs it.
Project-URL: Homepage, https://clat.dev
Project-URL: Repository, https://github.com/clatcli/clatcli
License: MIT
Keywords: ai,assistant,cli,llm,shell
Classifier: Environment :: Console
Classifier: License :: OSI Approved :: MIT License
Classifier: Programming Language :: Python :: 3
Classifier: Topic :: Utilities
Requires-Python: >=3.9
Requires-Dist: requests>=2.28
Requires-Dist: tomli>=2.0; python_version < '3.11'
Description-Content-Type: text/markdown

# clat

Command line assistance tool. Describe what you want in plain English; `clat` generates a shell script and runs it.

```
clat open a port, docker pull void-base, close port
clat compress all jpegs in this directory to 80% quality
clat show disk usage sorted by size for the current directory
```

Works with any OpenAI-compatible inference API — [LM Studio](https://lmstudio.ai), Ollama, or a remote API.
Supports reasoning models (DeepSeek-R1, QwQ, etc.) — `<think>` blocks are stripped automatically.

## Install

```bash
pip install clatcli
```

## Configuration

Config lives at `~/.clat/config.toml`. Create it with:

```bash
clat --init
```

```toml
api_url           = "http://localhost:1234/v1"   # OpenAI-compatible endpoint
model             = "local-model"                # model name (see: clat -l)
api_key           = ""                           # optional bearer token
auto_run          = false                        # true = always skip confirmation
use_tools         = true                         # false for models without tool-call support
auto_run_patterns = []                           # command names that skip confirmation
```

## Usage

```
clat [OPTIONS] <prompt>...
```

| Flag | Description |
|------|-------------|
| `-y`, `--yes` | Skip confirmation, run immediately |
| `-n`, `--dry-run` | Show generated script, don't execute |
| `-l`, `--list` | List models available from the API |
| `-L`, `--load <ID>` | Load a model in LM Studio |
| `--model <MODEL>` | Override model for this invocation |
| `--api <URL>` | Override API URL for this invocation |
| `-v`, `--verbose` | Print prompt, API URL, model, and tool status |
| `--config` | Show current config and its path |
| `--init` | Write default config file |

## License

MIT
