Privacy First: Local folders are private to your account. They’re searched separately from public repositories and documentation.
Quick Install
Getting Started
1
Login
Authenticate with your Nia account:This opens your browser for secure OAuth authentication.
2
Add a Source
Add a local folder or database to sync:The CLI auto-detects known database paths (iMessage, browser history, etc.).
3
Start Syncing
Start the sync daemon:The daemon watches for file changes and syncs incrementally.
4
Check Status
View all synced sources:
CLI Commands
| Command | Description |
|---|---|
nia login | Browser-based OAuth authentication |
nia logout | Clear stored credentials |
nia status | Show all configured sources with sync status |
nia start | Start sync daemon (watch mode by default) |
nia --poll | Start daemon in polling mode (no file watching) |
nia once | Run one-time sync then exit |
nia add <path> | Add new source for sync |
nia link <ID> <path> | Link cloud source to local path |
nia remove <ID> | Remove source from sync |
nia upgrade | Check and install updates |
Supported Data Sources
Nia Sync automatically extracts and indexes content from various data sources:Chat & Messages
- iMessage (
~/Library/Messages/chat.db) - Telegram (JSON exports, ZIP files)
Browser History
- Safari (
~/Library/Safari/History.db) - Chrome / Brave / Edge
- Firefox
Databases
- Generic SQLite databases
- Auto-extracts tables into searchable text
Folders
- Regular folders with text files
- Code, notes, documentation
Virtual File Format
Database content is extracted into virtual text files for semantic search:| Source | Virtual Path Format |
|---|---|
| iMessage | messages/{contact}/{date}_{row_id}_{direction}.txt |
| Safari/Chrome/Firefox | history/{domain}/{date}_{id}.txt |
| Telegram | telegram/{chat_name}/{date}_{msg_id}.txt |
Web UI
You can also manage synced sources from the Nia web app:- Go to app.trynia.ai
- Navigate to Settings → Local Sync
- View sync status, add/remove sources, and configure sync intervals
Sync Intervals
Configure how often sources are synced:| Interval | Description |
|---|---|
5m | Every 5 minutes |
hourly | Every hour |
6h | Every 6 hours |
daily | Once per day |
Searching Local Folders
Once synced, your local folders are searchable via MCP tools:Local folders are private and searched separately from public repositories. Use
local_folders parameter in search() to include them.Configuration
Environment Variables
| Variable | Default | Description |
|---|---|---|
NIA_API_URL | https://api.trynia.ai | Override API base URL |
Config File
Credentials are stored in~/.nia-sync/config.json with secure permissions (mode 0600).
Limits
| Limit | Value |
|---|---|
| Max files per folder | 5,000 |
| Max total upload size | 100 MB per folder |
| Max individual file size | 5 MB |
| Max database size | 1 GB |
| Max rows per table | 100,000 |
Security
350+ exclusion patterns automatically protect sensitive files from being synced.
- Credentials:
.env,.pem,.key, SSH keys,*credentials*,*secrets*,*token* - Version control:
.git,.svn - Dependencies:
node_modules,venv,__pycache__ - Build outputs:
dist/,build/,.next/

