Urgent.News

One page, thousands of outlets. See who else covered it.

Editions

AI

Connect GitHub to ChatGPT: Obsidian Vault as Project Context

Once you finish putting your Obsidian vault on GitHub , what you have is a repository full of md files. On its own that is a backup. It starts being useful when ChatGPT can read it. Three steps. Connect GitHub to ChatGPT, scope the access down to the vault repository, then create a project and attach that repository to it. After that you just talk inside the project. Obsidian has an easy time…

After completing the process of linking an Obsidian vault on GitHub, you end up with a repository containing markdown files. At this point, the vault becomes useful when ChatGPT can access it. There are three steps to follow:

1. Connect GitHub to ChatGPT.

2. Scope the access down to the vault repository.

3. Create a project and attach the repository to it.

The markdown files in the vault are already in a format that ChatGPT can easily read, so there is no need for any additional conversion or export. When you connect GitHub, go to Settings and locate the Apps or Connectors section. Choose GitHub from the list and follow the OAuth screen to select the account and repositories ChatGPT will have access to. It is important to limit the scope to only the vault repository to ensure privacy.

Next, create a project and attach the vault repository to it as a source. Creating a project is beneficial as it allows you to share sources and instructions across conversations. Write project instructions, such as "Use my vault" once, and observe how related conversations will be grouped together in the project's detail view. Add material on the sources side, where you can select the connected app.

While writing project instructions, specify that ChatGPT should search your vault notes before answering and cite the file path of any note it uses as the basis for its response. If no path is shown, it means the vault was not involved in the answer, and you should ask again. The crucial aspect is that the vault must be attached for ChatGPT to leverage its contents effectively.

Once you start a conversation within the project, ChatGPT will pull information from your notes without needing explicit instructions. Avoid attaching files and re-explaining background information at the beginning of each chat. This approach is particularly helpful when asking questions that require context from your personal experience, as the vault contains that information.

Be aware that the GitHub connector only reads markdown, text, and code files; it does not access commit history. Consequently, markdown-first vaults retain all their data, while PDFs and scanned images in the attachments folder remain unreadable through this method. After connecting the vault, allow some time for indexing to complete, as this may take a few moments. If a recently committed note does not appear, wait and try again.

When a conversation becomes lengthy and yields useful insights, consider saving it as a note. The connector has become familiar with the vault's structure, so the front matter and title conventions should automatically generate a note with appropriate formatting. However, saving remains your responsibility, as the GitHub connection will not perform this action automatically.

Written by urgent.news from Dev.to's reporting — not their text. Machine-written — may contain errors; check the original before relying on it.

Read the original at dev.to →

More in AI

Obsidian + GitHub: Notes You Can Write With AI

Obsidian became the strongest-positioned note app the moment LLMs went mainstream. There's one reason for that. A vault is nothing but markdown files in folders, and that collapsed the gap between how…

More from Tuesday 18 August →