Ignore files and folders in Knowledge Stack
Learn how to use .mstyignore to exclude files and folders from your knowledge stack
If you're looking for the Msty Studio documentation instead, you can find it here: Go to Msty Studio Docs →
Learn more about Msty Studio at Msty.ai →
The .mstyignore
file is a powerful tool allows you to specify which files and folders should be ignored when composing your knowledge stack. By using .mstyignore
, you can streamline your knowledge base, exclude unnecessary files, and maintain a cleaner, more focused stack.
Understanding .mstyignore Syntax
Good news for those familiar with Git: .mstyignore
uses the same syntax as .gitignore
. This means if you're already comfortable with .gitignore
, you'll find .mstyignore
intuitive and easy to use. For those new to this syntax, don't worry – it's straightforward and easy to learn.
How to Create and Use a .mstyignore File
- Create a new file named "
.mstyignore
" in the root directory of your knowledge stack folders or Obsidian vaults. - Open the file in a text editor.
- Add patterns for files and folders you want to ignore, one per line.
- Save the file.
Syntax Rules and Pattern Examples
Here are some common patterns and what they do:
- Ignore specific files: example.txt
- Ignore all files with a certain extension: *.log
- Ignore all files in a specific folder: folder_name/
- Ignore a specific folder and all its contents: folder_name/**
- Ignore files or folders that match a pattern: */temp_
- Negate a pattern (include a file that would otherwise be ignored): !important.txt
Practical Examples
Here's an example of what your .mstyignore
file might look like:
Best Practices
- Keep your
.mstyignore
file in the root directory of your knowledge stack. - Use comments (lines starting with #) to explain complex patterns.
- Be specific to avoid accidentally ignoring important files.
- Regularly review and update your
.mstyignore
file as your knowledge stack evolves.
By effectively using .mstyignore
, you can maintain a clean, relevant, and efficient knowledge stack in Misty AI. This allows you to focus on the information that matters most, improving the overall quality and usefulness of your AI assistant.