Skip to content

A basic guide to get started with the Corpus CLI, based on my usage patterns with SumanthΒ #8

@gladishd

Description

@gladishd

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:

corpus config setup

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:

corpus models list

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:

corpus chat

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.

corpus status

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).

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions