This project is a personal knowledge infrastructure that helps gather, organize, and feed high-quality documentation and context to GitHub Copilot and other AI coding tools to make them truly useful.
Rather than searching the web or flipping through docs, this project creates an AI-powered coding workspace that knows how you work, with your stack.
GitHub Copilot and similar tools can be so much more powerful when they have access to:
- High-quality documentation specific to your tech stack
- Project-specific coding patterns and best practices
- Custom prompts and instructions that reflect your workflow
This repository helps you create a personalized "AI brain" that evolves alongside your development needs.
docs-to-brain/
├── src/
│ ├── resources.json — List of [sourceURL, outputDir] tuples for docs to fetch
│ └── fetch.ts — CLI tool to pull documentation from GitHub
├── brain/ — AI brain with custom prompts and documentation
│ └── .github/
│ └── docs/ — Documentation & reference materials for AI tools
└── package.json — Project dependencies and scripts
For detailed information about the brain folder structure and features, see the brain/README.md file.
git clone https://github.com/YourUsername/docs-to-brain.git && cd docs-to-brain && npm install
Create a .env
file with your GitHub token (an example file .env.example
is provided that you can rename to .env
):
GITHUB_TOKEN=ghp_your_token_here
To create your GitHub token:
- Go to GitHub Settings > Developer settings > Personal access tokens
- Click "Generate new token" (classic)
- Give it a name (e.g., "docs-to-brain")
- For scope, select at least "repo" (full access to repositories)
- Click "Generate token" and copy the token
- Paste it into your
.env
file
This token is used to access GitHub's API to fetch documentation.
Edit src/resources.json
to specify the documentation sources you want to fetch:
[
[
"https://github.com/owner/repo/tree/branch/path/to/docs",
"./category/subcategory"
],
[
"https://github.com/owner/repo/blob/branch/path/to/file.md",
"./category/subcategory/filename.md"
]
]
The first element in each array is the GitHub URL (file or directory), and the second element is the local output path relative to the brain/docs
directory.
Run the fetch script:
npm start
This will:
- Download all specified documentation
- Organize it into the
brain/docs
directory - Automatically update the Table of Contents in brain/README.md
This project includes advanced GitHub Copilot customization features like instruction files, prompt files, and privacy settings. All details about these features have been moved to the brain/README.md file.
For complete information on:
- Instruction files
- Prompt files
- Required VS Code settings
- Privacy and exclusions
- Portability between projects
Please refer to the documentation in the brain folder.
Privacy configurations and exclusion patterns for GitHub Copilot are documented in the brain/README.md file.
As your tech stack evolves, you can:
- Add new documentation sources to
src/resources.json
- Run
npm start
to fetch updates - Create new prompt and instruction files as needed
Consider running updates periodically to ensure your documentation stays current.
The brain/
folder is designed to be modular and portable. For detailed information on how to use the brain folder in other projects, see the brain/README.md file.
For tips on how to effectively use this documentation system with AI tools, please refer to the brain/README.md file.
This system is designed to create:
- A persistent knowledge base that grows with your expertise
- Custom guidance that shapes how AI tools generate code
- A coding environment that feels truly personalized
By feeding high-quality documentation to your AI assistant, you're teaching it to speak your language and understand your tech stack.
- 💬 Twitter / X
- 💻 GitHub
- ☕️ Buy me a coffee
MIT