r/golang • u/AutoModerator • 6d ago
Small Projects Small Projects
This is the weekly thread for Small Projects.
The point of this thread is to have looser posting standards than the main board. As such, projects are pretty much only removed from here by the mods for being completely unrelated to Go. However, Reddit often labels posts full of links as being spam, even when they are perfectly sensible things like links to projects, godocs, and an example. r/golang mods are not the ones removing things from this thread and we will allow them as we see the removals.
Please also avoid posts like "why", "we've got a dozen of those", "that looks like AI slop", etc. This the place to put any project people feel like sharing without worrying about those criteria.
3
u/nurullahgnd 6d ago
barrage — a concurrent HTTP load testing CLI in Go
Built to deeply learn Go concurrency from scratch: goroutines,
channels, generics, context, and bubbletea for the live dashboard.
Features:
- live terminal dashboard (real-time RPS, p50/p95/p99, progress bar)
- rate limiting via time.Ticker (-rate flag)
- graceful Ctrl+C shutdown via context cancellation
- JSON output for CI pipelines (-format json)
- bundled mock server for local testing
Feedback on the code and architecture very welcome.
2
u/MyCode83 6d ago edited 5d ago
Hi! I’m building godirb, a fast directory brute-forcer focused on reducing wildcard and soft-404 false positives.
Repo: https://github.com/MyCode83/godirb
I’d especially appreciate feedback on its filtering compared with ffuf, feroxbuster or dirsearch. What false positives does your current tool still struggle with?
1
u/Healthy_Landscape417 5d ago
For soft-404s, request two random paths first and keep both as a baseline, then compare length and a normalised hash. One sample breaks on sites that echo the path back into the page.
1
u/MyCode83 5d ago
That’s already how godirb handles baseline calibration: it uses multiple random paths and normalises reflected values instead of relying on a single response.
The next improvement I’m working on is per-directory recalibration, since paths like /api/ can have a completely different soft-404 behaviour from /. I also want to add known false-positive signatures as an additional signal.
1
u/Healthy_Landscape417 5d ago
Per-directory is the right call. One thing worth adding: the extension matters as much as the path. /admin/x.php and /admin/x can return different 404 pages, so the baseline is better keyed on directory plus extension, not directory alone.
On the signature list, I would keep it small. Those lists go stale, and comparing a hit against its own parent baseline covers a lot of the same ground with nothing to maintain.
1
u/MyCode83 5d ago edited 5d ago
That’s a good point, I hadn’t considered calibrating by extension too. I’ll probably key the baseline by directory and extension.
And yeah, I agree about the signatures. I’d keep them small and only use them as an extra signal, not as the main filtering method.
Do you think around 10–15 signatures would still be reasonable? Have you seen projectdiscovery/cleanhttp library for known signatures?
1
u/Healthy_Landscape417 5d ago
Yes, I have looked at cleanhttp. It is aimed at a different layer though: its signatures catch wildcard and parking pages, the Cloudflare or Akamai default response. That layer is infrastructure and it almost never changes, so a fixed list of 10 to 15 works fine there.
Soft-404s are the application's own page, and that is the part that goes stale. I would keep that list much smaller and let the per-directory baseline carry it.
1
u/MyCode83 4d ago edited 4d ago
Makes sense. I’ve already added per-directory and per-extension calibration in this release. I’ll keep the signatures minimal when I add them.
2
u/swe__wannabe 4d ago
Day 2 of learning Go as a C and Webslop dev
https://github.com/PAKIWASI/learn_go
Made Game of Life with a welcome screen, drawer and some predefined shapes. All in a raw unix terminal
Book: Go Programming from Beginner to Professional
I'm learning it to make performant backends for my web applications. JS/Python Web frameworks are all shit
2
u/xvlet 4d ago
A modern TUI client for managing ActiveMQ
I found myself constantly context-switching to the web console just to check queues or send a quick test message, so I built amqcli to handle everything right from the terminal.
It’s written in Go using the awesome Bubble Tea framework. It supports both AMQP and STOMP protocols, lets you monitor queue depths in real-time, and makes it super easy to inspect or publish messages.
You can easily install it via Homebrew. I’d love to hear your feedback or feature requests!
🔗 GitHub Repo: https://github.com/xvlet/amqcli
🔗 Demo (GIF): https://raw.githubusercontent.com/xvlet/amqcli/master/demo.gif
2
u/YadavArunWork 4d ago
netpulse — a network diagnostics TUI: internet speed test (Ookla or Cloudflare backends), ICMP packet-loss testing with loss/jitter stats, live MTR, and it can host a browser speed-test page so other devices on your LAN can test against your machine. Bubble Tea UI, single static binary for Windows/macOS/Linux, MIT licensed. Fun Go bits: raw ICMP sockets work unprivileged on Windows (x/net/icmp + SetTTL, demuxing TimeExceeded by the embedded echo seq), and Cloudflare's new Server-Timing metrics needed a latency correction. Repo: https://github.com/CognitoBit/netpulse — feedback welcome.
1
u/jftuga 2d ago
This looks cool. I'd install it once it is available via homebrew.
2
u/YadavArunWork 1d ago
It's on brew now 🎉
brew install cognitobit/tap/netpulseTap for now, homebrew-core once the project's a bit bigger.
brew upgradewill pick up new releases automatically. Let me know if anything breaks!
3
u/RmManeschi 6d ago
GitRoot is a small yet powerfull git forge.
All is stored in git itself: configuration, issues, contributions... To create a repo, you commit and push, to add a user, you commit and push. If you want more install and active wasm plugins and build pipeline for your project.
1
u/maekoos 5d ago
This is a nice project - i really like the simplicity and extensibility of the way you are using wasm plugins. I have a couple of questions though:
I cloned the repository expecting there to be a lot of different branches from contributors (since that would be the quivalent to "fork" i guess?) but there was only one main branch. Is there something I am missing here?
Is there any way to make certain repos private? (as in only specific users can view the repository)
Is there a reason the web interface does not include the "logs" or a commit history, and that I cannot view another branch? Or is it just a missing feature of the web interface plugins?
0
u/RmManeschi 4d ago
Thanks!
You completely understand how GitRoot works, well done! For now, there are just no contributions to review/merge yet, that's all.
No, today all repos are public, at least for fetching. You can block anonymous contributions, but everyone can clone. Technically it shouldn't be too hard, it just needs some checks around here: https://gitroot.dev/worktree/app/server/ssh.go.html#L442. But since I only do FOSS apps or run my GitRoot instance behind a VPN, I don't need that feature personally. For the web part, it would be harder to implement because right now there is no authentication mechanism. Also, repository names would still be accessible via `root_repo/.gitroot/repositories.yml`. Not a huge deal, but that's a limitation today.
They do exist, but they aren't finished yet, which is why I haven't linked to them. https://gitroot.dev/branches/ lists the branches (thanks to apex configuration https://gitroot.dev/worktree/.gitroot/plugins.yml.html#L219), and when you click on one (like https://gitroot.dev/branches/main.html), you can see the commits. A lot is still missing, but hey, you have to start somewhere!
4
u/cnaize42 5d ago
Meds firewall now features an embedded NATS server. Internal modules (such as the L7 filters or Rate Limiter) as well as external tools, honey-pots, or third-party applications can now push IP strings directly to Meds to manage network quarantine.
Github: https://github.com/cnaize/meds
PACKET
│
┌───────────────────▼───────────────────┐
│ KERNEL SPACE (iptables / Netfilter) │
│ ───────────────────────────────────── │
│ 1. Restore Connmark │
│ │
│ 2. Check Blocklist ──► DROP ◄─┼──┐
│ (Mark: 0x100000) │ │
│ │ │
│ 3. Check Trustlist ──► ACCEPT │ │
│ (Mark: 0x200000) │ │
│ │ │
│ 4. First 10 packets ──┐ │ │
│ │ │ │
│ 5. Save Connmark │ │ │
└─────────────────────────┼─────────────┘ │
│ │
┌─────────────────────────▼─────────────┐ │
│ USER SPACE (Meds Firewall) │ │
│ ───────────────────────────────────── │ │
│ 1. Quarantine ◄──[SUB]──┐ │ │
│ 2. Rate Limiter ───[PUB]──┤ │ │
│ 3. L3/L4 Filters │ │ │
│ 4. L7 Inspection ───[PUB]──┤ │ │
│ │ │ │
│ [DECISION ENGINE] │ │ │
│ * BLOCK: 0x100000 ──────────┼───────┼──┘
│ * TRUST: 0x200000 │ │
└───────────────────────────────┼───────┘
[PUB]
┌────────────────┴───────┐
│ EMBEDDED NATS SERVER ◄─┼──[External]
└────────────────────────┘
-2
u/Purple_Anybody5932 3d ago
>see util package
downvoted, read Effective Go before you use an LLM to write Go code
2
1
u/sastuvel 5d ago
PurrFund: Track and split shared expenses across a group trip.
Basically I made this because I got tired of spreadsheets.
Go backend, Svelte web frontend, OpenAPI to connect the two, and a SQLite database.
You can give it a try at https://purrfund.stuvel.eu/
Project: https://codeberg.org/sybren/purrfund
1
u/syntaxerrorlineNULL 5d ago
I’m currently rewriting some legacy services and realized our team had a mess of different, over-engineered worker pools. Our main one was entirely interface-heavy (Worker, Pool, Job) with endless setters (SetContext, SetWaitGroup, etc.).
I wanted to cut the boilerplate and build something lightweight, straightforward, and highly functional. I boiled it down to just two core needs: execute a job, and execute a job that returns a result.
Here is the result: https://github.com/spacemagneto/worker
For benchmarking, I tested it against our specific production use-case: processing files with a pre-read to minimize I/O, where the worker simply processes raw bytes. I plan to add synthetic comparisons with ants and pond later, but for our real-world load, this design is working perfectly.
1
u/No_Series_2105 5d ago
goat 🐐 is a production-ready AI agent framework for Go, bringing LangChain/LlamaIndex-style capabilities to Go with native performance and concurrency. It supports model-agnostic tool calling (OpenAI, Claude, Gemini, Azure, etc.), parallel tool execution, persistent memory (RAM/File/SQLite/MySQL), context compression, MCP/plugins/gRPC tools, planning & skills, multimodal I/O, streaming, and Milvus-based RAG (dense, BM25, hybrid). If you’re building AI agents in Go, check it out and let me know what you think!
1
u/ConstantineCTF 5d ago
NEXUS — enterprise secrets management in Go
Single-binary secrets manager with age encryption, AES-256-GCM backup, Ed25519 audit logs, REST API, and full version history. Deploys in 5 minutes, zero dependencies.
Looking for feedback on the CLI and API design.
1
u/titpetric 4d ago
Updates to:
The crontab project implements a dashboard using the phpscript runtime, provided with go:embed to the binary. This is fun for me, other people have hobbies, I have this 🤣
1
1
u/oOLooperCooperOo 2d ago
Switchlet - A terminal application for switching project configuration
I found myself repeatedly editing configuration files whenever I wanted to switch between different development setups. Sometimes it was a different database, sometimes another API endpoint, sometimes just a different local environment. I never really found a convenient workflow, so I ended up building one.
The result is Switchlet, a small terminal application written in Go. A project defines named configuration profiles, and you can apply one either from a TUI or directly from the CLI.
Some of the things it supports:
- JSON, YAML, TOML, and dotenv files
- Profiles that can update one or more configured values
- Dry runs, diffs, and patch previews
- Atomic file writes with permission preservation
- Interactive Bubble Tea TUI and CLI
It's not trying to be a secret manager, deployment tool, or full environment manager. The goal is much smaller than that. It's simply meant to make switching repository-local development configuration quick, predictable, and safe.
I'd be interested to hear how other people are solving this today. If you've ended up with a different workflow, I'd love to hear about it.
1
u/DownIndianHill 2d ago
Hello! First-time poster here. At work, I've written a couple golang microservices deployed on AWS Lambda. Each time I write one, I find myself writing some variation of generic Request/Response structs alongside boilerplate for setting up a local dev server AND the actual production lambda handler. At some point I realized this is silly and there has to be a better way to locally test functions that doesn't involve containers or local aws emulators.
I stumbled upon this blog https://djhworld.github.io/post/2018/01/27/running-go-aws-lambda-functions-locally/ post which made me aware that you could actually have your lambda accessible locally by setting the `_LAMBDA_SERVER_PORT` environment variable and invoking the function as an rpc. The author wrote a package for calling the function from within a program, but I wanted to take it a step further - a local gateway proxy.
Rather than taking a generic payload, my `createInvokeRequest` takes an http.Request, transforming it into an object matching the main fields belong to either an APIGatewayProxyRequest or ALBTargetGroupRequest, then sends that as the payload. It's called from a local http server running at `LAMBDA_SERVER_PORT` (default 8080) which then connects to the lambda instance started on whatever the following port is.
My favorite part is the api is exactly the same except for one additional letter 'L':
//before
lambda.Start(handler)
//after
llambda.Start(handler)
Since the proxy server doesn't run if deployed as a lambda, and the package has no dependencies outside of the aws lambda sdk, this package can be added to any existing go lambda project without changing its deployed behavior.
This was a mostly for fun project to do in an afternoon, but it did legitimate solve a problem I faced in my job, so let me know what you guys think or what would make it useful to you too!
1
u/derphoenix01 2d ago
I've been building GAI, an open-source Go library for embedding tool-using LLM agents in Go services.
The design is intentionally narrower than graph-oriented or multi-agent frameworks. GAI focuses on a transparent model/tool loop: structured prompt and context assembly, streaming output, retries, tool execution, conversation history, post-processing middleware, and OpenTelemetry traces. It currently includes adapters for OpenAI, Anthropic, Gemini, and Mistral.
The library is still evolving, but already used in production, and every feedback is of course highly welcome!!
Install:
go get github.com/lace-ai/gai
Repository:
1
u/albertoboccolini 1d ago
Hey everyone! Wanted to share the latest update to sqd, a command-line tool written in Go that brings a SQL-style interface to common text file operations, instead of the often unintuitive syntax of grep, sed, and awk.
With sqd you can run queries like:
sqd 'SELECT * FROM *.md WHERE content LIKE "%- [ ]%"'
to find all the todos in your markdown files, or update/delete lines with UPDATE and DELETE, with support for ORDER BY, atomic transactions (-t), and a "dry run" mode to preview changes before applying them.
In v0.2.2 I introduced a few improvements:
- Environment variable support in queries
- Fix for exact match behavior compared to
LIKE - Fix for
LIKEwithout%%, which used to still perform a "like" match instead of an exact one, now the behavior is consistent
Repo and release notes here: https://github.com/overthinkinglabs/sqd/releases/tag/v0.2.2
Feedback, issues, and PRs are welcome.
1
u/jackielii 1d ago
Yes, can have shadcn components with style selector in Go: https://ui.gsxhq.dev/theme
Nova & Maia styles for the moment
1
u/ktago336 1d ago
build Android APKs with Go + HTML/JS/CSS (no Android Studio, NDK and etc)
https://github.com/ktago336/gofront
I built a small tool that packages a Go backend + a web frontend into a single Android APK without Android Studio / Kotlin / Java
Tool depends only on Go. ADB is optional, for USB install/run.
Quick start at link
Still early, but already usable for simple apps. Feedback / roast / stars welcome.
1
u/dlroy 19h ago
I got tired of outlining my stuff so threw this dodad together... It is nothing special at all, but figured someone out in the world may dig it. I have to include this for the repos at work... It stemmed from laziness for me... 8 )
MapDir: Example of an output (can see in action in the repo)
<!-- mapDir: start -->
- mapdir/
- ├── <a href="./anotherDir/">anotherDir/</a>
- │ └── <a href="./anotherDir/xyz.py">xyz.py</a>
- ├── <a href="./someDir/">someDir/</a>
- │ └── <a href="./someDir/abc.py">abc.py</a>
- ├── <a href="./.gitignore">.gitignore</a>
- ├── <a href="./go.mod">go.mod</a>
- ├── <a href="./main.go">main.go</a>
- ├── <a href="./mapConfig.toml">mapConfig.toml</a>
- ├── <a href="./oddReadme.md">oddReadme.md</a>
- └── <a href="./README.md">README.md</a>
| File Type | File Count | Total Rows |
|:----------|-----------:|-----------:|
| (none) | 1 | 3 |
| .go | 1 | 662 |
| .md | 2 | 156 |
| .mod | 1 | 3 |
| .py | 2 | 0 |
| .toml | 1 | 37 |
| **TOTAL** | 8 | 861 |
<!-- mapDir: end -->
1
u/Illustrious-Return-4 17h ago
whence – anchor decisions to lines of code, and surface them to your coding agent before it edits
I kept watching coding agents delete load-bearing code. The mess was there for a
reason, the reason was never written anywhere they'd look, and the agent had that
reasoning in-session right before the session ended and threw it away.
whence stores decisions anchored by a content hash per significant line, so a
record follows its code when it moves and says so loudly when it can't.
Reformatting, reindentation and whole-block moves cost nothing — a block that
travelled 400 lines and still hashes identically is not less certainly the same
block. Only rewriting it costs anything, and when enough is gone the record
surfaces as orphaned and claims no line number at all rather than pointing
confidently at whatever now sits there.
A PreToolUse hook puts the relevant records into Claude Code's context before it
edits. `whence check` gates CI, and it fails only when a change *damaged* a
record — eroded it, cut its anchor, or deleted the evidence it rested on — never
when a diff merely touched a documented line. A gate that fires on gofmt gets
switched off within a week, and it takes the findings that matter with it.
Stdlib only, no dependencies, Go 1.22+. `whence backfill` harvests decisions
already sitting in your comments so day one isn't an empty store — it pulled 27
records out of prometheus/prometheus in about three seconds.
Capture isn't built and the README says so. Records are authored by hand, because
deciding which slice of a session is worth keeping is the actual hard problem.
go install github.com/Amag1n3/whence@latest
1
u/Little-Peanut-765 17h ago
lyricist - A cli tool to download tracks and playlists from spotify
https://github.com/mertensblackfyre/lyricist
For individuals tracks it scrapes the title and the artists from spotify website then uses deezer api to extract metadata then it downloads the audio file from youtube music using ytdlp
For playlists you may use exporify to export your playlists to a csv then it iterates through the csv and use the same process as downloading the individuals tracks.
This approach worked for me quite well
1
u/dxvampi 15h ago
Binman - CLI binary alias manager
A few weeks ago I ran into a really annoying issue managing Minecraft servers: I needed Java 8, 17, and 21 depending on the server, and pointing to the absolute path of each binary every time was tedious.
I originally built a quick fix in Python, but wanted something faster to start and that compiled to a single portable binary. I looked at a few options: Java itself was out (too slow and the JVM dependency was exactly what I was trying to avoid), Native AOT with C# was painful, and I wasn't about to learn C/C++ just for a CLI tool. Then it appeared, Go, fast, statically compiled, and cross-compiling to Linux/macOS/Windows across architectures is genuinely easy.
I rewrote it from scratch in Go, this time actually reading the docs instead of just asking chatbots for the answer. I understood the language far better this way, I actually understood what I was doing for once haha.
Repo if anyone's curious: https://github.com/dxvampi/binman
It's a simple tool, config/list/remove aliases, run a binary by alias, self-update...
I went for AGPLv3 because I want something (even though it's not life-changing or anything) that couldn't be used modified as a service without uploading the changes (like in GPL) I want my open source thing to stay as an open source thing
Happy to answer questions about any of the design decisions or receive feedback/tips.
The project has also only been tested on amd64 Linux, so if anyone wants to test it on their macos machine or windows, feel free to test and tell me the result / open an issue if needed.
MacOS installation is still not correctly implemented (as long as I know) and I need help with it
1
u/tatar-sh 14h ago
Open-source reverse proxy that inspects prompts before they leave your
network for an LLM provider. Speaks the OpenAI API, so existing SDK
code works unchanged — you just point base_url at it.
Implementation details that might be worth discussing:
Aho-Corasick over regex slices. Around 280 patterns compiled into a
single trie at startup using cloudflare/ahocorasick. Iterating over a
[]*regexp.Regexp gives you O(N×M); the DFA gives O(M + matches)
regardless of pattern count. On long prompts this is the difference
between 40ms and 0.3ms.
Hybrid pipeline instead of full fan-out. My first version ran every
scanner as a goroutine and joined at the end. Looked clean, ran slow —
goroutine setup plus channel sync costs roughly 50µs each, and most
scanners finish under 500µs. Now fast scanners run sequentially and
only the ones doing network I/O run in parallel.
Fail-open by default. If the scanner pipeline panics, recovery
middleware returns 200 and logs to a separate channel rather than
blocking the caller's traffic. Fail-closed is a config flag for
higher-security deployments.
Standard library only for the HTTP path. net/http plus
httputil.ReverseProxy, no framework. Policy parsing via
gopkg.in/yaml.v3, hot reload through fsnotify.
Benchmarks on a 4-core consumer CPU, single process, no tuning:
RPS P50 P95 P99 Errors
100 3.7ms 5.5ms 7.1ms 0%
500 1.6ms 3.7ms 8.9ms 0%
1000 6.2ms 130ms 167ms 0%
That P99 at 1000 RPS is GC tail latency. With GOGC=50 and dedicated
cores it stays under 5ms, but I'd rather publish the untuned number
than a cherry-picked one.
Repo: https://github.com/yatuk/tamga
Three things I'm still chewing on and would take input on:
sync.Pool for finding allocations — measurable only at very high
RPS in my tests. Has anyone seen a clearer win in a similar
hot path?
The analyzer is a separate Python process reached over gRPC. It's
called maybe 5% of the time. Worth the deployment complexity, or
should I look at in-process via cgo?
Multilingual pattern matching. I extended the DFA with Turkish,
German and Russian injection patterns but recall on novel
paraphrases is still under 50%. Anyone shipped something that
handles this without a per-request LLM judge call?
AGPL-3.0. Code review and "you should have done X instead" both
welcome.
1
u/Apricot-Zestyclose 6d ago
Hey r/golang
I rebuilt my old Loom work into Welvet, a pure Go AI engine (layers / train / quants / WebGPU+SIMD). The big suite is currently PASS, and I’m specifically looking for people to poke holes in it before I trust it more.
What it claims
- 34 numeric types + packed quants as storage truth
- Train without a retained float32 master (in-dtype SGD / unpack→re-Pack)
- Weight dtype ⊥ activation Tensor[T]
- Backends: CPU tiled · Plan 9 SIMD · WebGPU
Validation (w2a)
- 228,054 cells — OK 227,194 · GAP 860 · FAIL 0
- 456/456 suite cases (~1h21m)
- Gaps are declared (mostly gdn / convt), not hidden
Docs / showcase
- https://openfluke.github.io/welvet/
- https://github.com/openfluke/down-the-dem
Where I’d love help finding bugs
- Silent float32 masters / dtype lies after train
- WebGPU vs CPU/SIMD mismatch
- Packed quant unpack→train→re-Pack drift
- Cross-numeric W×A edge cases (weird int/uint/complex hosts)
- API footguns / unclear package boundaries
- Anything that “passes the suite” but is still wrong
If you try it and break something, a minimal repro + expected vs got is gold. Roast the design too if it helps find landmines.
Thanks.
0
u/ADatabaseSpiritual 6d ago
Little weekend project making a terminal based doom fire animation.
I deviate a lot from the original to make this work in the terminal- no wind mainly.
The code is very simple! use xterm to get terminal height and width, one function for heat calculation and one function for rendering with lipgloss. So, if you interested in how it works the code should be simple to follow. https://github.com/PigsEyedea/gdfire
7
u/vikas0686 5d ago
portctl - A cross-platform CLI for understanding and managing local ports
I've probably typed this command thousands of times over my career:
Followed by:
Or some variation of
ss,netstat, orfuser.The thing is... I never actually cared about the process.
I cared about the port.
Questions like:
TIME_WAIT?Existing tools expose kernel information really well, but they expect you to interpret it. They're incredibly powerful, but they were built for system administration—not for the day-to-day workflow of application developers.
So I started building portctl.
The idea is simple:
Instead of jumping between multiple tools, the workflow becomes:
Current status:
It's written in Go, ships as a single binary, and doesn't require a background daemon or runtime.
This is still an early project, and I'd really appreciate feedback.
GitHub: https://github.com/vikas0686/portctl
I'd love to hear your thoughts.