A powerful CLI assistant designed to support multiple models and profiles to suit your needs. Whether you're working on programming, researching movies, or diving into database management, I'm here to assist!
β οΈ Important: Gennie v.1.* is a breaking change from previous versions. In order to improve profiles functionality and add new features, I decided to use.tomlfiles to store profiles. If you had created personal profiles in previous versions, you will need to convert them to the new format. You can find examples of profiles in the profiles directory.
Profiles act like personal assistants. Create profiles for different topics and switch between them effortlessly. For example, have a profile for:
- Database Administrator: Optimized suggestions for database queries.
- Film Buff: Recommendations and insights on movies.
- Unit Testing: Guidance on writing reliable unit tests.
Use gennie profile to manage your profiles or the --profile (-p) flag with the ask command.
Profile slugs are derived from the filename. Ie: go.profile.toml can be used with the flag -p=go
- Default location:
~/.config/gennie/profiles(*must be created by user before using gennie). Every file inside the profile directory ending with.profile.tomlwill be automatically read as a profile
You can download sample profiles from the profiles directory.
Profiles must be toml files ending with profile.toml.
Here's a simple example, with the required fields, for a sql profile to help you out with database related questions.
File: sql.profile.toml
name = "SQL"
author = "Roberto Seba"
data = '''
You are expert database administrator. Try to keep your answers short.
When provided with a question go through the following steps:
1. Understand the requirements
2. Asses if is a question about a given schema/scenario or a general question
3. If not provided with a Database type, assume Postgres
4. Think about the best way to solve the problem
5. If the question is for a query, write the query with only the provided data or ask for more information
6. If its a general question, provide an answer following best practices
7. Always think about performance and data integrity
Do not repeat the steps in the answer. Only provide the solution to the problem.
'''gennie ask "how can I read a EXPLAIN returned from PostgreSQL" -p=sqlExplore multiple models at your fingertips! Check and switch between them using gennie model, or with the --model flag in the ask command.
Current Models:
- OpenAI's GPT-4
- OpenAI's GPT-4 Mini
- Anthropic's Claude
- Maritaca AI
- Groq's DeepSeek-R1-Distill-Llama-70B
- Ollama
gennie model slugsgennie ask who won the oscar for best movie in 2023 -m=sonnet
This is how you can manage your conversation history and keep your data for future use.
The last question is always saved as a active conversation. You can always use follow up to continue on the same conversation. BUT if you don't use the flag, a new conversation is started and you lose the previous one.
So, in order for you to maintain an archive of your conversations you can use these commands: conversation save and conversation load
That way you can have a directory with all you conversations for whenever you want to continue the chat.
Let's say you made a bunch of questions but you feel like you might want to revisit this conversation. Save it using:
gennie conversation save <jsonfilename>
You can use this whenever you want to reload old conversations and make it active again
gennie conversation load <filename of previously saved conversation>
Enhance your queries with the --followup (or -f) flag for related questions that build upon your previous interactions:
gennie ask "Create a list of the best movies of 2021"
gennie ask "Are there any movies in that list by Martin Scorcese?" --followup
β οΈ Note: Without a follow-up, your conversation is cleared. Use--followup (-f)to maintain context or export your conversation with theexportcommand.
Incorporate context by appending files to your queries using the --append (or -a) flag:
gennie ask "Build me a unit test for" --append main.goKeep track of your current model and profile with:
gennie statusgo install github.com/robertoseba/gennie@latestIf after installation you receive a command not found error, ensure that your $GOPATH/bin is in your $PATH.
Here's how you can add it:
export PATH=${PATH}:`go env GOPATH`/binVisit the releases page to download the appropriate binary for your system.
After installing you must configure api keys for the llm providers (OpenAi, Anthropic...) and a profiles folder where you'll keep your profile's collection. You can do this by running the following command:
gennie configgennie --help
Each model requires an API key to function.
Use the gennie config command to set your API keys.
Gennie is an OPEN source project in its early stages. We welcome any bugs, issues, or suggestions you may have. Feel free to create an issue or contact me directly, and I'll respond as soon as possible!
Since this is a very early version and a personal project, breaking changes may occur more often than in a more stable project. I'll try to keep the changes as minimal as possible, but I can't guarantee that they won't happen.
This project is licensed under the MIT License.


