洪 民憙 (Hong Minhee) 
@hongminhee@hollo.social · Reply to Simon Zerafa's post
@simonzerafa Thanks, just registered fedify.studio!


@hongminhee@hollo.social · 984 following · 1347 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 #TypeScript, #Haskell, #Rust, & #Python. They/them.
서울에 사는 交叉女性主義者이자 社會主義者. 金剛兔(@tokolovesme)의 配偶者. @fedify, @hollo, @botkit 메인테이너. #TypeScript, #Haskell, #Rust, #Python 等으로 自由 소프트웨어 만듦.
| Website | GitHub | Blog | Hackers' Pub |
|---|---|---|---|

@hongminhee@hollo.social · Reply to Simon Zerafa's post
@simonzerafa Thanks, just registered fedify.studio!

@hongminhee@hollo.social · Reply to Simon Zerafa's post
@simonzerafa Yes, like a supercharged ActivityPub.Academy?

@hongminhee@hollo.social
A while back I mentioned the idea of “Fedify Studio”—a web-based toolkit for #ActivityPub debugging and development. I've been quietly working on shaping that idea into something more concrete.
Nothing to announce yet, but it's looking like this might become a team effort rather than a solo project, which would be nice. We'll see how it goes.

@hongminhee@hollo.social
Thinking about building “#Fedify Studio” (tentative name)—a web-based #ActivityPub debugging & development toolkit, like a supercharged version of ActivityPub.Academy and fedify inbox command. Imagine having a proper UI for testing activities, inspecting actors, debugging federation issues… Would this be useful for other ActivityPub developers out there?

@hongminhee@hollo.social
A while back I mentioned the idea of “Fedify Studio”—a web-based toolkit for #ActivityPub debugging and development. I've been quietly working on shaping that idea into something more concrete.
Nothing to announce yet, but it's looking like this might become a team effort rather than a solo project, which would be nice. We'll see how it goes.

@hongminhee@hollo.social
Thinking about building “#Fedify Studio” (tentative name)—a web-based #ActivityPub debugging & development toolkit, like a supercharged version of ActivityPub.Academy and fedify inbox command. Imagine having a proper UI for testing activities, inspecting actors, debugging federation issues… Would this be useful for other ActivityPub developers out there?
@kodingwarrior@hackers.pub
이게 금방 매진이 되려고 하네......
RE: https://hackers.pub/@kodingwarrior/019abed2-f2e0-79fe-ada8-6b150ae0d840
@kodingwarrior@hackers.pub
Hackers' Public @ Seoul 송년 네트워킹 밋업은 발표보다 대화, 형식보다 연결을 중심으로 진행됩니다. 라이트닝 토크도 지원받습니다. 만들었던 것·배운 것·고민했던 이야기를 자유롭게 얘기해보도록 해요.
많은 관심 부탁드립니다~

@hongminhee@hollo.social
아무래도 來年에는 海外 컨퍼런스에 많이 參加하게 될 것 같다. 一旦 只今 생각나는 것만으로도 네 個나 있음:

@hongminhee@hollo.social · Reply to julian's post

@AmaseCocoa@misskey.io
apmodel 0.4.5
バグ修正だけ、特に新しいものとかはない (そもそも次になる予定な0.5.0まで破壊的変更無し)
https://pypi.org/project/apmodel/0.4.5/

@hongminhee@hollo.social · Reply to Emelia 👸🏻's post
@thisismissem @liaizon That would be great if we could do such an event!

@hongminhee@hollo.social · Reply to wakest ⁂'s post
@liaizon That sounds great! I'd love to visit Berlin if my schedule allows. Still figuring out flights and dates, but I'll let you know once things are more concrete.

@hongminhee@hollo.social · Reply to 洪 民憙 (Hong Minhee) :nonbinary:'s post
Update: I just submitted a talk proposal to the Social Web Devroom at @fosdem 2026—Fedify: Type-safe ActivityPub for TypeScript. Guess I'm flying to Brussels after all. 😅
@cheeaun@mastodon.social
RE: https://mastodon.social/@dansup/115497711169256588
Seems like bsky starts experimenting using mediabunny (https://mediabunny.dev/) to compress videos https://github.com/bluesky-social/social-app/commit/0a7209c623fbaf1e34e6143017c907f30a3c8bb4
Loops did the same too.
The bundle size is quite big, tho' I think will still be smaller than ffmpeg-wasm (https://github.com/ffmpegwasm/ffmpeg.wasm), used on https://tools.rotato.app/compress (I've been using this for videos I upload here instead of Handbrake app)
@dansup@mastodon.social
Loops now uses mediabunny to transcode and optimize videos before uploading, using WebCodecs!
We have a very simple quality algorithm lol, but it does work great and reduces the file size significantly, allowing for reduced backend load.
The magic happens here ✨
https://github.com/joinloops/loops-server/blob/main/resources/js/pages/studio/upload.vue#L1472-L1556
@thisismissem@hachyderm.io · Reply to Emelia 👸🏻's post
Small note: the previous figure I'd shared for community support accidentally omitted the €1730 from GitHub Sponsors because I don't see that in my normal Stripe dashboard
The NLNet amount also jumped up as I was able to submit another request for payment, which has since been approved.
I've also submitted grant applications for FediMod FIRES (to continue development) and for the ActivityPub Trust & Safety Taskforce, which if approved will unlock funds for myself and others on the taskforce, allowing us to spend more time on that work.
@thisismissem@hachyderm.io
Hey #fediverse people, I've an ask: If you appreciate all that I do for the fediverse and open social web, and you'd like to see me continue to do that work, please support my work financially.
Right now I'm having to look for work outside of the Fediverse because I simply cannot make ends meet.
I need €60-70k per year to support myself, with costs everywhere feeling increased (so that number may even be too low)
Right now, year to date, I've received a total of €20,170 in financial support from the community, and €22,450 from NLNet grants. I've also only had minimal freelance work this year, as I've been busy on grant work & try to focus on the fediverse & open social web.
So my total income isn't yet enough to be regularly sustainable. I've had problems being able to make rent payments this year because cashflow on grants comes in large chunks usually months after the work has been done.
So if you want to see me keep doing what I'm doing, please support my work!
@kodingwarrior@hackers.pub
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 #GoActivityPub 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.
#unit-testing
@cranberry@fedibird.com
買い物💿
@jdv_jazz@mastodon.nl
Cannonball Adderley & The Bossa Rio Sextet - Joyce's Sambas (Feat. Sergio Mendes)
#JazzDeVille #Jazz #NowPlaying #CannonballAdderleyTheBossaRioSextet
@jdv_jazz@mastodon.nl
Avishai Cohen - Mediterranean Sun
#JazzDeVille #Jazz #NowPlaying #AvishaiCohen
@wolffia@bakedbean.xyz
'교'로 읽는 건 처음 봄

