Skip to main content
Nia Sync is a standalone CLI daemon that continuously synchronizes your local data sources with Nia, enabling AI agents to search your personal knowledge base.
Privacy First: Local folders are private to your account. They’re searched separately from public repositories and documentation.

Quick Install

nia-sync is deprecated. Local sync is now built into the main Nia CLI installed by npx nia-wizard@latest. If you previously installed nia-sync via pip or uv, uninstall it to avoid conflicts with the new nia command:
Then follow the Installation guide to set up the current CLI.
Follow the Installation guide to install the Nia CLI via npx nia-wizard@latest.

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 in real-time.
4

Check Status

View all synced sources:

CLI Commands

Core Commands

Search & Query

Search your indexed sources directly from the terminal:

Monitoring & Debugging

Sync Control

Web Integration

Open Nia web app pages directly from the CLI:

Configuration Management

Config Commands

Manage CLI settings directly from the terminal:

Ignore Patterns

Customize which files are excluded from sync:

Watch Directories

Configure which directories are scanned for auto-linking sources:
When you create a folder in a watched directory that matches an unlinked source’s name, Nia automatically discovers and links it.

Source ID Shortcuts

You don’t need to type full UUIDs. Nia accepts:
  • ID prefixes: nia info a3f2 matches a3f2b1c8-...
  • Display names: nia pause "My Notes" matches by folder name
If a prefix is ambiguous (matches multiple sources), you’ll be prompted with the matches.

Daemon Mode

Running nia without arguments starts the sync daemon with real-time file watching:
The daemon:
  • Watches for file changes using native filesystem events
  • Syncs changes within seconds of detection
  • Periodically refreshes the source list from the web UI
  • Auto-discovers new folders matching unlinked sources
  • Sends heartbeats to mark daemon as online

Daemon Flags


Supported Data Sources

Nia Sync automatically extracts and indexes content from various data sources:

Chat & Messages

  • iMessage (~/Library/Messages/chat.db)
  • WhatsApp (ChatStorage.sqlite)
  • Telegram (JSON exports, ZIP files)

Apple Ecosystem

  • Apple Notes (NoteStore.sqlite)
  • Apple Contacts (AddressBook / vCard)
  • Apple Reminders (SQLite)
  • macOS Stickies (Stickies DB / plist)

Browser History

  • Safari (~/Library/Safari/History.db)
  • Chrome / Brave / Edge
  • Firefox

Media & Files

  • Screenshots (metadata + optional OCR text)
  • Generic SQLite databases
  • Regular folders with text files, code, notes

Virtual File Format

Database content is extracted into virtual text files for semantic search:

Web UI

You can also manage synced sources from the Nia web app:
  1. Go to app.trynia.ai
  2. Navigate to Settings → Local Sync
  3. View sync status, add/remove sources, and configure sync intervals

Sync Intervals

Configure how often sources are synced:

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

Config File

Credentials are stored in ~/.nia-sync/config.json with secure permissions (mode 0600).

Limits


Security

350+ exclusion patterns automatically protect sensitive files from being synced.
The following are never synced:
  • Credentials: .env, .pem, .key, SSH keys, *credentials*, *secrets*, *token*
  • Version control: .git, .svn
  • Dependencies: node_modules, venv, __pycache__
  • Build outputs: dist/, build/, .next/
API keys are stored locally with user-only read/write permissions and are never logged or transmitted in plaintext.

End-to-End Encryption

For sensitive personal data (messages, contacts, notes), Nia supports E2E encrypted sync where plaintext never leaves your device. The server stores only ciphertext and encrypted vectors.

E2E Encryption Guide

Learn how E2E encryption works, supported source types, key management, and cookbook examples for syncing iMessage, WhatsApp, Apple Notes, and more.

Need Help? Join our Discord community or reach out through app.trynia.ai for support.