Overview
Snippets AI makes it effortless to import your existing snippet collections, code files, notes, or any text-based content. Simply drag and drop files from your computer directly into Snippets AI, and they’re instantly converted into organized, searchable snippets. This guide shows you how to import single files, bulk import entire directories, and migrate from other tools.Why Import Matters
You likely already have valuable content scattered across:- Text files and Markdown notes
- Code snippet files (
.js,.py,.sql, etc.) - Documentation files
- Export files from other snippet managers
- Note-taking apps exports
- Gists and code samples
How It Works
Drag & Drop Import
Single File Import
-
Open Finder/Explorer
- Navigate to the file you want to import
-
Select the File
- Click once to select
-
Drag to Snippets AI
- Click and hold on the file
- Drag it over to the Snippets AI window
-
Drop Into Target Location
Drop onto:
- Specific Folder: File imports into that folder
- Main Panel: File imports into currently selected folder
- Empty Space: File imports into root/current team
-
Snippet Created
- New snippet appears with filename as title
- File content becomes snippet content
- Syntax automatically detected based on file extension
Multiple Files Import
Import many files at once:-
Select Multiple Files
- In Finder/Explorer:
Cmd/Ctrl + Clickfor individual filesShift + Clickfor range
- In Finder/Explorer:
-
Drag Selection to Snippets AI
- All files drag together
- Badge shows count (e.g., “12 files”)
-
Drop Into Target
- All files import into same destination folder
-
Batch Processing
- Snippets AI processes files one by one
- Progress indicator shows import status
- All snippets appear when complete
Folder Import
Import an entire directory:- Drag a Folder from Finder/Explorer
- Drop onto Snippets AI
-
Folder Structure Options:
Option A: Flatten
- All files in folder import as snippets
- No subfolder structure preserved
- All snippets in target folder
- Each subfolder becomes a folder in Snippets AI
- Nested structure maintained
- Files become snippets in corresponding folders
Supported File Types
Code Files
All programming languages:.js,.jsx- JavaScript, React.ts,.tsx- TypeScript.py- Python.rb- Ruby.go- Go.rs- Rust.java- Java.cpp,.c,.h- C/C++.cs- C#.swift- Swift.php- PHP.sql- SQL.sh,.bash,.zsh- Shell scripts
Markup & Documentation
.md- Markdown.mdx- MDX.txt- Plain text.html- HTML.css,.scss,.sass- Stylesheets.json- JSON.yaml,.yml- YAML.xml- XML.tex- LaTeX
Configuration Files
.env- Environment variables.config- Config files.toml- TOML config.ini- INI filesDockerfile- Docker configs.gitignore,.dockerignore- Ignore files
Other Formats
.log- Log files (imported as text).csv- CSV files (imported as text)- No extension - Imported as plain text
Unsupported File Types
Binary files are not supported:- Images (
.png,.jpg,.gif) - Videos (
.mp4,.mov) - Archives (
.zip,.tar) - Executables (
.exe,.app)
Import Settings
Snippet Naming
When importing, Snippets AI uses: Default: Filename becomes snippet name- Import dialog shows filename
- Edit name before confirming
- Applies to single file imports
- Import with default names
- Bulk rename afterwards using folder actions
Syntax Detection
Snippets AI auto-detects syntax:| File Extension | Detected Syntax |
|---|---|
.js, .jsx | JavaScript |
.ts, .tsx | TypeScript |
.py | Python |
.sql | SQL |
.md | Markdown |
.txt | Plain Text |
- After import, open snippet
- Change syntax via syntax selector
- See Syntax Highlighting guide
Tag Application
Apply tags during import: Method 1: Drop on Tag- Drag files to tag in sidebar
- Files import with that tag applied
- Some import dialogs allow tag selection
- Choose tags before confirming import
- Import files first
- Select all imported snippets
- Drag to tags to apply
Migration From Other Tools
From TextExpander
-
Export from TextExpander
- File → Export → Text File Format
- Exports as
.txtfiles
-
Import to Snippets AI
- Drag exported files
- Drop into Snippets AI
- Snippets created from each file
-
Reorganize
- Use folders/tags to organize
- Set up shortcuts for text expansion
From Raycast
-
Locate Raycast Snippets
- Raycast stores snippets as JSON
- Export via Raycast settings
-
Convert to Text Files (if needed)
- Use script to extract snippets
- Save each as
.txtor.md
-
Import to Snippets AI
- Drag files to Snippets AI
- Apply tags for categorization
From Notion
-
Export Notion Pages
- Export as Markdown & CSV
- Downloads
.mdfiles
-
Import Markdown Files
- Drag
.mdfiles to Snippets AI - Preserves Markdown formatting
- Drag
-
Clean Up Imports
- Remove Notion metadata if present
- Organize into folders
From Alfred Snippets
-
Export Alfred Snippets
- Alfred Preferences → Snippets → Export
-
Import JSON or Text Files
- If plain text, drag to Snippets AI
- If JSON, may need conversion script
-
Set Up Shortcuts
- Configure keyboard shortcuts in Snippets AI
From Gists
-
Download Gists
- Clone gist repos or download files from GitHub
-
Import to Snippets AI
- Drag gist files
- Syntax auto-detected
-
Tag by Language or Purpose
- Apply relevant tags
- Organize by project
Bulk Import Best Practices
Organize First: Create folders in Snippets AI before importing. Drop files
into appropriate folders during import.
Clean Filenames: Rename files before importing if they have unclear names.
Filename becomes snippet name.
Tag During Import: Drop files on tags or apply tags immediately after
import while they’re fresh in mind.
Import in Batches: Import related files together (e.g., all SQL queries),
then organize, then import next batch.
Review After Import: Quickly scan imported snippets to verify content
imported correctly and syntax detected properly.
Advanced Import
CSV Import
Import structured data from CSV:- Prepare CSV
-
Import CSV
- Snippets AI can parse CSV with headers
- Creates snippets with specified tags/folders
-
Map Columns
- Import dialog maps CSV columns to snippet fields
- Flexible column mapping
JSON Import
Import from JSON exports:API Import
For programmatic import, use the Snippets AI API:Troubleshooting
Import Failed
If files don’t import:- Check File Type: Ensure file is text-based, not binary
- File Size: Very large files (>10MB) may fail; split them up
- Permissions: Ensure Snippets AI has file system access
- Encoding: Files should be UTF-8 encoded
Wrong Syntax Detected
If syntax highlighting is incorrect:- Open imported snippet
- Click syntax selector
- Choose correct syntax manually
- Syntax is saved with snippet
Duplicate Imports
If you accidentally import same files twice:- Use search to find duplicates
- Select duplicate snippets
- Delete them
- Or use “Merge Duplicates” feature if available
What’s Next
Drag & Drop Organization
Learn how to organize imported snippets with drag & drop
Syntax Highlighting
Adjust syntax highlighting for imported code snippets
API Reference: Create Snippets
Use the API for programmatic bulk import