Metadata-Version: 2.4
Name: ragbits-cli
Version: 0.0.8.dev23005
Summary: A CLI application for ragbits - building blocks for rapid development of GenAI applications
Project-URL: Homepage, https://github.com/deepsense-ai/ragbits
Project-URL: Bug Reports, https://github.com/deepsense-ai/ragbits/issues
Project-URL: Documentation, https://ragbits.deepsense.ai/
Project-URL: Source, https://github.com/deepsense-ai/ragbits
Author-email: "deepsense.ai" <ragbits@deepsense.ai>
License-Expression: MIT
Keywords: GenAI,Generative AI,LLMs,Large Language Models,Prompt Management,RAG,Retrieval Augmented Generation
Classifier: Development Status :: 4 - Beta
Classifier: Environment :: Console
Classifier: Intended Audience :: Science/Research
Classifier: License :: OSI Approved :: MIT License
Classifier: Natural Language :: English
Classifier: Operating System :: OS Independent
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Programming Language :: Python :: 3.13
Classifier: Topic :: Scientific/Engineering :: Artificial Intelligence
Classifier: Topic :: Software Development :: Libraries :: Python Modules
Requires-Python: >=3.10
Requires-Dist: ragbits-core==0.0.8.dev23005
Requires-Dist: typer<1.0.0,>=0.12.5
Description-Content-Type: text/markdown

# Ragbits CLI

Ragbits CLI provides the `ragbits` command-line interface (CLI) tool that allows you to interact with Ragbits from the terminal. Other packages can extend the CLI by adding their own commands, so the exact set of available commands may vary depending on the installed packages.

## Installation

To use the complete Ragbits stack, install the `ragbits` package:

```sh
pip install ragbits
```

## Example Usage
The following example assumes that `ragbits-core` is installed and that the current ddirectory contains a `song_prompt.py` file with a prompt class named `SongPrompt`, as defined in the [Quickstart Guide](https://ragbits.deepsense.ai/quickstart/quickstart1_prompts/#making-the-prompt-dynamic).

The example demonstrates how to execute the prompt using the `ragbits` CLI tool.
The left side of the table shows the system and user prompts (rendered with placeholders replaced by the provided values), and the right side shows the generated response from the Large Language Model.

```sh
$ ragbits prompts exec song_prompt:SongPrompt --payload '{"subject": "unicorns", "age_group": 12, "genre": "pop"}'

┏━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┳━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┓
┃ Question                              ┃ Answer                                ┃
┡━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━╇━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┩
│ [{'role': 'system', 'content': 'You   │ (Verse 1)                             │
│ are a professional songwriter.        │ In a land of rainbows and glitter,    │
│ You only use language that is         │ Where flowers bloom and skies are     │
│ appropriate for children.'},          │ brighter,                             │
│ {'role': 'user', 'content': 'Write a  │ There's a magical creature so rare,   │
│ song about a unicorns for 12 years    │ With a horn that sparkles in the air. │
│ old pop fans.'}]                      │                                       │
│                                       │ (Chorus)                              │
│                                       │ Unicorns, unicorns, oh so divine,     │
│                                       │ With their mane that shines and eyes  │
│                                       │ that shine,                           │
│                                       │ Gallop through the meadows, so free,  │
│                                       │ In a world of wonder, just you and    │
│                                       │ me.                                   │
└───────────────────────────────────────┴───────────────────────────────────────┘
```

## Documentation
* [Documentation of the `ragbits` CLI](https://ragbits.deepsense.ai/cli/main/)
