Skip to content

ApptivaAG/clean-demo

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Clean Demo Chatbot

A CLI tool to clean up demo chatbot MongoDB collections.

Usage

Run directly with Nix (no installation needed):

nix run github:ApptivaAG/clean-demo

The script will:

  1. Ask for your project ID (e.g., kd6zk2)
  2. Ask for your password (hidden input)
  3. Connect to the MongoDB database
  4. Show document count for each collection
  5. Ask for confirmation before each operation
  6. Delete all documents from conversations and trainingtasks
  7. Reset chatbots collection with default values

Development

Enter the development environment:

nix develop

Install dependencies:

npm install

Build the project:

npm run build

Run locally:

npm start

Collections

  • conversations: All documents will be deleted
  • trainingtasks: All documents will be deleted
  • chatbots: All documents will be updated with default name and introduction

Error Handling

The script will stop and display an error message if:

  • Connection to MongoDB fails
  • Any database operation fails
  • User cancels the operation (Ctrl+C)

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors