0.5.0 • Published 11 months ago

docubot v0.5.0

Weekly downloads
-
License
ISC
Repository
github
Last release
11 months ago

Docubot

Docubot is a bot that helps you document your code. It allows you to save your code into memory and chat with it using AnswerAI, or your own OpenAI or Pinecone API Keys

Usage

To use Docubot, you need to install it globally and then run it. Once it's running, you can chat with it using AnswerAI.

First time

  • Add the following environment variables to your .env file
    • PINECONE_API_KEY (required)
    • PINECONE_ENVIRONMENT (required)
    • OPENAI_API_KEY (required)
    • DOCUBOT_PINECONE_INDEX_NAME (defaults to "docubot")
    • DOCUBOT_PINECONE_NAMESPACE (defaults to "default")
npm install -g docubot

Change your directory to your desired repo

  cd your_path_here

Run Docubot

docubot start -full

It will then count the tokens and give you a cost estimate. When you say yes, it will go through all of your files and magic... automated documentation!

Configuration

Sure! Here's a table that describes the properties and values in the configuration file:

Constant nameDescription
codeBasePathA string representing the base path of the code.
pineconeIndexNameA string representing the name of the Pinecone index.
pineconeNamespaceA string representing the namespace of the Pinecone index.
docubotDirectoryNameA string representing the name of the Docubot directory.
docubotDirectoryA string representing the file path of the Docubot directory.
markdownDirectoryA string representing the file path of the Markdown directory.
promptsFilePathA string representing the file path of the prompts file.
templateFilePathA string representing the file path of the template file.
packageJsonPathA string representing the file path of the package.json file.
invalidPathsAn array of strings representing invalid file paths.
invalidFileTypesAn array of strings representing invalid file types.
invalidFileNamesAn array of strings representing invalid file names.
fileTypesAn object containing key-value pairs representing different file types and their associated properties, such as file types, prompt, and template files.
fileTypes.docsAn object representing documentation file types and their associated properties.
fileTypes.reactAn object representing React file types and their associated properties.
fileTypes.apiAn object representing API file types and their associated properties.
fileTypes.configAn object representing configuration file types and their associated properties.
fileTypes.scriptAn object representing script file types and their associated properties.
fileTypes.contentModelAn object representing content model file types and their associated properties.
fileTypes.defaultAn object representing the default file type and its associated properties.

To execute the command on a single file

docubot start /path/to/file

Commands

Docubot has several commands that you can use to interact with it.

docubot save

The save command allows you to save your code into pinecone memory

docubot save

docubot list

The list command allows you to list all of the files that you have saved.

docubot list

TODO Items

CLI

  • Add husky job to save to autodocument the change, allow the user to change the comment then pinecone on commit
  • Classify files based on the area of the site using the embedding API
  • Enable automated syncing to pincone without embeddings on when a file changes
  • handle files over 8k in tokens
  • Git action for pull requests that auto create the change log documentation based on the commit history and path file

UI

  • Add ability to select files to use in completion
  • Show the user how many tokens they can have in the completion based on what files, model, and prompt they have selected

Oberservations:

  • I noticed that getting the correct folder structure is hard to get. I want to add a directory tree to the documentation that gets sent with each request for debugging and teaching purposes
0.5.0

11 months ago

0.3.0

1 year ago

0.2.1

1 year ago

0.2.0

1 year ago

0.1.11

1 year ago

0.1.10

1 year ago

0.1.9

1 year ago

0.1.8

1 year ago

0.1.7

1 year ago

0.1.6

1 year ago

0.1.5

1 year ago

0.1.4

1 year ago

0.1.3

1 year ago

0.1.2

1 year ago

0.1.1

1 year ago

0.1.0

1 year ago