nao sync
Thenao sync command populates your context folder with content from configured sources.
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 typesdescription.md- Table description (if available)preview.md- Sample data previewprofiling.md- Data profiling information
- Clone or pull the latest code
- Extract relevant files from specified paths
- Index content for the agent
- Store in
docs/folder
- Content is indexed for fast semantic search
- Embeddings are created for relevant context retrieval
- Agent can access all synced information
Scheduling
GitHub Actions
Set up automated syncing with GitHub Actions to keep your context up to date. 1. Create Workflow File This workflow will regularly runnao sync on GitHubβs servers, commit any changes to your context files (like updated database schemas or docs), and push them back to your repository so your context stays in sync without manual commands.
Create .github/workflows/nao_sync.yml in your repository:
- Go to Settings β Secrets and variables β Actions
- Click βNew repository secretβ
- Add secrets for all environment variables used in your
nao_config.yaml:GCP_SERVICE_ACCOUNT_KEY_JSON- Full JSON content of your BigQuery service accountNOTION_API_KEY- If using Notion integration- Any other credentials referenced in your config
- Go to Actions tab in your repository
- Select βNao Syncβ workflow
- Click βRun workflowβ
- Check the Actions tab to see sync history
- Review logs if sync fails
- Verify changes are committed to your repository
The workflow automatically commits and pushes any changes from
nao sync back to your repository, keeping your context files up to date.