Skip to main content

nao sync

The nao sync command populates your context folder with content from configured sources.
nao sync
What Gets Synced When you run nao sync, the following happens: 1. Database Schemas For each database in your nao_config.yaml:
  • Connect to the database
  • Extract schema information (tables, columns, data types)
  • Generate context files in databases/ folder
  • Create structured files for each table:
    • columns.md - Column definitions and types
    • description.md - Table description (if available)
    • preview.md - Sample data preview
    • profiling.md - Data profiling information
Example structure after sync:
databases/
└── type=snowflake/database=analytics/
    β”œβ”€β”€ table=customers/
    β”‚   β”œβ”€β”€ columns.md
    β”‚   β”œβ”€β”€ description.md
    β”‚   β”œβ”€β”€ preview.md
    β”‚   └── profiling.md
    └── table=orders/
        β”œβ”€β”€ columns.md
        β”œβ”€β”€ description.md
        β”œβ”€β”€ preview.md
        └── profiling.md
2. Repositories For each repository in your configuration:
  • Clone or pull the latest code
  • Extract relevant files from specified paths
  • Index content for the agent
  • Store in docs/ folder
3. Indexing After syncing:
  • Content is indexed for fast semantic search
  • Embeddings are created for relevant context retrieval
  • Agent can access all synced information

Scheduling

Initial Setup After running nao init, sync to populate your context:
nao init
nao sync
Scheduled Sync Set up automated syncing with cron:
# Sync daily at 3 AM
0 3 * * * cd /path/to/project && nao sync
Github Action Integrate sync into your deployment pipeline:
# GitHub Actions example
- name: Sync nao context
  run: |
    pip install nao-core
    nao sync
Next Steps