洪 民憙 (Hong Minhee) :nonbinary:'s avatar

洪 民憙 (Hong Minhee) :nonbinary:

@hongminhee@hollo.social

1,075 following1,883 followers

An intersectionalist, feminist, and socialist living in Seoul (UTC+09:00). @tokolovesme's spouse. Who's behind @fedify, @hollo, and @botkit. Write some free software in , , , & . They/them.

서울에 사는 交叉女性主義者이자 社會主義者. 金剛兔(@tokolovesme)의 配偶者. @fedify, @hollo, @botkit 메인테이너. , , , 等으로 自由 소프트웨어 만듦.

()

Pinned

@hongminhee@hollo.social

Hello! I'm Hong Minhee (洪 民憙), an open source software engineer in my late 30s, living in Seoul, Korea. I'm bisexual and non-binary (they/them), and an enthusiastic advocate of free/open source software and the fediverse.

I work full-time on @fedify, an ActivityPub server framework in TypeScript, funded by @sovtechfund. I'm also the creator of @hollo, a single-user ActivityPub microblog; @botkit, an ActivityPub bot framework; Hackers' Pub, a fediverse platform for software developers; and LogTape, a logging library for JavaScript and TypeScript.

I have a long interest in East Asian languages (CJK) and Unicode. I post mostly in English here, though occasionally in Japanese or in mixed-script Korean (國漢文混用體), a traditional writing style that interleaves Chinese characters with the native Korean alphabet. Wanting to write in that style was actually one of the reasons I joined the fediverse. Feel free to talk to me in English, Korean, Japanese, or even Literary Chinese!

en.wikipedia.org

Korean mixed script - Wikipedia

Pinned

はじめまして!ソウル在住の30代後半のオープンソースソフトウェアエンジニア、洪 民憙ホン・ミンヒと申します。バイセクシュアル(bisexual)・ノンバイナリー(non-binary)で、自由・オープンソースソフトウェア(F/OSS)とフェディバース(fediverse)の熱烈な支持者です。

STF(@sovtechfund)の支援を受け、TypeScript用ActivityPubサーバーフレームワーク「@fedify」の開発に専念しています。他にも、おひとり様向けのActivityPubマイクロブログ「@hollo」、ActivityPubボットフレームワーク「@botkit」、ソフトウェア開発者向けフェディバースプラットフォームHackers' Pub、JavaScript・TypeScript用ロギングライブラリLogTapeなどの制作者でもあります。

東アジア言語(いわゆるCJK)とUnicodeにも興味があります。このアカウントでは主に英語で投稿していますが、時々日本語や国漢文混用体(漢字ハングル混じり文)の韓国語でも書いています。実はこの文体で書きたくてフェディバースを始めた、という経緯もあります。日本語、英語、韓国語、漢文でも気軽に話しかけてください!

speakerdeck.com

国漢文混用体からHolloまで

本発表では、韓国語の「国漢文混用体」(漢字ハングル混じり文)を自分のフェディバース投稿に実装したいという小さな目標から始まった旅路を共有します。 この目標を達成するために、ActivityPubのJSON-LDの複雑さやHTTP Signatures、WebFingerなどの仕様を理解する必要性に…

Pinned

安寧(안녕)하세요! 저는 서울에 살고 있는 30() 後半(후반)의 오픈 소스 소프트웨어 엔지니어 洪民憙(홍민희)입니다. 兩性愛者(양성애자)(bisexual)이자 논바이너리(non-binary)이며, 自由(자유)·오픈 소스 소프트웨어(F/OSS)와 聯合宇宙(연합우주)(fediverse)의 熱烈(열렬)支持者(지지자)이기도 합니다.

STF(@sovtechfund)의 支援(지원)을 받아 TypeScript() ActivityPub 서버 프레임워크 @fedify 開發(개발)專業(전업)으로 ()하고 있습니다. 그 ()에도 싱글 유저() ActivityPub 마이크로블로그 @hollo, ActivityPub 봇 프레임워크 @botkit, 소프트웨어 開發者(개발자)를 위한 聯合宇宙(연합우주) 플랫폼 Hackers' Pub, JavaScript·TypeScript() 로깅 라이브러리 LogTape ()製作者(제작자)이기도 합니다.

()아시아 言語(언어)(이른바 CJK)와 Unicode에도 關心(관심)이 많습니다. 이 計定(계정)에서는 ()英語(영어)로 포스팅하지만, 때때로 日本語(일본어)國漢文混用體(국한문 혼용체) 韓國語(한국어)로도 씁니다. 聯合宇宙(연합우주)에 오게 된 動機(동기) () 하나가 바로 國漢文混用體(국한문 혼용체)로 글을 쓰고 싶었기 때문이기도 하고요. 韓國語(한국어), 英語(영어), 日本語(일본어), 아니면 漢文(한문)으로도 말을 걸어주세요!

logtape.org

LogTape

Unobtrusive logging library with zero dependencies—library-first design for Deno, Node.js, Bun, browsers, and edge functions

