Skip to content

feat: add the obsidian connector for nao cli [nao-cli]#1075

Open
Francois-lenne wants to merge 5 commits into
getnao:mainfrom
Francois-lenne:main
Open

feat: add the obsidian connector for nao cli [nao-cli]#1075
Francois-lenne wants to merge 5 commits into
getnao:mainfrom
Francois-lenne:main

Conversation

@Francois-lenne

@Francois-lenne Francois-lenne commented Jul 5, 2026

Copy link
Copy Markdown

Why

NAO already ingests context from local databases, git repos, and Notion, but it has no first-class way to pull in local Obsidian notes.

This PR adds a simple Obsidian V1 focused on the core use case: sync Markdown notes from a local vault into the nao context, using the same overall pattern as the existing Notion
integration.

What

Adds a new obsidian integration to the CLI:

  • new obsidian config block in nao_config.yaml
  • interactive setup prompt in nao init
  • new sync provider that copies vault .md files into docs/obsidian/
  • ignores .obsidian/ and non-markdown files
  • preserves the vault directory structure
  • removes stale synced notes
  • exposes synced notes in templates via nao.obsidian.note(...)

Example config:

obsidian:
path: /path/to/your/obsidian-vault

This V1 intentionally does not handle Obsidian-specific semantics yet ([[wikilinks]], embeds, assets, .canvas, backlinks, etc.).

Files

  • cli/nao_core/config/obsidian/init.py
  • cli/nao_core/config/base.py
  • cli/nao_core/config/init.py
  • cli/nao_core/commands/sync/providers/obsidian/provider.py
  • cli/nao_core/commands/sync/providers/obsidian/init.py
  • cli/nao_core/commands/sync/providers/init.py
  • cli/nao_core/templates/context.py
  • cli/nao_core/templates/init.py
  • cli/tests/nao_core/commands/sync/test_obsidian_provider.py
  • cli/tests/nao_core/commands/sync/test_providers.py
  • cli/tests/nao_core/commands/test_init.py
  • cli/README.md
  • scripts/generate-config-docs.py
  • example/nao_config.yaml

Testing

Test it localy in macos

uv run --project /Users/username/nao/cli pytest
/Users/username/nao/cli/tests/nao_core/commands/sync/test_obsidian_provider.py
/Users/username/nao/cli/tests/nao_core/commands/sync/test_providers.py
/Users/username/nao/cli/tests/nao_core/commands/test_init.py

image
  • Manual end-to-end smoke test with:
    • a real local Obsidian vault
    • example/jaffle_shop.duckdb
    • uv run --project /Users/username/nao/cli nao sync

Review in cubic

This PR was written using GPT-5 Codex.

@github-actions

github-actions Bot commented Jul 5, 2026

Copy link
Copy Markdown
Contributor

This PR was auto-closed. Only contributors approved with lgtm can open PRs. Open an issue first.

Maintainers review auto-closed issues daily. Issues that do not meet the quality bar in CONTRIBUTING.md will not be reopened or receive a reply.

If a maintainer replies lgtmi, your future issues will stay open. If a maintainer replies lgtm, your future issues and PRs will stay open.

See CONTRIBUTING.md.

@github-actions github-actions Bot closed this Jul 5, 2026
@Bl3f Bl3f reopened this Jul 5, 2026

@cubic-dev-ai cubic-dev-ai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

2 issues found across 14 files

Reply with feedback, questions, or to request a fix.

Re-trigger cubic

Comment thread cli/README.md
Comment thread cli/nao_core/templates/context.py Outdated
@github-actions

github-actions Bot commented Jul 5, 2026

Copy link
Copy Markdown
Contributor

🚀 Preview Deployment

URL https://pr-1075-5fe1773.preview.getnao.io
Commit 5fe1773

⚠️ No LLM API keys configured - you'll see the API key setup flow when trying to chat.


Preview will be automatically removed when this PR is closed.

@Francois-lenne

Copy link
Copy Markdown
Author

hi @Bl3f i resolve all the issues with the type checker and the ai code review

@Bl3f Bl3f left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you so much for this first contribution. I'm not an Obsidian user but it looks good to me.

So let's merge this. We will publish a release tomorrow with it!

@Bl3f Bl3f left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Oh actually pytest is failling, can you fix it first pls?

@Francois-lenne

Copy link
Copy Markdown
Author

@Bl3f sorry for this issue i fix it i change the output-dir constant

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants