A Modern Command-Line Tool for Interacting with Grog LLMs
Project description
groqcli (groq-tool)
A Modern Command-Line Tool for Interacting with Grog LLMs
Table of Contents
Features
1. Direct Prompt
- Run a command with a direct prompt
- Example:
groqcli chat "Explain black holes in 3 points"
2. File-Based Prompt
- Run a command with a file-based prompt
- Example:
groqcli chat my_file.txt
3. Predefined System Prompts
- Use predefined system prompts to customize the response
- Example:
groqcli chat "Transform this script into TypeScript" --system formatScript - Available:
uwu,formatScript,friendly,tech,json,default,fr-default
4. Save Conversation
- Save the current conversation
- Example:
groqcli --save
5. Resume Previous Session
- Resume a previous conversation
- Example:
groqcli resume --last 1
6. List Available Models
- List available models
- Example:
groqcli models
7. Edit Predefined System Prompts
- Edit predefined system prompts
- Example:
groqcli prompts edit
8. Role-Based Prompt
- Use roles to customize the response
- Example:
groqcli "[SYSTEM] Explain black holes in 3 points"
9. Automatic History
- View previous conversation history
- Example:
groqcli --history
10. Rich UI
- Use a rich UI with colors, emojis, etc.
- Example:
groqcli "Explain black holes in 3 points" --rich
Note: These examples are brief and illustrate the features, but you can customize them to fit your needs.
Installation
Using pipx (Recommended)
pipx install groq-tool
pipx install git+https://github.com/daisseur/groqcli.git
Using pip
pip install groq-tool
From Source
git clone https://github.com/daisseur/groqcli.git
cd groqcli
pip install .
Usage
Direct Prompt
groqcli chat "Explain black holes in 3 points"
File-Based Prompt
groqcli chat my_file.txt
With Predefined System Prompt
groqcli chat "Transform this script into TypeScript" --system formatScript
Resume Previous Session
groqcli chat --last 1
Saving session and resume them later
groqcli chat --save-session myfile.groq
groqcli chat --load-session myfile.groq
Compatible with
--last(it does not save the next answer in another timestamp file)
Commands
groqcli: Run the command-line toolgroqcli --system <prompt>: Use a predefined system promptgroqcli --save: Save the current conversationgroqcli resume: Load a previous conversationgroqcli models: List available modelsgroqcli prompts edit: Edit predefined system prompts
Predefined System Prompts
uwu: Cute and cheerful tone (UwU)formatScript: Script format onlyfriendly: Friendly and helpful tonetech: Precise and technical explanationsjson: JSON format onlydefault: Default helpful assistantfr-default: French-speaking helpful assistant
Module groqcli-files (installed by default)
Overview
GroqCLI Files is a module of the GroqCLI ecosystem that allows you to manage and interact with files in a convenient and efficient way. This module provides a set of commands and options that enable you to send multiple files to groq llms.
Examples
- Get documentations for a directory of API endpoints:
Set up a useful system prompt
groqcli set-system endpointFormat "You have to answer using this format: # {endoint path}\nEach params (both required and optional) * `{params}`: `{type}`"
Run the command
groqcli-files ./APIEndpoints -f ~/Server/Work/Max/HubRP/endpoints.md --system endpointFormat
Usage
To use GroqCLI Files, simply run the groqcli-files command followed by the desired options.
Extensibility
GroqCLI is fully extensible and can be customized to fit your needs. You can add new features, commands, and prompts by modifying the source code.
Troubleshooting
If you encounter any issues or have questions, please open an issue on the GitHub repository
Special thanks to @gmfunk9 for providing the inspiration for this project.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file groq_tool-0.1.2.tar.gz.
File metadata
- Download URL: groq_tool-0.1.2.tar.gz
- Upload date:
- Size: 8.6 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.12.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
37519f04571731a2179766822e774d8366bb728a2ad701e7ed5f9d035be790ec
|
|
| MD5 |
a55bcd52a921d809180dc9f0bb1d8373
|
|
| BLAKE2b-256 |
536cda8e65346c5b5b3954b7db1d40294dcf39291cf2278e1502780cf5ccf8d4
|
Provenance
The following attestation bundles were made for groq_tool-0.1.2.tar.gz:
Publisher:
python-publish.yml on daisseur/groqcli
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
groq_tool-0.1.2.tar.gz -
Subject digest:
37519f04571731a2179766822e774d8366bb728a2ad701e7ed5f9d035be790ec - Sigstore transparency entry: 278708584
- Sigstore integration time:
-
Permalink:
daisseur/groqcli@5b80373f9b12fc810b6a22cc7b8843c0142a87e0 -
Branch / Tag:
refs/tags/v0.1.2 - Owner: https://github.com/daisseur
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
python-publish.yml@5b80373f9b12fc810b6a22cc7b8843c0142a87e0 -
Trigger Event:
release
-
Statement type:
File details
Details for the file groq_tool-0.1.2-py3-none-any.whl.
File metadata
- Download URL: groq_tool-0.1.2-py3-none-any.whl
- Upload date:
- Size: 9.7 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.12.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
6d8c3b44b339890cb7483571d968fe5053b6b65f541fb7f645a8c7da51205f3a
|
|
| MD5 |
ac038193d9752be2af7055141c947fef
|
|
| BLAKE2b-256 |
e30cea1eb56f9673f5ee2218ef4104c7324f1d03ed17f7734337f1ccbb28a2ff
|
Provenance
The following attestation bundles were made for groq_tool-0.1.2-py3-none-any.whl:
Publisher:
python-publish.yml on daisseur/groqcli
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
groq_tool-0.1.2-py3-none-any.whl -
Subject digest:
6d8c3b44b339890cb7483571d968fe5053b6b65f541fb7f645a8c7da51205f3a - Sigstore transparency entry: 278708599
- Sigstore integration time:
-
Permalink:
daisseur/groqcli@5b80373f9b12fc810b6a22cc7b8843c0142a87e0 -
Branch / Tag:
refs/tags/v0.1.2 - Owner: https://github.com/daisseur
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
python-publish.yml@5b80373f9b12fc810b6a22cc7b8843c0142a87e0 -
Trigger Event:
release
-
Statement type: