frontpage.
newsnewestaskshowjobs

Made with ♥ by @iamnishanth

Open Source @Github

Open in hackernews

Show HN: Flaget – small 5kB CLI argument parser for Node.js

3•biodiscus•8h ago
A lightweight (5 kB) alternative to yargs-parser (85 kB). Supports all standard flag formats. https://github.com/webdiscus/flaget

Comments

FerkiHN•8h ago
Bro, cool program, I wish you good luck in further development, I gave you a star on GitHub, I hope there will be more of them, and by the way, here are the improvements I found:

1. Strict typing & validation — support ranges, regex, custom types (dates, emails).

2. Better error messages — clear feedback on invalid args.

3. Auto-generated help — built-in --help with descriptions and examples.

4. Advanced aliases — support multiple aliases and priority handling.

5. Nested options — parse flags like --db.host into objects.

6. Async validators & transformers — for things like file existence checks.

7. Config file support — load defaults from JSON/YAML files.

8. Named positional args — support and validate ordered params.

9. Localization (i18n) — multi-language error/help messages.

10. Performance optimization — handle large numbers of args fast.

11. Test integration — utilities for easy CLI testing with frameworks.

biodiscus•5h ago
Thanks for the * and your cool suggestions!

There are already big "do-it-all" CLI libraries like "yargs-parser" (85 kB), "meow" (419 kB), "minimist" (55kB), etc.

Flaget is intentionally minimal — small size is the killer feature. I want to keep it as compact as possible without bloating it with rarely needed functionality.

The e18e community focuses on optimising npm packages by replacing heavy dependencies with smaller alternatives.

Still, some of your ideas are very useful, and I may add:

- Named positional

- Nested options

But others are outside the scope of a small library like this.

Basically Everyone Should Be Avoiding Docker

https://lukesmith.xyz/articles/everyone-should-be-avoiding-docker/
1•Fred34•7m ago•0 comments

China State Council begins investigating and regulating '内卷'

http://www.qstheory.cn/20250629/6d682af56d64487f817084e890fbcdfd/c.html
2•dluan•12m ago•1 comments

Show HN: News Alert ,Real-time global news monitoring with keyword alerts

https://newsalert.im/
1•zxcholmes•14m ago•0 comments

I live in TX and TX needs to do better. Global warming cannot be denied

https://www.cnn.com/2025/07/05/climate/texas-flooding-forecast-response
4•kiriberty•20m ago•1 comments

The AI Assistant That Turns Thoughts into Actions

https://www.manusai.io
2•cnych•28m ago•0 comments

Volvo delivers 5,000th electric semi with little fanfare

https://electrek.co/2025/06/29/volvo-delivers-5000th-electric-semi-with-little-fanfare-sending-a-big-message/
3•JumpCrisscross•33m ago•1 comments

Large language models show amplified cognitive biases in moral decision-making

https://www.pnas.org/doi/10.1073/pnas.2412015122
1•miles•43m ago•0 comments

Sweden Abolishes Air Travel Tax to Boost Aviation Industry

https://www.ainvest.com/news/sweden-abolishes-air-travel-tax-boost-aviation-industry-2507/
3•passwordoops•47m ago•0 comments

Show HN: MangaCraft – SaaS that audits Webtoon series using AI (SEO)

https://manga-craft-boost.lovable.app/
1•Ibrasama•47m ago•0 comments

Volunteer finds Holy Grail of abolitionist-era Baptist documents

https://www.bostonherald.com/2025/07/03/baptist-anti-slavery-scroll/
5•ohjeez•50m ago•0 comments

Russian use of chemical weapons against Ukraine

https://www.reuters.com/world/europe/russian-use-chemical-weapons-against-ukraine-widespread-dutch-defence-minister-2025-07-04/
10•kaycebasques•51m ago•3 comments

It's Illegal to Live in an RV on Your Property in These US States

https://www.jalopnik.com/1899469/rv-living-on-property-illegal-states/
9•rntn•55m ago•3 comments

John Carmack Reveals AGI Future: Robots, Videogames, and AI Agents

https://www.youtube.com/watch?v=4epAfU1FCuQ
1•phodo•56m ago•0 comments

Hara Hachi Bun Me

https://en.wikipedia.org/wiki/Hara_hachi_bun_me
2•thunderbong•56m ago•0 comments

Show HN: I Built a Minimal AI Chat app with Local Storage and Advanced Research

https://vtchat.io.vn/
2•vinhnx•57m ago•1 comments

Busting the top myths about the Big Bang

https://bigthink.com/starts-with-a-bang/busting-5-myths-big-bang/
3•VignuB•1h ago•0 comments

Leveraging tokenisation for payments and financial transactions [pdf]

https://www.bis.org/publ/othp92.pdf
1•kelseyfrog•1h ago•0 comments

A Canadian's AI hoax duped the media and propelled a 'band' to success

https://www.cbc.ca/news/entertainment/ai-band-hoax-velvet-sundown-1.7575874
5•empressplay•1h ago•6 comments

Tesla opens 168 stall Supercharger station, with solar farm and big batteries

https://thedriven.io/2025/07/05/tesla-opens-168-stall-supercharger-station-with-solar-farm-and-big-batteries/
2•decimalenough•1h ago•0 comments

Ask HN: Anyone interested in improving scheduling?

1•mradek•1h ago•0 comments

A long-lost Chinese typewriter changed modern computing

https://www.npr.org/2025/07/05/nx-s1-5405452/chinese-typewriter-mingkwai-stanford
1•colinprince•1h ago•0 comments

Claudia – Desktop Companion for Claude Code

https://github.com/getAsterisk/claudia
2•thushanfernando•1h ago•0 comments

Ask HN: Martinfowler.com seems to be down – does he know?

2•mcapodici•1h ago•1 comments

Publicis Groupe Acquires Captiv8: A New Era for Influencer Marketing

https://thefinancefrontier.substack.com/p/publicis-groupe-acquires-captiv8
1•Shivam_Verma_•1h ago•1 comments

Outdated regulations are hindering smartphone battery development in Europe, US

https://www.notebookcheck.net/How-outdated-regulations-are-hindering-smartphone-battery-development-in-Europe-and-the-US.1051947.0.html
2•thunderbong•1h ago•0 comments

Police in Brazil arrest a suspect over $100M banking hack

https://apnews.com/article/brazil-hack-cyberattack-bank-5e39633b2ce3a662b90978dcf4647510
2•davikr•1h ago•0 comments

A Emoji Reverse Polish Notation Calculator Written in COBOL

https://github.com/ghuntley/cobol-emoji-rpn-calculator
2•ghuntley•2h ago•0 comments

I Shipped a macOS App Built by Claude Code

https://www.indragie.com/blog/i-shipped-a-macos-app-built-entirely-by-claude-code
1•phirschybar•2h ago•0 comments

AI Birthday Letter Blew Me Away: Google is ushering in era of custom chatbots

https://www.theatlantic.com/technology/archive/2025/07/google-drive-personalized-chatbot/683436/
2•labrador•2h ago•1 comments

Ask HN: Advice for Starting a Hacker Space?

9•pkdpic•2h ago•4 comments