{"id":27882182,"url":"https://github.com/deanthecoder/codeingest","last_synced_at":"2025-05-05T05:08:36.715Z","repository":{"id":290331758,"uuid":"967454759","full_name":"deanthecoder/CodeIngest","owner":"deanthecoder","description":"CLI tool that strips and merges C# files for GPT-friendly source analysis.","archived":false,"fork":false,"pushed_at":"2025-05-03T18:27:03.000Z","size":774,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-05-05T05:08:33.146Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"C#","has_issues":false,"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/deanthecoder.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}},"created_at":"2025-04-16T13:32:52.000Z","updated_at":"2025-05-03T18:27:06.000Z","dependencies_parsed_at":"2025-04-28T09:49:49.072Z","dependency_job_id":null,"html_url":"https://github.com/deanthecoder/CodeIngest","commit_stats":null,"previous_names":["deanthecoder/codeingest"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/deanthecoder%2FCodeIngest","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/deanthecoder%2FCodeIngest/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/deanthecoder%2FCodeIngest/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/deanthecoder%2FCodeIngest/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/deanthecoder","download_url":"https://codeload.github.com/deanthecoder/CodeIngest/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":252442454,"owners_count":21748451,"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":"2025-05-05T05:08:36.247Z","updated_at":"2025-05-05T05:08:36.706Z","avatar_url":"https://github.com/deanthecoder.png","language":"C#","funding_links":[],"categories":[],"sub_categories":[],"readme":"[![Twitter URL](https://img.shields.io/twitter/url/https/twitter.com/deanthecoder.svg?style=social\u0026label=Follow%20%40deanthecoder)](https://twitter.com/deanthecoder)\n# Code Ingest\n**Code Ingest** creates a single flattened source file from your codebase, optimized for ChatGPT and other AI models to review.\n\nIt scans entire folders of source code, strips out distractions like comments, import statements, and namespace wrappers, and outputs a streamlined and readable version suitable for large-scale analysis or AI understanding.\n![CodeIngest Screenshot](img/app.png)\n\n## Features\n- Cross-platform (.NET)\n- Command-line and UI variants.\n- Strips comments, `using` directives, and `namespace` blocks\n- Outputs a single readable output file with the following features:\n  - File headers\n  - Line numbers\n  - Cleaned source code\n- Skips generated and irrelevant files (e.g. `.designer.cs`, `bin`, `obj`, `.resx`, etc.)\n\n## Command Line Usage\n```\nCodeIngest \u003cdirectory\u003e [\u003cdirectory\u003e ...] [*.ext1;*.ext2] \u003coutput.code\u003e\n```\n\n### Examples\n```\nCodeIngest MyProject Out.cs\nCodeIngest Src1 Src2 *.cs;*.txt Dump.txt\nCodeIngest *.cs;*.cpp SourceDump.code\n```\n\n## Example Output\n```csharp\n// CodeIngest Source Dump-A CLI tool that merges and processes code files for GPT reviews.\n// Notes: Some code content may have been removed.\n// File: GameState.cs\n20|public class GameState:IAiGameState\n21|{\n22|private readonly Vector2[]m_bats;\n23|private readonly Vector2 m_ballPosition;\n24|private readonly Vector2 m_ballVelocity;\n25|private readonly int m_arenaWidth;\n26|private readonly int m_arenaHeight;\n28|public GameState(Vector2[]bats,Vector2 ballPosition,Vector2 ballVelocity,int arenaWidth,int arenaHeight)\n29|{\n30|m_bats=bats;\n31|m_ballPosition=ballPosition;\n32|m_ballVelocity=ballVelocity;\n33|m_arenaWidth=arenaWidth;\n34|m_arenaHeight=arenaHeight;\n35|}\n37|public double[]ToInputVector()\n38|{\n39|var inputVector=new double[Brain.BrainInputCount];\n42|inputVector[0]=m_bats[0].Y/m_arenaHeight*2.0f-1.0f;\n43|inputVector[1]=m_bats[1].Y/m_arenaHeight*2.0f-1.0f;\n45|inputVector[2]=(m_bats[0].Y-m_ballPosition.Y)/m_arenaHeight*2.0f;\n46|inputVector[3]=(m_bats[1].Y-m_ballPosition.Y)/m_arenaHeight*2.0f;\n49|inputVector[4]=m_ballPosition.X/m_arenaWidth*2.0f-1.0f;\n50|inputVector[5]=m_ballPosition.Y/m_arenaHeight*2.0f-1.0f;\n51|inputVector[6]=m_ballVelocity.X.Clamp(-1.0f,1.0f);\n52|inputVector[7]=m_ballVelocity.Y.Clamp(-1.0f,1.0f);\n54|return inputVector;\n55|}\n56|}\n// File: Brain.cs\n18|public class Brain:AiBrainBase\n19|{\n20|public const int BrainInputCount=8;\n22|public Brain():base(BrainInputCount,[16],4)\n23|{\n24|}\n26|private Brain(Brain brain):base(brain)\n27|{\n28|}\n29|public (Direction LeftBat,Direction RightBat) ChooseMoves(IAiGameState state)\n30|{\n31|var outputs=GetOutputs(state);\n33|var leftBatDirection=Direction.Left;\n34|var diff=outputs[0]-outputs[1];\n35|if (Math.Abs(diff)\u003e0.2)\n36|leftBatDirection=diff\u003e0?Direction.Up:Direction.Down;\n38|var rightBatDirection=Direction.Left;\n39|diff=outputs[2]-outputs[3];\n40|if (Math.Abs(diff)\u003e0.2)\n41|rightBatDirection=diff\u003e0?Direction.Up:Direction.Down;\n43|return (leftBatDirection,rightBatDirection);\n44|}\n46|public override AiBrainBase Clone()=\u003enew Brain(this);\n47|}\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdeanthecoder%2Fcodeingest","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdeanthecoder%2Fcodeingest","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdeanthecoder%2Fcodeingest/lists"}