A CLI tool to clean up demo chatbot MongoDB collections.
Run directly with Nix (no installation needed):
nix run github:ApptivaAG/clean-demoThe script will:
- Ask for your project ID (e.g.,
kd6zk2) - Ask for your password (hidden input)
- Connect to the MongoDB database
- Show document count for each collection
- Ask for confirmation before each operation
- Delete all documents from
conversationsandtrainingtasks - Reset
chatbotscollection with default values
Enter the development environment:
nix developInstall dependencies:
npm installBuild the project:
npm run buildRun locally:
npm start- conversations: All documents will be deleted
- trainingtasks: All documents will be deleted
- chatbots: All documents will be updated with default name and introduction
The script will stop and display an error message if:
- Connection to MongoDB fails
- Any database operation fails
- User cancels the operation (Ctrl+C)