{"id":22937638,"url":"https://github.com/tanq16/ai-context","last_synced_at":"2026-05-23T05:20:09.058Z","repository":{"id":267897417,"uuid":"902685829","full_name":"Tanq16/ai-context","owner":"Tanq16","description":"CLI tool to produce MD context files from many sources, to help interact with LLMs (ChatGPT, Llama3, Claude, etc.).","archived":false,"fork":false,"pushed_at":"2025-03-19T15:44:57.000Z","size":6975,"stargazers_count":83,"open_issues_count":0,"forks_count":7,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-04-02T16:07:31.593Z","etag":null,"topics":["ai","anthropic","chatgpt","claude","cli","context","data-hoarder","deepseek","gemini","genai","github","golang","gpt","llama3","llm","llm-context","ollama","webpage-capture","youtube"],"latest_commit_sha":null,"homepage":"","language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Tanq16.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2024-12-13T04:09:25.000Z","updated_at":"2025-03-27T06:48:17.000Z","dependencies_parsed_at":"2025-02-02T08:18:19.515Z","dependency_job_id":"09beecc5-b841-4ce8-86a4-954e8aa0f350","html_url":"https://github.com/Tanq16/ai-context","commit_stats":null,"previous_names":["tanq16/ai-context"],"tags_count":10,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Tanq16%2Fai-context","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Tanq16%2Fai-context/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Tanq16%2Fai-context/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Tanq16%2Fai-context/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Tanq16","download_url":"https://codeload.github.com/Tanq16/ai-context/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248074927,"owners_count":21043491,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["ai","anthropic","chatgpt","claude","cli","context","data-hoarder","deepseek","gemini","genai","github","golang","gpt","llama3","llm","llm-context","ollama","webpage-capture","youtube"],"created_at":"2024-12-14T12:13:51.964Z","updated_at":"2026-05-23T05:20:09.050Z","avatar_url":"https://github.com/Tanq16.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"\u003cdiv align=\"center\"\u003e\n  \u003cimg src=\".github/assets/logo.png\" alt=\"AI Context Logo\" width=\"200\"\u003e\n  \u003ch1\u003eAI Context\u003c/h1\u003e\n\n  \u003ca href=\"https://github.com/tanq16/ai-context/actions/workflows/release.yaml\"\u003e\u003cimg alt=\"Build Workflow\" src=\"https://github.com/tanq16/ai-context/actions/workflows/release.yaml/badge.svg\"\u003e\u003c/a\u003e\u0026nbsp;\u003ca href=\"https://github.com/tanq16/ai-context/releases\"\u003e\u003cimg alt=\"GitHub Release\" src=\"https://img.shields.io/github/v/release/tanq16/ai-context\"\u003e\u003c/a\u003e\u003cbr\u003e\u003cbr\u003e\n  \u003ca href=\"#capabilities\"\u003eCapabilities\u003c/a\u003e \u0026bull; \u003ca href=\"#installation\"\u003eInstallation\u003c/a\u003e \u0026bull; \u003ca href=\"#usage\"\u003eUsage\u003c/a\u003e \u0026bull; \u003ca href=\"#tips-and-notes\"\u003eTips \u0026 Notes\u003c/a\u003e\n\u003c/div\u003e\n\n---\n\nGenerate AI-friendly markdown files from GitHub repos, local code, YouTube videos, or webpages using a multi-arch, multi-OS CLI tool to make your interactions with LLMs (like ChatGPT, Claude, etc.) easy.\n\n## Capabilities\n\n| Category | Commands | Description |\n|----------|----------|-------------|\n| Processing | `ai-context [url/path]` | Process local directories, GitHub repos, YouTube videos, or webpages |\n| Batch | `ai-context -f [file]` | Process multiple sources concurrently from a list file |\n\n## Installation\n\n### Binary\n\nDownload from [releases](https://github.com/tanq16/ai-context/releases):\n\n```bash\n# Linux/macOS\nARCH=$(uname -m); [ \"$ARCH\" = \"x86_64\" ] \u0026\u0026 ARCH=amd64; [ \"$ARCH\" = \"aarch64\" ] \u0026\u0026 ARCH=arm64\ncurl -sL https://github.com/tanq16/ai-context/releases/latest/download/ai-context-$(uname -s | tr '[:upper:]' '[:lower:]')-$ARCH -o ai-context\nchmod +x ai-context\nsudo mv ai-context /usr/local/bin/\n```\n\n### Build from Source\n\n```bash\ngit clone https://github.com/tanq16/ai-context.git\ncd ai-context\nmake build\n```\n\n## Usage\n\n### Processing\n\nGenerate context from a single source.\n\n```bash\n# Process a single path (local directory) with additional exclude patterns\nai-context /path/to/directory  -e \"tests,docs,*doc.*\"\n\n# Only include specific file types with max size limit\nai-context /path/to/directory -i \"*.go,*.md\" -s 5242880\n\n# Process one URL (GitHub repo or YouTube Video or Webpage URL)\nai-context https://www.youtube.com/watch?v=video_id\n\n# Process private GitHub repository\nGH_TOKEN=$(cat /secrets/GH.PAT) ai-context https://github.com/ORG/REPO\n```\n\n**Flags:**\n- `--include, -i` - Include files matching globs (e.g., '*.go,*.md')\n- `--exclude, -e` - Exclude files matching globs (e.g., 'tests,docs')\n- `--max-size, -s` - Maximum file size in bytes to include (default 10MB)\n- `--debug` - Enable debug logging\n- `--for-ai` - AI-friendly output (plain text, piped input)\n\n### Batch Processing\n\nGenerate context from multiple sources listed in a file.\n\n```bash\n# Make a list of paths\ncat \u003c\u003c EOF \u003e listfile\n../notif\n/working/cybernest\nhttps://github.com/assetnote/h2csmuggler\nhttps://docs.aws.amazon.com/IAM/latest/UserGuide/id_roles.html\nEOF\n\n# Process URL list concurrently\nai-context -f listfile\n```\n\n**Flags:**\n- `--file, -f` - File with list of URLs to process\n- `--threads, -t` - Number of threads to use for processing (default: 10)\n\n## Tips and Notes\n\n- For directory path (in URL or listfile mode), the path should either start with `/` (absolute) or with `./` or `../` (relative). For current directory, always use `./` for correct regex matching.\n- Do a `head -n 200 context/FILE.md` (or 500 lines) to view the content tree of the processed code base or directory to see what's been included. Then refine your `-e` flag arguments to exclude additional patterns.\n- The `--for-ai` flag produces plain text without ANSI colors, which is easier for AI agents to parse.\n\n## Scenarios\n\n### The \"Learn \u0026 Implement\" Scenario\n`ai-context -f listfile`\n*Where `listfile` contains your local `internal/` directory and a Medium article URL explaining an architectural pattern.*\n**Use Case:** The user wants an LLM to refactor their existing `internal/` packages using a specific pattern described in a Medium article. AI-Context will output markdown of both the codebase and the article content, ready to pipe to your LLM prompt.\n\n### The \"Bug Hunt\" Scenario\n`ai-context https://github.com/org/repo -i \"pkg/math/*.go\"`\n**Use Case:** Pulls down only the specific logic paths from a GitHub repository to save token limits when asking an LLM to find a bug.\n\n## Acknowledgments\n\nThis project takes inspiration from, uses, or references:\n\n- [repomix](https://github.com/yamadashy/repomix): inspiration for turning code into context\n- [innertube](https://github.com/tombulled/innertube): inspiration for code to get transcript from YouTube video\n- [html-to-markdown](https://github.com/JohannesKaufmann/html-to-markdown/v2): used to convert HTML to MD\n- [go-git](https://github.com/go-git/go-git/tree/main): git operations in Go\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftanq16%2Fai-context","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ftanq16%2Fai-context","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftanq16%2Fai-context/lists"}