@hongminhee@hollo.social · Reply to 洪 民憙 (Hong Minhee) :nonbinary:'s post
近いうちに数ヶ月ぶりの新しいHolloのマイナーリリース(v0.7.0)が出そうだね。

@hongminhee@hollo.social · Reply to 洪 民憙 (Hong Minhee) :nonbinary:'s post
早晩間 몇 個月만의 새 #Hollo 마이너 릴리스(v0.7.0)이 나올 것 같다.

@hongminhee@hollo.social
It looks like a new minor release of #Hollo (v0.7.0) will be out soon, the first in several months.
@2chanhaeng@hackers.pub
실패한 GitHub Actions를 팀원들이 직접 재실행할 수 있도록 권한을 위임하는 웹 애플리케이션입니다.
GitHub Actions가 실패했을 때, 재실행하려면 해당 레포지토리에 대한 Write 권한이 필요합니다. 하지만 보안상의 이유로 모든 팀원에게 Write 권한을 주기는 어렵습니다.
GitHub Action Rerunner는 이 문제를 해결합니다. 레포지토리 소유자가 토큰을 등록하면, 팀원들은 자신에게 할당된 PR의 실패한 Action만 재실행해 레포지토리에 대한 직접적인 권한 없이도 CI/CD를 다시 돌릴 수 있습니다!
현재 프로젝트는 이미 배포되어 있으나, 민감한 토큰을 다루기 때문에 직접 배포하시고 싶다면 아래 가이드를 참고하세요.
저장소를 받아옵니다.
.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"
http://localhost:3000/api/auth/callback/github# 의존성 설치
pnpm install
# Prisma 클라이언트 생성
npx prisma generate
# 데이터베이스 마이그레이션
npx prisma migrate dev
# 개발 서버 실행
pnpm dev
http://localhost:3000에서 확인하세요.
repo 및 actions 권한 필요@quadr@hollo.redfeel.net · Reply to 최치선's post
원래 사용하던 Tooot (android)와 DAWN for mastodon(iOS) Client 호환성 패치로 이제 다시 전부 사용할 수 있게 되었습니다. :) 수정한 부분은 기여하기 위해 PR을 올려두었습니다.
@quadr@hollo.redfeel.net
도메인 분실[?]로 hollo로 갈아탔습니다. 갈아타는게 쉽지 않군요. 기존에 쓰던 Android/iOS Client와의 호환성도 추가적으로 체크해봐야할것 같습니다. ㅠㅠ

@hongminhee@hollo.social
Optique 0.7.0 released!
Type-safe CLI parsing for TypeScript just got friendlier.
@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.
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.
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)}`
: []
}
});
Two new packages join the Optique family, bringing powerful validation capabilities from the TypeScript ecosystem to your CLI parsers.
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.
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.
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 });
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.
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`잘못된 입력입니다.`;
}
}
}
);
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.
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.
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
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!

@hongminhee@hollo.social
Optique 0.7.0 released!
Type-safe CLI parsing for TypeScript just got friendlier.
@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.
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.
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)}`
: []
}
});
Two new packages join the Optique family, bringing powerful validation capabilities from the TypeScript ecosystem to your CLI parsers.
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.
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.
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 });
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.
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`잘못된 입력입니다.`;
}
}
}
);
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.
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.
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
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!
@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.
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.
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)}`
: []
}
});
Two new packages join the Optique family, bringing powerful validation capabilities from the TypeScript ecosystem to your CLI parsers.
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.
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.
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 });
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.
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`잘못된 입력입니다.`;
}
}
}
);
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.
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.
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
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!
@silverpill@mitra.social
FEP-9f9f: Collections
Collections are the most under-specified entities in #ActivityPub. I've started documenting them in a FEP:
https://codeberg.org/silverpill/feps/src/branch/main/9f9f/fep-9f9f.md