docuassist v0.0.1
DocuAssist CLI
DocuAssist is a CLI tool for managing Docuassist Docusaurus GPT Chatbot Plugin for documentation and vector store ingestion. It provides commands to install a plugin and ingest documents into a vector store.
Please note: The Plugin is yet to be published and should be live by next week. The CLI is live and can be tested to Vector Store ingestion.
Table of Contents
Installation
To install the CLI tool globally, run:
npm install -g docuassist
Commands
docuassist plugin init
Installs the docusaurus-docuassist
plugin in the Docusaurus directory. This command checks for Docusaurus installation in the current directory, installs the plugin, and updates the docusaurus.config.js
file.
Usage
docuassist plugin init
Example
docuassist plugin init
After running this command, the docusaurus.config.js
file will be updated with the following configuration:
// docusaurus.config.js
module.exports = {
// ...other config options
plugins: [
[
'docusaurus-docuassist',
{
DocsDir: './docs',
openAiKey: 'YOUR_OPENAI_API_KEY',
openAiAssistantId: 'YOUR_OPENAI_ASSISTANT_ID',
},
],
],
customFields: {
openAiKey: process.env.OPENAI_API_KEY,
openAiAssistantId: process.env.OPENAI_ASSISTANT_ID,
},
};
Make sure to replace YOUR_OPENAI_API_KEY
and YOUR_OPENAI_ASSISTANT_ID
with your actual OpenAI credentials.
docuassist ingest
Ingests documents from the specified docs
folder into the vector store. This command accesses the AssistantID from the docusaurus.config.js
file, checks if the files exist in the vector store, and if not, pushes them to the vector store.
Usage
docuassist ingest
Example
docuassist ingest
This command will check the files in the docs
folder, verify if they exist in the vector store, and add any missing files.
Options
-v, --version
Outputs the current version of the CLI tool.
Usage
docuassist --version
Configuration
The docuassist plugin init
command updates the docusaurus.config.js
file with the necessary configuration for the docusaurus-docuassist
plugin. The configuration includes the path to the docs
directory and the OpenAI API credentials.
Development
Linking the Package
To test the CLI tool locally before publishing, you can link the package:
- Navigate to the root directory of your
docuassist
project. - Run the following command to create a global symlink to your package:
npm link
Now you can run the docuassist
commands as if the package was installed globally.
Unlinking the Package
If you no longer need the local symlink, you can unlink the package:
npm unlink -g docuassist
License
This project is licensed under the MIT License.
1 year ago