@kodingwarrior@hackers.pub

Hackers Public @ Seoul 송년회 ---- 2025년의 마지막을 해커들과 함께해요.

Hackers' Public @ Seoul 송년 네트워킹 밋업은 발표보다 대화, 형식보다 연결을 중심으로 진행됩니다. 라이트닝 토크도 지원받습니다. 만들었던 것·배운 것·고민했던 이야기를 자유롭게 얘기해보도록 해요.

많은 관심 부탁드립니다~

event-us.kr

Hackers' Public @ Seoul 송년회 - 이벤터스

내가 원하는 행사를 개최하거나, 참여할 수 있는 플랫폼 - 이벤터스

@mariusor@metalhead.club

After mostly wasting the past couple of days on adding a rudimentary client side search function to the new static documentation website of I'm back in the land of increasing code coverage.

Like I said before, I've never really had to dedicate explicit time to this activity specifically and I'm annoyed at how time consuming and tedious it gets when you want to increase the numbers from ~70% to ~80%.

Those last few percentages are hard to come by.

-testing

@2chanhaeng@hackers.pub

GitHub Action Rerunner

실패한 GitHub Actions를 팀원들이 직접 재실행할 수 있도록 권한을 위임하는 웹 애플리케이션입니다.

🎯 왜 만들었나요?

GitHub Actions가 실패했을 때, 재실행하려면 해당 레포지토리에 대한 Write 권한이 필요합니다. 하지만 보안상의 이유로 모든 팀원에게 Write 권한을 주기는 어렵습니다.

GitHub Action Rerunner는 이 문제를 해결합니다. 레포지토리 소유자가 토큰을 등록하면, 팀원들은 자신에게 할당된 PR의 실패한 Action만 재실행해 레포지토리에 대한 직접적인 권한 없이도 CI/CD를 다시 돌릴 수 있습니다!

✨ 주요 기능

레포지토리 소유자 (Owner)

  • 📦 개인 및 조직 레포지토리 등록
  • 🔑 GitHub Personal Access Token 등록 (암호화 저장)
  • 🔗 공유 가능한 고유 링크 생성
  • 👀 모든 실패한 PR 확인 및 재실행
  • ⚙️ 레포지토리 설정 관리

팀원 (Assignee)

  • 📋 자신에게 할당된 PR 목록 확인
  • 🔄 실패한 GitHub Action 원클릭 재실행
  • 📊 워크플로우 상태 실시간 확인

계정 관리

  • 🔐 GitHub OAuth 로그인
  • 👥 여러 GitHub 계정 연동 지원
  • 🔀 계정 간 쉬운 전환

🛠 기술 스택

  • Frontend: Next.js 16 (App Router), React 19, Tailwind CSS 4
  • Backend: Next.js API Routes
  • Authentication: NextAuth.js v5 (GitHub OAuth)
  • Database: PostgreSQL + Prisma ORM
  • GitHub API: Octokit

🚀 직접 배포하기

현재 프로젝트는 이미 배포되어 있으나, 민감한 토큰을 다루기 때문에 직접 배포하시고 싶다면 아래 가이드를 참고하세요.

1. Repository pull

저장소를 받아옵니다.

2. 환경 변수 설정

.env 파일을 생성하고 다음 값을 설정하세요:

# DB (PostgreSQL)
DATABASE_URL="postgresql://..."
DIRECT_URL="postgresql://..."

# NextAuth.js
AUTH_SECRET="use `npx auth secret`"
AUTH_GITHUB_ID="your-github-oauth-app-id"
AUTH_GITHUB_SECRET="your-github-oauth-app-secret"

# Token Encryption (32자)
ENCRYPTION_KEY="your-32-character-encryption-key"

3. GitHub OAuth App 생성

  1. GitHub Developer Settings에서 OAuth App 생성
  2. Authorization callback URL: http://localhost:3000/api/auth/callback/github
  3. Client ID와 Client Secret을 환경 변수에 설정

4. 개발 서버 실행

# 의존성 설치
pnpm install

# Prisma 클라이언트 생성
npx prisma generate

# 데이터베이스 마이그레이션
npx prisma migrate dev

# 개발 서버 실행
pnpm dev

http://localhost:3000에서 확인하세요.

📖 사용 방법

레포지토리 등록 (소유자)

  1. GitHub으로 로그인
  2. 대시보드 → 레포지토리 등록
  3. 등록할 레포지토리 선택
  4. 설정 페이지에서 Personal Access Token 등록
    • Token에 repoactions 권한 필요
  5. 생성된 링크를 팀원들과 공유

Action 재실행 (팀원)

  1. 공유받은 링크로 접속
  2. GitHub으로 로그인
  3. 자신에게 할당된 PR 목록 확인
  4. 실패한 워크플로우 옆 "Rerun" 버튼 클릭

🔒 보안

  • Personal Access Token은 AES-256-GCM으로 암호화되어 저장됩니다.
  • 팀원은 자신에게 할당된 PR의 Action만 재실행할 수 있습니다.
  • 모든 API 요청은 세션 기반 인증을 거칩니다.
