Ingest.sh – a Portable Shell Script for Codebase Summarization
Posted3 months agoActive3 months ago
github.comTechstory
supportivepositive
Debate
10/100
Code SummarizationShell ScriptingDeveloper Tools
Key topics
Code Summarization
Shell Scripting
Developer Tools
Ingest.sh is a portable shell script for codebase summarization, garnering interest and positive feedback from the HN community for its utility and simplicity.
Snapshot generated from the HN discussion
Discussion Activity
Light discussionFirst comment
N/A
Peak period
2
0-2h
Avg / period
1.5
Key moments
- 01Story posted
Oct 14, 2025 at 10:08 AM EDT
3 months ago
Step 01 - 02First comment
Oct 14, 2025 at 10:08 AM EDT
0s after posting
Step 02 - 03Peak activity
2 comments in 0-2h
Hottest window of the conversation
Step 03 - 04Latest activity
Oct 15, 2025 at 6:14 AM EDT
3 months ago
Step 04
Generating AI Summary...
Analyzing up to 500 comments to identify key contributors and discussion patterns
ID: 45580207Type: storyLast synced: 11/17/2025, 10:06:26 AM
Want the full context?
Jump to the original sources
Read the primary article or dive into the live Hacker News thread when you're ready.
I know that "portable" often means that it has no dependencies and it's self-contained, like in portableapps.com.
However, in shell scripting, the word "portable" is often used to describe a script that is not tied to a specific interpreter (it's not a bash script, or a zsh script, it just runs in any bourne shell).
I often recommend people to do both (can run on any shell and it is self-contained requiring no external dependencies), portable in any way.
---
You could, in theory, distribute this as a single file that runs on both bash and powershell, by making a polyglot, such as this one:
https://gist.github.com/alganet/2c1c004d0580e8d92cc1c167fa4f...
It would be called `ingest.cmd`. If you make the names of the functions the same across both, maybe you can even de-duplicate some parts of it into the part of the polyglot that addresses both interpreters (as long as that common part only deals in calling commands passing parameters).
---
> show_help() {
> echo "Usage: $0 [options] [source directory]"
> echo ""
May I introduce you to shell HEREDOCs? They're a great way to embed text, such as help snippets, directly into code without the need to resort to multiple echo calls.
https://linuxize.com/post/bash-heredoc/
I worked on this tool in an afternoon (with GLM 4.6) to solve a problem I'm facing: in some workspaces, AI coding assistants aren't allowed, forcing you to use web-based chatbots or local LLMs . To get meaningful help, you need to provide context about your codebase, but manually copying files is tedious.
While there are great tools like Gitingest and Repomix, they require installing packages which isn't straightforward in air-gapped work environments! I wanted something more portable - just a shell script that works anywhere you have a terminal.
GitHub: https://github.com/hamzakat/ingest.sh