{"id":20843824,"url":"https://github.com/num30/file-for-ai","last_synced_at":"2026-04-22T15:35:44.985Z","repository":{"id":234293676,"uuid":"788594236","full_name":"num30/file-for-ai","owner":"num30","description":null,"archived":false,"fork":false,"pushed_at":"2025-05-19T10:15:37.000Z","size":68,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2025-12-26T05:04:29.915Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"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/num30.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,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2024-04-18T18:07:18.000Z","updated_at":"2025-05-19T10:15:41.000Z","dependencies_parsed_at":"2025-12-24T16:00:16.669Z","dependency_job_id":null,"html_url":"https://github.com/num30/file-for-ai","commit_stats":null,"previous_names":["num30/file-for-ai"],"tags_count":7,"template":false,"template_full_name":null,"purl":"pkg:github/num30/file-for-ai","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/num30%2Ffile-for-ai","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/num30%2Ffile-for-ai/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/num30%2Ffile-for-ai/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/num30%2Ffile-for-ai/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/num30","download_url":"https://codeload.github.com/num30/file-for-ai/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/num30%2Ffile-for-ai/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":32143657,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-22T15:33:03.595Z","status":"ssl_error","status_checked_at":"2026-04-22T15:30:42.712Z","response_time":58,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"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":[],"created_at":"2024-11-18T02:07:27.087Z","updated_at":"2026-04-22T15:35:44.944Z","avatar_url":"https://github.com/num30.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# File-for-AI \n\nFile-for-AI is an open-source tool designed to compile all text files in a directory into a single file. This is particularly useful for preparing data to be added to AI models or chat GPT.\n\n## Description\n\nThis tool traverses through a specified directory, reads all the text files (while ignoring non-text files and files specified in .gitignore), and compiles them into a single output file. This output file can then be used for various purposes such as training AI models or chat GPT.\n\n## Usage\n\nDownload the latest binary for the os of your coice from the [releases page](https://github.com/num30/file-for-ai/releases) under the `Assets` section.\n\nTo use this tool, you need to provide at least a directory path or a glob pattern as an argument. If an output file name is not provided, it will default to \"file-for-ai.txt.\"\n\n\n``` bash\nfile-for-ai \u003cdirectory|pattern\u003e [--output file]\n```\n\nFor example:\n\n``` bash\nfile-for-ai /path/to/your/directory\n```\n\nThis will create a file named \"file-for-ai.txt\" in your current directory with the contents of all text files in the specified directory.\n\nYou can also use a glob pattern:\n\n``` bash\nfile-for-ai ./**/*.txt\n```\n\nThis will create a file named \"file-for-ai.txt\" in your current directory with the contents of all txt files in the current directory and its subdirectories.\n\nTo specify a custom output file name:\n\n``bash\nfile-for-ai /path/to/your/directory --output custom-output.txt\n````\n\nThis will create a file named \"custom-output.txt\" in your current directory with the contents of all text files in the specified directory.\n\n## Flags\n\nThe tool accepts the following flags:\n\n- `--model`: Specifies the model to use for token counting. It should be one of the available models in [tiktoken-go](https://github.com/pkoukk/tiktoken-go?tab=readme-ov-file#available-encodings). Default is \"gpt-4\".\n- `--output`: Specifies the name of the output file. Default is \"file-for-ai.txt.\"\n- `--ignore-gitignore`: If set to true, the tool will ignore the .gitignore file. Default is false.\n- `--process-non-text`: If set to true, the tool will process non-text files. Default is false.\n\nFor example:\n\n``bash\nfile-for-ai /path/to/your/directory --model gpt-4 --output my-output.txt\n```","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnum30%2Ffile-for-ai","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fnum30%2Ffile-for-ai","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnum30%2Ffile-for-ai/lists"}