@quadr@hollo.redfeel.net · Reply to 최치선

원래 사용하던 Tooot (android)와 DAWN for mastodon(iOS) Client 호환성 패치로 이제 다시 전부 사용할 수 있게 되었습니다. :) 수정한 부분은 기여하기 위해 PR을 올려두었습니다.

@quadr@hollo.redfeel.net

도메인 분실[?]로 hollo로 갈아탔습니다. 갈아타는게 쉽지 않군요. 기존에 쓰던 Android/iOS Client와의 호환성도 추가적으로 체크해봐야할것 같습니다. ㅠㅠ

@hongminhee@hollo.social

Optique 0.7.0 released!

  • “Did you mean?” typo suggestions
  • Zod & Valibot schema validation
  • Duplicate option detection
  • Context-aware error messages

Type-safe CLI parsing for TypeScript just got friendlier.

https://hackers.pub/@hongminhee/2025/optique-070

hackers.pub

Optique 0.7.0: Smarter error messages and validation library integrations

Optique 0.7.0 introduces enhancements focused on improving the developer experience and expanding its ecosystem for type-safe CLI argument parsing in TypeScript. This release brings automatic "Did you mean?" suggestions to help users correct typos, along with seamless integrations for Zod and Valibot validation libraries, ensuring more robust and efficient CLI development. Duplicate option name detection is now included to catch configuration bugs early, and context-aware error messages provide users with precise feedback. The update also features customizable shell completion naming conventions and improved line break handling in error messages. With these new features, Optique aims to streamline CLI development in TypeScript, making it more intuitive and less error-prone. This release underscores Optique's commitment to providing developers with powerful tools for building high-quality CLI applications.

@hongminhee@hackers.pub

We're thrilled to announce Optique 0.7.0, a release focused on developer experience improvements and expanding Optique's ecosystem with validation library integrations.

Optique is a type-safe, combinatorial CLI argument parser for TypeScript. Unlike traditional CLI libraries that rely on configuration objects, Optique lets you compose parsers from small, reusable functions—bringing the same functional composition patterns that make Zod powerful to CLI development. If you're new to Optique, check out Why Optique? to learn how this approach unlocks possibilities that configuration-based libraries simply can't match.

This release introduces automatic “Did you mean?” suggestions for typos, seamless integration with Zod and Valibot validation libraries, duplicate option name detection for catching configuration bugs early, and context-aware error messages that help users understand exactly what went wrong.

“Did you mean?”: Automatic typo suggestions

We've all been there: you type --verbos instead of --verbose, and the CLI responds with an unhelpful “unknown option” error. Optique 0.7.0 changes this by automatically suggesting similar options when users make typos:

const parser = object({
  verbose: option("-v", "--verbose"),
  version: option("--version"),
});

// User types: --verbos (typo)
const result = parse(parser, ["--verbos"]);
// Error: Unexpected option or argument: --verbos.
//
// Did you mean one of these?
//   --verbose
//   --version

The suggestion system uses Levenshtein distance to find similar names, suggesting up to 3 alternatives when the edit distance is within a reasonable threshold. Suggestions work automatically for both option names and subcommand names across all parser types—option(), flag(), command(), object(), or(), and longestMatch(). See the automatic suggestions documentation for more details.

Customizing suggestions

You can customize how suggestions are formatted or disable them entirely through the errors option:

// Custom suggestion format for option/flag parsers
const portOption = option("--port", integer(), {
  errors: {
    noMatch: (invalidOption, suggestions) =>
      suggestions.length > 0
        ? message`Unknown option ${invalidOption}. Try: ${values(suggestions)}`
        : message`Unknown option ${invalidOption}.`
  }
});

// Custom suggestion format for combinators
const config = object({
  host: option("--host", string()),
  port: option("--port", integer())
}, {
  errors: {
    suggestions: (suggestions) =>
      suggestions.length > 0
        ? message`Available options: ${values(suggestions)}`
        : []
  }
});

Zod and Valibot integrations

Two new packages join the Optique family, bringing powerful validation capabilities from the TypeScript ecosystem to your CLI parsers.

@optique/zod

The new @optique/zod package lets you use Zod schemas directly as value parsers:

import { option, object } from "@optique/core";
import { zod } from "@optique/zod";
import { z } from "zod";

const parser = object({
  email: option("--email", zod(z.string().email())),
  port: option("--port", zod(z.coerce.number().int().min(1).max(65535))),
  format: option("--format", zod(z.enum(["json", "yaml", "xml"]))),
});

The package supports both Zod v3.25.0+ and v4.0.0+, with automatic error formatting that integrates seamlessly with Optique's message system. See the Zod integration guide for complete usage examples.

@optique/valibot

