Metadata-Version: 2.4
Name: jwshell
Version: 0.1.0
Summary: LLM-powered shell command explainer and generator.
Project-URL: Homepage, https://github.com/janwychowaniak/jwshell
Project-URL: Repository, https://github.com/janwychowaniak/jwshell
Author: Jan Wychowaniak
License: MIT License
        
        Copyright (c) 2026 Jan Wychowaniak
        
        Permission is hereby granted, free of charge, to any person obtaining a copy
        of this software and associated documentation files (the "Software"), to deal
        in the Software without restriction, including without limitation the rights
        to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
        copies of the Software, and to permit persons to whom the Software is
        furnished to do so, subject to the following conditions:
        
        The above copyright notice and this permission notice shall be included in all
        copies or substantial portions of the Software.
        
        THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
        IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
        FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
        AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
        LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
        OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
        SOFTWARE.
License-File: LICENSE
Keywords: bash,cli,llm,openrouter,shell,zsh
Classifier: Development Status :: 3 - Alpha
Classifier: Environment :: Console
Classifier: Intended Audience :: Developers
Classifier: License :: OSI Approved :: MIT License
Classifier: Operating System :: POSIX
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.12
Classifier: Programming Language :: Python :: 3.13
Classifier: Topic :: System :: Shells
Classifier: Topic :: Utilities
Classifier: Typing :: Typed
Requires-Python: >=3.12
Requires-Dist: openrouter<1.0,>=0.9
Requires-Dist: pydantic<3.0,>=2.7
Requires-Dist: rich<15.0,>=13.0
Requires-Dist: typer<1.0,>=0.12
Description-Content-Type: text/markdown

# jwshell

LLM-powered shell command explainer and generator.

`jwshell` takes a single string and either:

- **explains** it, when the string is a valid bash/zsh command or expression, or
- **generates** a command, when the string is a natural-language description of a
  desired effect.

It uses [OpenRouter](https://openrouter.ai/) under the hood.

## Install

Requires Python 3.12+. The recommended workflow uses [uv](https://docs.astral.sh/uv/).

```sh
git clone https://github.com/janwychowaniak/jwshell.git
cd jwshell
uv sync
```

To install globally as a CLI:

```sh
uv tool install .
```

## Configure

```sh
export JWSHELL_OR_APIKEY="sk-or-..."        # required
export JWSHELL_OR_MODEL="openai/gpt-5.2"    # optional, defaults to anthropic/claude-haiku-4.5
```

## Use

Explain a command (brief):

```sh
jwshell "ls -la"
```

Explain a command in detail:

```sh
jwshell -v "find . -name '*.py' -mtime -1"
```

Generate a command from a description:

```sh
jwshell "list every python file modified today"
```

Override the model for a single call:

```sh
jwshell --model anthropic/claude-sonnet-4.6 "tar all logs older than 7 days"
```

## Development

```sh
uv sync               # install runtime + dev deps
uv run ruff check .   # lint
uv run ruff format .  # format
uv run mypy           # strict type-check
uv run pytest         # tests
```

## License

MIT — see [LICENSE](LICENSE).
