{"id":20625360,"url":"https://github.com/insign/together","last_synced_at":"2025-08-03T03:35:24.058Z","repository":{"id":232526367,"uuid":"784557844","full_name":"insign/together","owner":"insign","description":"Simple binary that joins text/code files together","archived":false,"fork":false,"pushed_at":"2025-02-10T10:25:46.000Z","size":43,"stargazers_count":7,"open_issues_count":2,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-04-15T15:05:16.753Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Dart","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/insign.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"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-04-10T04:50:08.000Z","updated_at":"2024-10-24T09:59:47.000Z","dependencies_parsed_at":"2024-04-10T05:48:47.299Z","dependency_job_id":"514550ba-ce76-43e2-8903-4e6ef61336e6","html_url":"https://github.com/insign/together","commit_stats":null,"previous_names":["insign/together"],"tags_count":4,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/insign%2Ftogether","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/insign%2Ftogether/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/insign%2Ftogether/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/insign%2Ftogether/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/insign","download_url":"https://codeload.github.com/insign/together/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":249094931,"owners_count":21211837,"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":[],"created_at":"2024-11-16T13:09:24.107Z","updated_at":"2025-08-03T03:35:24.046Z","avatar_url":"https://github.com/insign.png","language":"Dart","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Together\n\nA simple command-line tool to concatenate text and code files, respecting `.gitignore` rules.\n\n## Why?\nI often need to provide a complete project context to AI models. This tool simplifies the process of bundling all relevant files into a single text file, making it easy to upload or paste.\n\n### Example: Manual Exclusion\nYou can manually specify every file or folder to ignore. This is powerful but can be verbose.\n\n```bash\ntog \\\n    /path/to/project/** \\\n    --output=ai.txt \\\n    --ignore-folders=vendor \\\n    --ignore-folders=test_files \\\n    --ignore-folders=bin \\\n    --ignore-extensions=lock,bash \\\n    --ignore-files=LICENSE.md\n```\n\n### Example: Using a .gitignore file (Recommended)\nFor a much cleaner command, you can add the same rules to a `.gitignore` file and use the `--gitignore` flag.\n\nFirst, your `.gitignore` file would look like this:\n```gitignore\n# .gitignore\nvendor/\ntest_files/\nbin/\n*.lock\n*.bash\nLICENSE.md\n```\n\nThen, the command becomes simple and reusable:\n```bash\ntog /path/to/project/** --output=ai.txt --gitignore\n```\n\n## Personal usage on this project\n\u003e Since I do this a lot of times, I use a [makefile](Makefile) on every project. The command below uses the project's own `.gitignore` to exclude development files.\n\n```bash\n⚡ make\ndart ./main.dart . --output=ai.txt --gitignore\nSkipping file ./.DS_Store due to encoding issues.\nAdding file ./main.dart\nAdding file ./README.md\nAdding file ./pubspec.yaml\nAdding file ./tests.dart\n\nOutput file: ai.txt\n```\n\n# Usage\n\n1. Download the binary for your OS from the [releases page](//github.com/insign/together/releases).\n2. Make it executable: `chmod +x /path/to/downloaded/tog`\n3. (Optional) Move it to a directory in your PATH: `mv /path/to/downloaded/tog /usr/local/bin/`\n4. Run it from your terminal: `tog \u003cpath1\u003e \u003cpath2\u003e ... [options]`\n\n```\n\u003cpath\u003e                 Specifies paths to process. Use glob patterns for more control.\n--output               Specifies the output file name\n                       (defaults to \"output.txt\")\n--ignore-extensions    Specifies file extensions to ignore (comma separated)\n--ignore-folders       Specifies folders to globally ignore (can be used multiple times)\n--ignore-files         Specifies files to globally ignore (can be used multiple times)\n--gitignore            Ignores files and directories based on the .gitignore file\n                       in the current directory.\n```\n\n## Glob Pattern Examples\n\n- `src/*.dart`: Match all Dart files directly inside the `src` directory.\n- `lib/docs/file.txt`: Process a single, specific file.\n- `assets/*`: Match all files and directories directly inside `assets` (e.g., `assets/logo.png`), but not in subdirectories (e.g., not `assets/icons/add.svg`).\n- `assets/**`: Match all files and directories inside `assets` and all of its subdirectories, recursively.\n- `**/*.dart`: Match all files ending with `.dart` in the current directory and all subdirectories.\n- `lib/{src,test}/*.dart`: Match Dart files in either the `src` or `test` subdirectories of `lib`.\n- `**/*.{js,ts}`: Match all JavaScript and TypeScript files in any subdirectory.\n\n## Using Dart\n\n### Run\n`dart run main.dart path/to/any/folder path/to/another/folder/* specific/file.txt`\n\n### Compile\n`make` will compile the binary for your OS to `~/bin/tog`.\n\n```bash\ntog path/to/any/folder path/to/another/folder/* specific/file.txt\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Finsign%2Ftogether","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Finsign%2Ftogether","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Finsign%2Ftogether/lists"}