Metadata-Version: 2.4
Name: grucli
Version: 3.3.0
Summary: A command-line interface for interacting with local and remote LLMs.
Home-page: https://github.com/grufr/grucli
Author: grufr
Classifier: Programming Language :: Python :: 3
Classifier: License :: OSI Approved :: MIT License
Classifier: Operating System :: OS Independent
Requires-Python: >=3.6
Description-Content-Type: text/markdown
License-File: LICENSE
Requires-Dist: requests
Requires-Dist: prompt_toolkit
Requires-Dist: cryptography
Requires-Dist: google-auth
Requires-Dist: google-auth-oauthlib
Dynamic: author
Dynamic: classifier
Dynamic: description
Dynamic: description-content-type
Dynamic: home-page
Dynamic: license-file
Dynamic: requires-dist
Dynamic: requires-python
Dynamic: summary

# gru-cli -- Version 3.3.0

`grucli` is a CLI tool for agentic LLMs that works with both local LLMs and API-based models such as Claude, Gemini, GPT-5 and others.

![gru-cli preview image](/public/assets/preview-version-330.png "gru-cli preview")

## why?
I hate how other CLI tools have big ass 3000 line+ system prompts and don't allow you to run local models or use custom APIs. 

So I decided to make my own CLI tool for *professional vibe coders🔥🔥🔥*.

I'll try to improve on it over time, if I don't give up on this project that is.

## Features

*   **Interactive Chat:** Have a conversation with your chosen LLM right from your terminal.
*   **Model Selection:** Easily switch between different locally-served models.
*   **Command System:** Use slash commands (`/help`, `/model`, `/clear`, `/manage-api-keys`) for quick actions.
*   **Context-Aware:** Automatically injects your project's file tree into the system prompt to give the LLM better context.
*   **Encrypted API keys** You don't need to worry about someone snooping your API keys, they're encrypted :)

## Supported APIs

GruCLI supports models from the following providers:

*   **OpenAI:** All available models, including GPT-5.2
*   **Anthropic:** All available models, including Claude Opus and Sonnet 4.5.
*   **Gemini:** Supports BOTH Gemini API <bold>AND</bold> Google OAUTH
*   **Ollama:** Supports both local and cloud models.
*   **LM Studio:** Supports all local models.
*   **Cerebras:** Supports their API available models.

* If a model doesn't show up on your selected API, you can just type it out.

## Installation

To install `grucli`, clone this repository and use `pip` to install the package.

1.  **Clone the repository (or download the source):**
    ```bash
    git clone https://github.com/grufr/grucli.git
    cd gru-agentic-cli
    ```

2.  **Install the package:**
    *   **For regular use:** This installs the CLI like any other tool.
        ```bash
        pip install .
        ```
    *   **For development:** This links the command to your source code for instant updates.
        ```bash
        pip install -e .
        ```

This will install the `grucli` command and all its dependencies.

## WARNING !!
<div align="right"><sub style="position:relative; top:15px;">windows sucks anyways...</sub></div>
This project was **NOT** tested on Windows, it was only tested on Linux and macOS


## Usage

Once installed, you can start the CLI by simply running:

```bash
grucli
```

This will ask you to select an available model and then take you to the chatting interface.

### Commands

*   `/help`: Show available commands.
*   `/model`: Re-open the model selection menu.
*   `/clear`: Clear the current chat history.
*   `/manage-api-keys`: Manage your saved API keys.
*   `/gemini-login`: Login with your Google account.
*   `/gemini-auth-mode`: Switch Gemini authentication between API Key and Google Auth.
*   `/exit`: Exit the application.

## Development

If you want to contribute to or modify `grucli`, you should install it in "editable" mode as described above (`pip install -e .`).

This allows you to edit the Python files in the `src/grucli/` directory and have your changes be live the next time you run the `grucli` command. There is no need to run `pip install .` again after every code change.

If you change dependencies in `requirements.txt` or settings in `setup.py`, you should run `pip install -e .` again to apply those changes.
## Testing

`grucli` uses `pytest` for testing. To run the tests, you must install `pytest` manually as it is not included in `requirements.txt` to keep the production installation lightweight for end-users.

```bash
pip install pytest
pytest tests/
```

### Current Tests

The test suite covers:
*   **API Interactions:** Validating stream processing and tool call parsing.
*   **UI Formatting:** Ensuring tool blocks, diffs, and spinners render correctly.
*   **Permissions System:** Verifying that tool execution permissions are respected.
*   **ANSI Utilities:** Testing color and icon formatting.

If you want to contribute your code must pass all tests.

## Uninstallation

To remove `grucli` from your system, simply run:

```bash
pip uninstall grucli
```

## License

This project is licensed under the MIT License. See the `LICENSE` file for details.

## funny 

some of the code here was generated by grucli itself :)

My first open source project 💖🎀
