Installation and Setup
This guide will walk you through installing, configuring, and using the Corpus CLI to index and chat with your documents.
Step 1: Installation π οΈ
First, you'll need to make the installation script executable. From your terminal, navigate to the CorpusNote directory and run the following command:
chmod +x installation/install.sh
Once you've set the correct permissions, you can run the installation script. This will set up the virtual environment, install the necessary dependencies, and make the corpus command available globally.
./installation/install.sh
Step 2: Configuration βοΈ
After the installation is complete, the script will prompt you to configure your API keys and other settings. If you need to re-run this process at any time, you can do so with the following command:
This will guide you through setting up your API keys and configuring your AI models. The Corpus CLI supports multiple models, and you can switch between them as needed. To see a list of available models and their status, you can run:
To switch to a different model, use the switch command:
corpus models switch <model_name>
Basic Usage
Now that you've installed and configured the Corpus CLI, you can start indexing and chatting with your documents.
Indexing Documents π
To index a document, you'll use the index command. You can index a single file or an entire directory.
- To index a single file:
corpus index /path/to/your/document.pdf
- To index an entire directory:
corpus index /path/to/your/directory
You can also specify a pattern to index only certain files within a directory:
corpus index /path/to/your/directory --pattern "*.pdf"
Chatting with Your Documents π¬
Once your documents are indexed, you can start a chat session with them using the chat command:
This will start an interactive session where you can ask questions about your documents. The AI will use the indexed content to provide answers.
Checking the Status π
To see the status of your document collection, you can use the status command. This will show you how many documents and chunks have been indexed, as well as other useful information.
This basic guide should help you get started with the Corpus CLI. If you need more detailed information about any command, you can use the --help flag (e.g., corpus index --help).
Installation and Setup
This guide will walk you through installing, configuring, and using the Corpus CLI to index and chat with your documents.
Step 1: Installation π οΈ
First, you'll need to make the installation script executable. From your terminal, navigate to the
CorpusNotedirectory and run the following command:Once you've set the correct permissions, you can run the installation script. This will set up the virtual environment, install the necessary dependencies, and make the
corpuscommand available globally.Step 2: Configuration βοΈ
After the installation is complete, the script will prompt you to configure your API keys and other settings. If you need to re-run this process at any time, you can do so with the following command:
This will guide you through setting up your API keys and configuring your AI models. The Corpus CLI supports multiple models, and you can switch between them as needed. To see a list of available models and their status, you can run:
To switch to a different model, use the
switchcommand:Basic Usage
Now that you've installed and configured the Corpus CLI, you can start indexing and chatting with your documents.
Indexing Documents π
To index a document, you'll use the
indexcommand. You can index a single file or an entire directory.You can also specify a pattern to index only certain files within a directory:
corpus index /path/to/your/directory --pattern "*.pdf"Chatting with Your Documents π¬
Once your documents are indexed, you can start a chat session with them using the
chatcommand:This will start an interactive session where you can ask questions about your documents. The AI will use the indexed content to provide answers.
Checking the Status π
To see the status of your document collection, you can use the
statuscommand. This will show you how many documents and chunks have been indexed, as well as other useful information.This basic guide should help you get started with the Corpus CLI. If you need more detailed information about any command, you can use the
--helpflag (e.g.,corpus index --help).