For those who prefer a lighter bundle, @optique/valibot integrates with Valibot—a validation library with a significantly smaller footprint (~10KB vs Zod's ~52KB):

import { option, object } from "@optique/core";
import { valibot } from "@optique/valibot";
import * as v from "valibot";

const parser = object({
  email: option("--email", valibot(v.pipe(v.string(), v.email()))),
  port: option("--port", valibot(v.pipe(
    v.string(),
    v.transform(Number),
    v.integer(),
    v.minValue(1),
    v.maxValue(65535)
  ))),
});

Both packages support custom error messages through their respective error handler options (zodError and valibotError), giving you full control over how validation failures are presented to users. See the Valibot integration guide for complete usage examples.

Duplicate option name detection

A common source of bugs in CLI applications is accidentally using the same option name in multiple places. Previously, this would silently cause ambiguous parsing where the first matching parser consumed the option.

Optique 0.7.0 now validates option names at parse time and fails with a clear error message when duplicates are detected:

const parser = object({
  input: option("-i", "--input", string()),
  interactive: option("-i", "--interactive"),  // Oops! -i is already used
});

// Error: Duplicate option name -i found in fields: input, interactive.
// Each option name must be unique within a parser combinator.

This validation applies to object(), tuple(), merge(), and group() combinators. The or() combinator continues to allow duplicate option names since its branches are mutually exclusive. See the duplicate detection documentation for more details.

If you have a legitimate use case for duplicate option names, you can opt out with allowDuplicates: true:

const parser = object({
  input: option("-i", "--input", string()),
  interactive: option("-i", "--interactive"),
}, { allowDuplicates: true });

Context-aware error messages

Error messages from combinators are now smarter about what they report. Instead of generic "No matching option or command found" messages, Optique now analyzes what the parser expects and provides specific feedback:

// When only arguments are expected
const parser1 = or(argument(string()), argument(integer()));
// Error: Missing required argument.

// When only commands are expected
const parser2 = or(command("add", addParser), command("remove", removeParser));
// Error: No matching command found.

// When both options and arguments are expected
const parser3 = object({
  port: option("--port", integer()),
  file: argument(string()),
});
// Error: No matching option or argument found.

Dynamic error messages with NoMatchContext

For applications that need internationalization or context-specific messaging, the errors.noMatch option now accepts a function that receives a NoMatchContext object:

const parser = or(
  command("add", addParser),
  command("remove", removeParser),
  {
    errors: {
      noMatch: ({ hasOptions, hasCommands, hasArguments }) => {
        if (hasCommands && !hasOptions && !hasArguments) {
          return message`일치하는 명령을 찾을 수 없습니다.`;  // Korean
        }
        return message`잘못된 입력입니다.`;
      }
    }
  }
);

Shell completion naming conventions

The run() function now supports configuring whether shell completions use singular or plural naming conventions:

run(parser, {
  completion: {
    name: "plural",  // Uses "completions" and "--completions"
  }
});

// Or for singular only
run(parser, {
  completion: {
    name: "singular",  // Uses "completion" and "--completion"
  }
});

The default "both" accepts either form, maintaining backward compatibility while letting you enforce a consistent style in your CLI.

Additional improvements

  • Line break handling: formatMessage() now distinguishes between soft breaks (single \n, converted to spaces) and hard breaks (double \n\n, creating paragraph separations), improving multi-line error message formatting.

  • New utility functions: Added extractOptionNames() and extractArgumentMetavars() to the @optique/core/usage module for programmatic access to parser metadata.

Installation

deno add --jsr @optique/core @optique/run
npm  add       @optique/core @optique/run
pnpm add       @optique/core @optique/run
yarn add       @optique/core @optique/run
bun  add       @optique/core @optique/run

For validation library integrations:

# Zod integration
deno add jsr:@optique/zod     # Deno
npm  add     @optique/zod      # npm/pnpm/yarn/bun

# Valibot integration
deno add jsr:@optique/valibot  # Deno
npm  add     @optique/valibot  # npm/pnpm/yarn/bun

Looking forward

This release represents our commitment to making CLI development in TypeScript as smooth as possible. The “Did you mean?” suggestions and validation library integrations were among the most requested features, and we're excited to see how they improve your CLI applications.

For detailed documentation and examples, visit the Optique documentation. We welcome your feedback and contributions on GitHub!

github.com

GitHub - dahlia/optique: Type-safe combinatorial CLI parser for TypeScript

Type-safe combinatorial CLI parser for TypeScript. Contribute to dahlia/optique development by creating an account on GitHub.

@hongminhee@hollo.social

Optique 0.7.0 released!

  • “Did you mean?” typo suggestions
  • Zod & Valibot schema validation
  • Duplicate option detection
  • Context-aware error messages

Type-safe CLI parsing for TypeScript just got friendlier.

https://hackers.pub/@hongminhee/2025/optique-070

hackers.pub

Optique 0.7.0: Smarter error messages and validation library integrations

Optique 0.7.0 introduces enhancements focused on improving the developer experience and expanding its ecosystem for type-safe CLI argument parsing in TypeScript. This release brings automatic "Did you mean?" suggestions to help users correct typos, along with seamless integrations for Zod and Valibot validation libraries, ensuring more robust and efficient CLI development. Duplicate option name detection is now included to catch configuration bugs early, and context-aware error messages provide users with precise feedback. The update also features customizable shell completion naming conventions and improved line break handling in error messages. With these new features, Optique aims to streamline CLI development in TypeScript, making it more intuitive and less error-prone. This release underscores Optique's commitment to providing developers with powerful tools for building high-quality CLI applications.

@hongminhee@hackers.pub

We're thrilled to announce Optique 0.7.0, a release focused on developer experience improvements and expanding Optique's ecosystem with validation library integrations.

Optique is a type-safe, combinatorial CLI argument parser for TypeScript. Unlike traditional CLI libraries that rely on configuration objects, Optique lets you compose parsers from small, reusable functions—bringing the same functional composition patterns that make Zod powerful to CLI development. If you're new to Optique, check out Why Optique? to learn how this approach unlocks possibilities that configuration-based libraries simply can't match.

This release introduces automatic “Did you mean?” suggestions for typos, seamless integration with Zod and Valibot validation libraries, duplicate option name detection for catching configuration bugs early, and context-aware error messages that help users understand exactly what went wrong.

“Did you mean?”: Automatic typo suggestions

We've all been there: you type --verbos instead of --verbose, and the CLI responds with an unhelpful “unknown option” error. Optique 0.7.0 changes this by automatically suggesting similar options when users make typos:

const parser = object({
  verbose: option("-v", "--verbose"),
  version: option("--version"),
});

// User types: --verbos (typo)
const result = parse(parser, ["--verbos"]);
// Error: Unexpected option or argument: --verbos.
//
// Did you mean one of these?
//   --verbose
//   --version

The suggestion system uses Levenshtein distance to find similar names, suggesting up to 3 alternatives when the edit distance is within a reasonable threshold. Suggestions work automatically for both option names and subcommand names across all parser types—option(), flag(), command(), object(), or(), and longestMatch(). See the automatic suggestions documentation for more details.

Customizing suggestions

You can customize how suggestions are formatted or disable them entirely through the errors option:

// Custom suggestion format for option/flag parsers
const portOption = option("--port", integer(), {
  errors: {
    noMatch: (invalidOption, suggestions) =>
      suggestions.length > 0
        ? message`Unknown option ${invalidOption}. Try: ${values(suggestions)}`
        : message`Unknown option ${invalidOption}.`
  }
});

// Custom suggestion format for combinators
const config = object({
  host: option("--host", string()),
  port: option("--port", integer())
}, {
  errors: {
    suggestions: (suggestions) =>
      suggestions.length > 0
        ? message`Available options: ${values(suggestions)}`
        : []
  }
});

Zod and Valibot integrations

Two new packages join the Optique family, bringing powerful validation capabilities from the TypeScript ecosystem to your CLI parsers.

@optique/zod

The new @optique/zod package lets you use Zod schemas directly as value parsers:

import { option, object } from "@optique/core";
import { zod } from "@optique/zod";
import { z } from "zod";

const parser = object({
  email: option("--email", zod(z.string().email())),
  port: option("--port", zod(z.coerce.number().int().min(1).max(65535))),
  format: option("--format", zod(z.enum(["json", "yaml", "xml"]))),
});

The package supports both Zod v3.25.0+ and v4.0.0+, with automatic error formatting that integrates seamlessly with Optique's message system. See the Zod integration guide for complete usage examples.

@optique/valibot

For those who prefer a lighter bundle, @optique/valibot integrates with Valibot—a validation library with a significantly smaller footprint (~10KB vs Zod's ~52KB):

import { option, object } from "@optique/core";
import { valibot } from "@optique/valibot";
import * as v from "valibot";

const parser = object({
  email: option("--email", valibot(v.pipe(v.string(), v.email()))),
  port: option("--port", valibot(v.pipe(
    v.string(),
    v.transform(Number),
    v.integer(),
    v.minValue(1),
    v.maxValue(65535)
  ))),
});

Both packages support custom error messages through their respective error handler options (zodError and valibotError), giving you full control over how validation failures are presented to users. See the Valibot integration guide for complete usage examples.

Duplicate option name detection

A common source of bugs in CLI applications is accidentally using the same option name in multiple places. Previously, this would silently cause ambiguous parsing where the first matching parser consumed the option.

Optique 0.7.0 now validates option names at parse time and fails with a clear error message when duplicates are detected:

const parser = object({
  input: option("-i", "--input", string()),
  interactive: option("-i", "--interactive"),  // Oops! -i is already used
});

// Error: Duplicate option name -i found in fields: input, interactive.
// Each option name must be unique within a parser combinator.

This validation applies to object(), tuple(), merge(), and group() combinators. The or() combinator continues to allow duplicate option names since its branches are mutually exclusive. See the duplicate detection documentation for more details.

If you have a legitimate use case for duplicate option names, you can opt out with allowDuplicates: true:

const parser = object({
  input: option("-i", "--input", string()),
  interactive: option("-i", "--interactive"),
}, { allowDuplicates: true });

Context-aware error messages

Error messages from combinators are now smarter about what they report. Instead of generic "No matching option or command found" messages, Optique now analyzes what the parser expects and provides specific feedback:

// When only arguments are expected
const parser1 = or(argument(string()), argument(integer()));
// Error: Missing required argument.

// When only commands are expected
const parser2 = or(command("add", addParser), command("remove", removeParser));
// Error: No matching command found.

// When both options and arguments are expected
const parser3 = object({
  port: option("--port", integer()),
  file: argument(string()),
});
// Error: No matching option or argument found.

Dynamic error messages with NoMatchContext

For applications that need internationalization or context-specific messaging, the errors.noMatch option now accepts a function that receives a NoMatchContext object:

const parser = or(
  command("add", addParser),
  command("remove", removeParser),
  {
    errors: {
      noMatch: ({ hasOptions, hasCommands, hasArguments }) => {
        if (hasCommands && !hasOptions && !hasArguments) {
          return message`일치하는 명령을 찾을 수 없습니다.`;  // Korean
        }
        return message`잘못된 입력입니다.`;
      }
    }
  }
);

Shell completion naming conventions

The run() function now supports configuring whether shell completions use singular or plural naming conventions:

run(parser, {
  completion: {
    name: "plural",  // Uses "completions" and "--completions"
  }
});

// Or for singular only
run(parser, {
  completion: {
    name: "singular",  // Uses "completion" and "--completion"
  }
});

The default "both" accepts either form, maintaining backward compatibility while letting you enforce a consistent style in your CLI.

Additional improvements

  • Line break handling: formatMessage() now distinguishes between soft breaks (single \n, converted to spaces) and hard breaks (double \n\n, creating paragraph separations), improving multi-line error message formatting.

  • New utility functions: Added extractOptionNames() and extractArgumentMetavars() to the @optique/core/usage module for programmatic access to parser metadata.

Installation

deno add --jsr @optique/core @optique/run
npm  add       @optique/core @optique/run
pnpm add       @optique/core @optique/run
yarn add       @optique/core @optique/run
bun  add       @optique/core @optique/run

For validation library integrations:

# Zod integration
deno add jsr:@optique/zod     # Deno
npm  add     @optique/zod      # npm/pnpm/yarn/bun

# Valibot integration
deno add jsr:@optique/valibot  # Deno
npm  add     @optique/valibot  # npm/pnpm/yarn/bun

Looking forward

This release represents our commitment to making CLI development in TypeScript as smooth as possible. The “Did you mean?” suggestions and validation library integrations were among the most requested features, and we're excited to see how they improve your CLI applications.

For detailed documentation and examples, visit the Optique documentation. We welcome your feedback and contributions on GitHub!

github.com

GitHub - dahlia/optique: Type-safe combinatorial CLI parser for TypeScript

Type-safe combinatorial CLI parser for TypeScript. Contribute to dahlia/optique development by creating an account on GitHub.

@hongminhee@hackers.pub

We're thrilled to announce Optique 0.7.0, a release focused on developer experience improvements and expanding Optique's ecosystem with validation library integrations.

Optique is a type-safe, combinatorial CLI argument parser for TypeScript. Unlike traditional CLI libraries that rely on configuration objects, Optique lets you compose parsers from small, reusable functions—bringing the same functional composition patterns that make Zod powerful to CLI development. If you're new to Optique, check out Why Optique? to learn how this approach unlocks possibilities that configuration-based libraries simply can't match.

This release introduces automatic “Did you mean?” suggestions for typos, seamless integration with Zod and Valibot validation libraries, duplicate option name detection for catching configuration bugs early, and context-aware error messages that help users understand exactly what went wrong.

“Did you mean?”: Automatic typo suggestions

We've all been there: you type --verbos instead of --verbose, and the CLI responds with an unhelpful “unknown option” error. Optique 0.7.0 changes this by automatically suggesting similar options when users make typos:

const parser = object({
  verbose: option("-v", "--verbose"),
  version: option("--version"),
});

// User types: --verbos (typo)
const result = parse(parser, ["--verbos"]);
// Error: Unexpected option or argument: --verbos.
//
// Did you mean one of these?
//   --verbose
//   --version

The suggestion system uses Levenshtein distance to find similar names, suggesting up to 3 alternatives when the edit distance is within a reasonable threshold. Suggestions work automatically for both option names and subcommand names across all parser types—option(), flag(), command(), object(), or(), and longestMatch(). See the automatic suggestions documentation for more details.

Customizing suggestions

You can customize how suggestions are formatted or disable them entirely through the errors option:

// Custom suggestion format for option/flag parsers
const portOption = option("--port", integer(), {
  errors: {
    noMatch: (invalidOption, suggestions) =>
      suggestions.length > 0
        ? message`Unknown option ${invalidOption}. Try: ${values(suggestions)}`
        : message`Unknown option ${invalidOption}.`
  }
});

// Custom suggestion format for combinators
const config = object({
  host: option("--host", string()),
  port: option("--port", integer())
}, {
  errors: {
    suggestions: (suggestions) =>
      suggestions.length > 0
        ? message`Available options: ${values(suggestions)}`
        : []
  }
});

Zod and Valibot integrations

Two new packages join the Optique family, bringing powerful validation capabilities from the TypeScript ecosystem to your CLI parsers.

@optique/zod

The new @optique/zod package lets you use Zod schemas directly as value parsers:

import { option, object } from "@optique/core";
import { zod } from "@optique/zod";
import { z } from "zod";

const parser = object({
  email: option("--email", zod(z.string().email())),
  port: option("--port", zod(z.coerce.number().int().min(1).max(65535))),
  format: option("--format", zod(z.enum(["json", "yaml", "xml"]))),
});

The package supports both Zod v3.25.0+ and v4.0.0+, with automatic error formatting that integrates seamlessly with Optique's message system. See the Zod integration guide for complete usage examples.

@optique/valibot

For those who prefer a lighter bundle, @optique/valibot integrates with Valibot—a validation library with a significantly smaller footprint (~10KB vs Zod's ~52KB):

import { option, object } from "@optique/core";
import { valibot } from "@optique/valibot";
import * as v from "valibot";

const parser = object({
  email: option("--email", valibot(v.pipe(v.string(), v.email()))),
  port: option("--port", valibot(v.pipe(
    v.string(),
    v.transform(Number),
    v.integer(),
    v.minValue(1),
    v.maxValue(65535)
  ))),
});

Both packages support custom error messages through their respective error handler options (zodError and valibotError), giving you full control over how validation failures are presented to users. See the Valibot integration guide for complete usage examples.

Duplicate option name detection

A common source of bugs in CLI applications is accidentally using the same option name in multiple places. Previously, this would silently cause ambiguous parsing where the first matching parser consumed the option.

Optique 0.7.0 now validates option names at parse time and fails with a clear error message when duplicates are detected:

const parser = object({
  input: option("-i", "--input", string()),
  interactive: option("-i", "--interactive"),  // Oops! -i is already used
});

// Error: Duplicate option name -i found in fields: input, interactive.
// Each option name must be unique within a parser combinator.

This validation applies to object(), tuple(), merge(), and group() combinators. The or() combinator continues to allow duplicate option names since its branches are mutually exclusive. See the duplicate detection documentation for more details.

If you have a legitimate use case for duplicate option names, you can opt out with allowDuplicates: true:

const parser = object({
  input: option("-i", "--input", string()),
  interactive: option("-i", "--interactive"),
}, { allowDuplicates: true });

Context-aware error messages

Error messages from combinators are now smarter about what they report. Instead of generic "No matching option or command found" messages, Optique now analyzes what the parser expects and provides specific feedback:

// When only arguments are expected
const parser1 = or(argument(string()), argument(integer()));
// Error: Missing required argument.

// When only commands are expected
const parser2 = or(command("add", addParser), command("remove", removeParser));
// Error: No matching command found.

// When both options and arguments are expected
const parser3 = object({
  port: option("--port", integer()),
  file: argument(string()),
});
// Error: No matching option or argument found.

Dynamic error messages with NoMatchContext

For applications that need internationalization or context-specific messaging, the errors.noMatch option now accepts a function that receives a NoMatchContext object:

const parser = or(
  command("add", addParser),
  command("remove", removeParser),
  {
    errors: {
      noMatch: ({ hasOptions, hasCommands, hasArguments }) => {
        if (hasCommands && !hasOptions && !hasArguments) {
          return message`일치하는 명령을 찾을 수 없습니다.`;  // Korean
        }
        return message`잘못된 입력입니다.`;
      }
    }
  }
);

Shell completion naming conventions

The run() function now supports configuring whether shell completions use singular or plural naming conventions:

run(parser, {
  completion: {
    name: "plural",  // Uses "completions" and "--completions"
  }
});

// Or for singular only
run(parser, {
  completion: {
    name: "singular",  // Uses "completion" and "--completion"
  }
});

The default "both" accepts either form, maintaining backward compatibility while letting you enforce a consistent style in your CLI.

Additional improvements

  • Line break handling: formatMessage() now distinguishes between soft breaks (single \n, converted to spaces) and hard breaks (double \n\n, creating paragraph separations), improving multi-line error message formatting.

  • New utility functions: Added extractOptionNames() and extractArgumentMetavars() to the @optique/core/usage module for programmatic access to parser metadata.

Installation

deno add --jsr @optique/core @optique/run
npm  add       @optique/core @optique/run
pnpm add       @optique/core @optique/run
yarn add       @optique/core @optique/run
bun  add       @optique/core @optique/run

For validation library integrations:

# Zod integration
deno add jsr:@optique/zod     # Deno
npm  add     @optique/zod      # npm/pnpm/yarn/bun

# Valibot integration
deno add jsr:@optique/valibot  # Deno
npm  add     @optique/valibot  # npm/pnpm/yarn/bun

Looking forward

This release represents our commitment to making CLI development in TypeScript as smooth as possible. The “Did you mean?” suggestions and validation library integrations were among the most requested features, and we're excited to see how they improve your CLI applications.

For detailed documentation and examples, visit the Optique documentation. We welcome your feedback and contributions on GitHub!

github.com

GitHub - dahlia/optique: Type-safe combinatorial CLI parser for TypeScript

Type-safe combinatorial CLI parser for TypeScript. Contribute to dahlia/optique development by creating an account on GitHub.

@hongminhee@hackers.pub

フェディバースのアドベントカレンダー、去年も参加したんだ。今年も参加しなきゃ!

fedibird.com

のえる (@noellabo@fedibird.com)

添付: 1 枚の画像 Fediverseのアドベントカレンダー、2025年も会場をご用意しています。 アドベントカレンダーはキリストの降誕祭・待降節に由来するもので、 12月1日(クリスマスの4つ前の日曜日)〜12月24日、毎日印をつけたり、毎週キャンドルを灯しながら数えていく習慣がありまして、 クリスマスを待つ子供達に、お菓子やおもちゃが入った扉がついているカレンダーがつくられ、毎日ひとつずつ開けていく習慣が根付いています。 大人向けの、紅茶とか化粧品の入ったカレンダーも、だいぶメジャーになってきましたよね。 で、これになぞらえて行われている、毎日記事を書いて発表する技術界隈から始まったイベントがありまして、 その流れを汲んでいるのが、今回私たちが企画しているアドベントカレンダーです。 みんなでテーマに沿った記事を持ち寄って、それを読んで一年を振り返ったり、知見を共有したり、抱負を語ったりするイベントです。 個人的な感想や振り返りなども受け付けているので、みなさん、ぜひ参加してください。エントリー受付中です。 登録・詳細はこちらからどうぞ。 https://adventar.org/calendars/11463 #FediverseAdventCalendar #FediverseAdventCalendar2025

@noellabo@fedibird.com

Fediverseのアドベントカレンダー、2025年も会場をご用意しています。

アドベントカレンダーはキリストの降誕祭・待降節に由来するもので、

12月1日(クリスマスの4つ前の日曜日)〜12月24日、毎日印をつけたり、毎週キャンドルを灯しながら数えていく習慣がありまして、

クリスマスを待つ子供達に、お菓子やおもちゃが入った扉がついているカレンダーがつくられ、毎日ひとつずつ開けていく習慣が根付いています。

大人向けの、紅茶とか化粧品の入ったカレンダーも、だいぶメジャーになってきましたよね。

で、これになぞらえて行われている、毎日記事を書いて発表する技術界隈から始まったイベントがありまして、

その流れを汲んでいるのが、今回私たちが企画しているアドベントカレンダーです。

みんなでテーマに沿った記事を持ち寄って、それを読んで一年を振り返ったり、知見を共有したり、抱負を語ったりするイベントです。

個人的な感想や振り返りなども受け付けているので、みなさん、ぜひ参加してください。エントリー受付中です。

登録・詳細はこちらからどうぞ。
adventar.org/calendars/11463

クリスマスマーケット
ALT text

クリスマスマーケット

@rkttu@hackers.pub

네이버 모각코 지도를 오랫만에 업그레이드합니다. 24시, 야간, 밤 11시 이후 마감, 심야, 새벽 시간에도 운영하는 카페들을 모아 별도 지도로 준비하고 있습니다.

많이 제보하고 공유해주세요~ 🤗

https://naver.me/xF2W8ln7

@z9mb1@hackers.pub

아… 젠부 귀찮다 그나저나 후쿠오카에서 Wagashi를 먹어보지 못한게 아쉽군… 다음엔 디저트 투어를 해보러 갈까 싶다. 카페에서 먹는 몽블랑도 좀 궁금하고. 프랑스 식 제과는 크게 궁금하지 않은데 일본식 프랑스 제과 뭐 이런건 궁금하다.

@tokolovesme@seoul.earth

후쿠오카에서 온 에린기와래(새송이버섯 하치와래)

@z9mb1@hackers.pub

‘@FUK’ ‘@everyone’ 🍨👩‍💻🧑‍💻👨‍💻

공항에서 서 있다
ALT text

공항에서 서 있다

coffee jelly parfait
ALT text

coffee jelly parfait

tea time. two tarts and tea cups.
ALT text

tea time. two tarts and tea cups.

apartment and a tree
ALT text

apartment and a tree

今日はちょっと仕事しにエンジニアカフェに来た。福岡市赤煉瓦文化館の建物を使ってるから、趣があっていい感じ。

福岡市赤煉瓦文化館の建物
ALT text

福岡市赤煉瓦文化館の建物

「福岡市赤煉瓦文化館」と書いている標識版
ALT text

「福岡市赤煉瓦文化館」と書いている標識版

エンジニアカフェの看板
ALT text

エンジニアカフェの看板