The config command is used to configure the Perpetua CLI.
perpetua configThis will create a directory in your home directory called perpetua and an environment file (called .env) in it. You wil then be prompted to enter some API keys and set some envrionment variables to use the tool. Primarily, you will need to enter your Gemini API key, Tavily API key (for web search), set the [LOCAL] variable that controls whether or not you will use a local LLM for the agents, and set the names of the local LLM and embedding model you will use. You can always update this .env file later to change your settings.
The .env file will look like this:
GEMINI_API_KEY="your_gemini_api_key"
TAVILY_API_KEY="your_tavily_api_key"
Local=True|False # Whether you will use a local LLM for the agents
LOCAL_LLM_NAME="your_local_llm_name" # The name of the local Ollama LLM you will use
LOCAL_EMBD_MODEL="your_local_embedding_model" # The name of the local Ollama embedding model you will use
#optional variables for tracing
LANGSMITH_API_KEY=""
LANGSMITH_TRACING=true|false
LANGSMITH_PROJECT="the_name_of_your_project_for_tracing"
Note:
As of version 0.1.1, you are required to add a Tavily API key to have web search capabilities. If you do not want to use web search, please prompt the agent to not use web search. Moreover, local embedding models are not fully supported, so you will need to use Gemini's embedding models. For more information about setting up a Tavily API key, please consult Tavily's documentation and Gemini's documentation for more information about setting up your API keys. For running local models, please consult Ollama's documentation for more information about setting up your local models.
This directory also contains text files where chats with the model will be stored. You can go to this directory to read past chats. For now, the text files are not the most convenient to read. Moreover, it is hard to find the file as each file is named [thread_id].txt Future versions will include a more convenient UI to view past chats.
The init command is used to initialize the Perpetua CLI.
perpetua initThis will initialize your project as a Perpetua project. None of your input is required for this command to run. It will create a directory called .rag that will contain all the necessary files for the agent. Please do not modify this directory or its contents.
The add command is used to add a file to the staging area.
perpetua add [file]perpetua rm [file]
The rm command is used to remove a file from the staging area. The staging area is a temporary storage area for files that will be processed to the vector stores. You can add multiple files to the staging area.
The commit command is used to commit files to the repository.
perpetua commit --verboseThis will process all files in the staging area and add them to the vector store. Now, the agent can access these files to answer your questions. The --verbose flag is optional and will print the verbose output of the commit process.
The ask command is used to ask questions to the agent.
perpetua ask This will prompt a chat window where you can interact with the agent. To exit the chat window, simply type "q" when prompted.
The search command is used to search the vector store directly.
perpetua search [query]This will search the vector store for the given query and return the most relevant documents. Use this command when you want to search the vector store for specific information.
perpetua diffThis shows if there are any changes in your staged files since the last commit.
perpetua reset --hardThis will reset the staging area to the last committed state. The --hard flag is optional and will reset the .rag directory fully.
perpetua lsThis will list all the files currently tracked by the agent associated with the .rag directory.
perpetua helpThis will show a link to documentation for the Perpetua CLI (this page!).