SyntaxVault is a high-performance CLI tool built to manage and retrieve reusable code snippets instantly.
- O(1) Search: Snippets are stored in a hash map for near-instant retrieval.
- Auto-Clipboard: Snippets are automatically copied to your system clipboard upon retrieval.
- Template Support: Quick-copy boilerplate code for Competitive Programming (LeetCode/Codeforces).
- Architecture: Separated storage logic and CLI interface.
- Clone the repository:
git clone https://github.com/yourusername/SyntaxVault.git cd SyntaxVault - Set up a virtual environment
python3 -m venv venv source venv/bin/activate pip install -r requirements.txt - Create a global alias
Add this line at the bottom:
nano ~/.zshrcRefresh your config:alias sv='/path/to/SyntaxVault/venv/bin/python /path/to/SyntaxVault/main.py'source ~/.zshrc
| Command | Description |
|---|---|
sv add <name> |
Add a new code snippet |
sv list |
Show all code snippets in a table |
sv get <name> |
Display code and copy to clipboard |
sv edit <name> |
Modify an existing code snippet |
sv search <query> |
Filter snippets by name or description |
sv template <lang> |
Copy a CP template (e.g., sv template cpp) |