home.social

#optique — Public Fediverse posts

Live and recent posts from across the Fediverse tagged #optique, aggregated by home.social.

fetched live
  1. The more that I use by @hongminhee, the more impressive the CLI parser is. It's clearly a CLI framework.

    Like I just found you can do man pages! 🤯 I'm now navigating more to see what other secrets this has. 😎

    optique.dev/

  2. 🚢 𝐔𝐧 𝐛𝐚𝐭𝐞𝐚𝐮 𝐪𝐮𝐢 𝐬𝐞𝐦𝐛𝐥𝐞 𝐟𝐥𝐨𝐭𝐭𝐞𝐫 𝐝𝐚𝐧𝐬 𝐥𝐞 𝐜𝐢𝐞𝐥... 𝐞𝐭 𝐩𝐨𝐮𝐫𝐭𝐚𝐧𝐭, 𝐜𝐞𝐭𝐭𝐞 𝐢𝐦𝐚𝐠𝐞 𝐞𝐬𝐭 𝐛𝐢𝐞𝐧 𝐫𝐞́𝐞𝐥𝐥𝐞 .

    Ce phénomène fascinant est provoqué par une illusion d'optique très rare appelée inversion thermique. Dans certaines conditions, la lumière est déviée de manière à donner l'impression que le navire lévite au-dessus de l'océan.

    👉 Découvrez tous les détails dans notre chaîne Telegram (lien en commentaire ou en bio).

    #NXMMedia #Science #Océan #Illusion #Optique #Découverte

  3. Découvrez le club COLOQ (Lasers et #Optique #Quantique) lors du congrès biennal de la SFO, OPTIQUE BFC du 06 au 10 juillet 2026 à Dijon.
    Infos événement : buff.ly/uEhYjrX
    A cette occasion, nous vous invitons à re-découvrir 'Information quantique', ouvrage de référence sur ce sujet fondamentalement pluridisciplinaire impliquant mathématiciens, informaticiens et physiciens, théoriciens et expérimentateurs, ingénieurs et chercheurs.
    Plus d'info : bit.ly/4o9IHM5

  4. Commander.jsの.conflicts().implies()は、排他的な組み合わせをランタイムではちゃんと検出してくれます。

    でも.opts()の型は賢くならず、戻り値は結局string | undefinedのままです。どのオプションが同時に使えないのかを、TypeScriptは知りません。

    このズレをパーサーコンビネータでどう型に落とし込めるか、Yargsとの比較も含めて書きました。後半では、環境変数・設定ファイル・対話プロンプトまで同じ型保証を広げる話もしています。

    https://zenn.dev/hongminhee/articles/6ba2a6247ec0c4

    #Optique #Commander #Yargs #TypeScript #JavaScript #CLI

  5. I wrote about a problem that's been bugging me with #Commander.js and #Yargs: .conflicts() and .implies() enforce constraints at runtime, but the type you get back is still a flat object with every field optional. The compiler has no idea which options belong together.

    The post walks through what happens when you express the same constraints in the parser structure instead, and how #TypeScript turns that into a discriminated union where each branch carries only its own fields.

    Second half covers a less obvious question: what happens when values come from env vars, config files, or prompts instead of argv, and whether the constraints should still hold across all of them.

    https://hackers.pub/@hongminhee/2026/optique-10-discriminated-unions-for-cli

    #JavaScript #CLI #Optique

  6. #Optique 1.0.0 is out! I built it as a #TypeScript #CLI parser in the style of optparse-applicative: compose small typed parsers, TypeScript infers the result. New in 1.0: @optique/env for environment variable fallbacks and @optique/inquirer for Inquirer.js prompts.

    Optique 1.0.0: environment var...

  7. #Optique 1.0.0 is out! If you build #CLI tools with #TypeScript, it might be worth a look.

    I started it because I wanted a TypeScript CLI parser that felt more like optparse-applicative than the usual builder-style APIs. You build up small typed parsers, compose them, and TypeScript infers the result. It handles subcommands, option dependencies, shell completion, and man pages, and it runs on #Deno, #Node.js, and #Bun.

    For 1.0 I added @optique/env, so env vars can fill in missing flags, and @optique/inquirer, so missing values can fall back to Inquirer.js prompts. I also cleaned up a lot of awkward API edges and fixed a long backlog of completion bugs across five shells.

    Packages are on JSR and npm.

    https://github.com/dahlia/optique/discussions/796

  8. Optique just crossed 600 GitHub stars!

    For those unfamiliar: #Optique is a #CLI parsing library for #TypeScript that takes a parser combinator approach, inspired by Haskell's optparse-applicative. The core idea is “parse, don't validate”—you express constraints like mutually exclusive options or dependent flags through types, and TypeScript infers the rest automatically. No runtime validation boilerplate needed.

    It started as something I built out of frustration while working on Fedify, an ActivityPub framework, when no existing CLI library could express the constraints I needed in a type-safe way. Apparently I wasn't the only one who felt that way.

    Thank you all for the support.

    https://github.com/dahlia/optique

  9. Plongez dans la lorgnette des micromondes : explication détaillée du module optique et du choix caméra/objectifs (même montage que l’Armorscope) 🦠🔬 Clair, pédagogique et parfait pour maker·s et curieux·ses qui veulent savoir comment on « scrolle » le plancton. #science #microscopie #plancton #optique #DIY #éducation #PeerTube #French
    peertube.guillaumeleguen.xyz/v

  10. #Optique 1.0.0 preview: runWithConfig() is gone—run() now accepts source contexts. Meta command config gets independent command/option sub-configs. bindConfig() gains config-file metadata for path resolution. #TypeScript #CLI

    dahlia/optique

  11. #Optique 1.0.0 is shaping up, and three API changes are worth knowing about in advance.

    • Runner consolidation: run() from @optique/run now accepts source contexts directly, which makes runWith() and runWithConfig() redundant for most use cases. runWithConfig() is removed outright—no deprecation, since we have a major version to absorb the break. For the typical CLI, run() is now the single entry point.

    • Meta command config redesign: help, version, and completion in RunOptions no longer use mode: "command" | "option" | "both". Each now takes independent command and option sub-configs, which makes it possible to give --help a -h alias, hide a meta command from usage lines while keeping it in the help listing, or group the command and option forms differently. String shorthands (help: "both", version: "1.2.3", etc.) still work exactly as before.

    • Config-file-relative paths: bindConfig()'s key callback now receives config file metadata as a second argument—configDir and configPath—so you can resolve paths relative to the config file's location rather than the working directory. This matches how tools like the TypeScript compiler handle outDir and similar path options.

    More details on the 1.0.0 milestone.

  12. Interesting to see combinator conditions on for CLI.

    This is something that's hard to do in any CLI library. Easier with typed languages, but still can be complex. Very cool to see with and their approach leveraging the type system. 😎

    optique.dev/why

  13. Bonjour, nous recherchons un.e stagiaire de M2 pour développer avec nous un dispositif de mesures de l'oxygène dissous et localiser les microalgues dans le sédiment. Nous cherchons un.e étudiant.e en #océanographie #électronique #optique pour un projet de 6 mois à #brest.
    #StageM2
    Plus d'infos et contacts :
    umr-beep.fr/Dernieres-actus/Pr

  14. #Optique 0.9.0 is here!

    This release brings #async/await support to #CLI parsers. Now you can validate input against external resources—databases, APIs, Git repositories—directly at parse time, with full #TypeScript type safety.

    The new @optique/git package showcases this: validate branch names, tags, and commit SHAs against an actual Git repo, complete with shell completion suggestions.

    Other highlights:

    • Hidden option support for deprecated/internal flags
    • Numeric choices in choice()
    • Security fix for shell completion scripts

    Fully backward compatible—your existing parsers work unchanged.

    https://github.com/dahlia/optique/discussions/75

  15. Here's a #TypeScript API design challenge I'm working on: adding async support to #Optique (CLI argument parser) without breaking the existing sync API.

    The tricky part is combinators—when you compose parsers with object() or or(), the combined parser should automatically become async if any child parser is async, but stay sync if all children are sync. This “mode propagation” needs to work at both type level and runtime.

    I've prototyped two approaches and documented findings. If you've tackled similar dual-mode API designs, I'd love to hear how you approached it.

    https://github.com/dahlia/optique/issues/52

  16. CLIパーサーの新しい記事を書きました。--reporterの値によって--output-fileが必須になったり禁止になったり…そういう関係、型で表現できたら楽じゃないですか? #TypeScript #CLI #Optique

    CLIのオプション分岐、もうif文は書かなくていい

  17. CLIパーサーの新しい記事を書きました。--reporterの値によって--output-fileが必須になったり禁止になったり…そういう関係、型で表現できたら楽じゃないですか?

    https://zenn.dev/hongminhee/articles/201ca6d2e57764

    #TypeScript #CLI #Optique

  18. Interesting design question for #Optique (a type-safe #CLI parser for #TypeScript): how should it handle unrecognized options in wrapper/proxy tools? Proposed three modes but wondering if the complexity is worth it. Thoughts?

    https://github.com/dahlia/optique/issues/35