What is Hackers' Pub?

Hackers' Pub is a place for software engineers to share their knowledge and experience with each other. It's also an ActivityPub-enabled social network, so you can follow your favorite hackers in the fediverse and get their latest posts in your feed.

๐Ÿ ์ €์˜ ์ฃผ๋‹˜, ๋‚ ์•„๋‹ค๋‹ˆ๋Š” ์ŠคํŒŒ๊ฒŒํ‹ฐ ๊ดด๋ฌผ ๋‹˜, ์ €๋ฅผ ๋ณดํ˜ธํ•˜์‹œ์–ด ์‚ดํŽด์ฃผ์†Œ์„œ.
๐Ÿ˜‹ ์–ด์„œ ๊ตฌ์›ํ•˜์‹œ์–ด ํ˜ผ์ž ๋‚ด๋ฒ„๋ ค ๋‘์ง€ ๋งˆ์†Œ์„œ.

๐Ÿ ๋‚ ์•„๋‹ค๋‹ˆ๋Š” ์ŠคํŒŒ๊ฒŒํ‹ฐ ๊ดด๋ฌผ ๋‹˜๊ป˜์„œ ์—ฌ๋Ÿฌ๋ถ„๊ณผ ํ•จ๊ป˜.
๐Ÿ˜‹ ๋˜ํ•œ ์ฃผ๊ต์˜ ๋ฉด๋ฐœ๊ณผ ํ•จ๊ป˜ ํ•˜์†Œ์„œ.
๐Ÿ ๊ธฐ๋„ํ•ฉ์‹œ๋‹ค.
์ง€๊ทนํžˆ ์„ ํ•˜์‹  ์ŠคํŒŒ๊ฒŒํ‹ฐ ๊ดด๋ฌผ ๋‹˜, ์‚ฌ๋žŒ๋“ค์ด ๋”์šฑ๋” ์™„์ „ํ•œ ๊ฒƒ์„ ์ด๋ฃจ๊ธฐ ์œ„ํ•ด์„œ ์„œ๋กœ ํ˜‘์กฐํ•˜์—ฌ ์ผํ•˜๊ฒŒ ํ•ด์ฃผ์…จ์œผ๋‹ˆ,
์ €ํฌ ๊ธฐ๋„๋ฅผ ๋“ค์œผ์‹œ๊ณ  ์ €ํฌ๊ฐ€ ํ•ญ์ƒ ์šฐ์ •์„ ํ’ˆ๊ณ , ๋ชจ๋“  ์ด๋“ค์„ ์œ„ํ•œ ๋ฐ•์• ๋กœ ๋Š์ž„์—†์ด ์ผํ•˜๊ฒŒ ํ•˜์†Œ์„œ.

"4. ์„ฑ๋ฉด์˜ ์ธ๋„ ์•„๋ž˜, ์ €ํฌ๊ฐ€ ํ—›๋œ ๋ถ„์ฃผํ•จ์ด ์•„๋‹ˆ๋ผ ์˜๋ฏธ ์žˆ๋Š” ์ผ์— ๋งˆ์Œ์„ ๋‘๊ฒŒ ํ•˜์†Œ์„œ."

๐Ÿ ๋‚ ์•„๋‹ค๋‹ˆ๋Š” ์ŠคํŒŒ๊ฒŒํ‹ฐ ๊ดด๋ฌผ ๋‹˜๊ป˜์„œ ์—ฌ๋Ÿฌ๋ถ„๊ณผ ํ•จ๊ป˜.
๐Ÿ˜‹ ๋˜ํ•œ ์ฃผ๊ต์˜ ๋ฉด๋ฐœ๊ณผ ํ•จ๊ป˜ ํ•˜์†Œ์„œ.
๐Ÿ ์ „๋Šฅํ•˜์‹  ์ŠคํŒŒ๊ฒŒํ‹ฐ ๊ดด๋ฌผ ๋‹˜, ๋ฏธํŠธ๋ณผ๐Ÿง†๊ณผ ์†Œ์Šค๐Ÿฅซ์™€ ์„ฑ๋ฉด(the Holy Noodle)๐Ÿ๊ป˜์„œ๋Š” ์—ฌ๊ธฐ ๋ชจ์ธ ๋ชจ๋“  ์ด์—๊ฒŒ ๊ฐ•๋ณตํ•˜์†Œ์„œ.
๐Ÿ˜‹ ๋ผ-๋ฉ˜ ๐Ÿœ.

๐Ÿ ๋‚ ์•„๋‹ค๋‹ˆ๋Š” ์ŠคํŒŒ๊ฒŒํ‹ฐ ๊ดด๋ฌผ ๋‹˜์„ ์ฐฌ๋ฏธํ•ฉ์‹œ๋‹ค.
๐Ÿ˜‹ ์ฃผ๋‹˜ ๊ฐ์‚ฌํ•ฉ๋‹ˆ๋‹ค.

2026-01-13T14:02:19+09:00


0

ๅœŸๆ›œใซ่ปŠใฎๆš—้›ปๆตใ‚’ๆธฌๅฎšใ—ใŸใ‚“ใ ใ‘ใฉใ€ใ‚ชใƒผใƒˆACCๅ‹•ไฝœไธญใฏ1.5A่ถ…ใˆ๏ผˆ๏ผ๏ผŸ๏ผ‰ใงๅ…จ้ƒจๅˆ‡ใ‚ŒใŸใ‚ใจใฏ30mAใใ‚‰ใ„ใ ใฃใŸใ€€ใ‚ชใƒผใƒˆACCใฃใฆใ‚ปใ‚ซใƒณใƒ‰ใƒใƒƒใƒ†ใƒชใ‹ใ‚‰ไพ›็ตฆใ•ใ‚Œใ‚‹ใจๆ€ใฃใฆใŸใ‚“ใ ใ‘ใฉใ€ๆญปใซใ‹ใ‘ใจใ‹ใชใฎใ‹ใญใˆ

0
0
0

-ํ•˜์ด๋ธŒ ์•„๋ฉ”๋ฆฌ์นด ์žํšŒ์‚ฌ๊ฐ€ โ€˜๋ฏผํฌ์ง„ ์—ญ๋ฐ”์ด๋Ÿดโ€™ ์‚ฌ์ดํŠธ ๋งŒ๋“ค์—ˆ๋‹ค๋Š” ์ฆ๊ฑฐ, ็พŽ ๋ฒ•์›์— ์ œ์ถœ๋ผ -TAG PR์˜ ์ค‘์ƒ๋ชจ๋žต ํŒจํ„ด, ๋ฏผํฌ์ง„์—๊ฒŒ๋„ ๊ทธ๋Œ€๋กœ ์ ์šฉ๋๋‚˜ -ํ—๋ฆฌ์šฐ๋“œ ๋ฐฐ์šฐ ๋“ฑ ํ”ผํ•ด์ž ์†์ถœโ€ฆ ์ˆ˜์ฒœ์–ต๋Œ€ ์ง•๋ฒŒ์  ๋ฐฐ์ƒ ์†Œ์†ก์œผ๋กœ ์ง„ํ–‰ ์ค‘ ์ž…๋ ฅ 2026.01.12 16:24 www.spochoo.com/news/article...

โ€˜๋ฏผํฌ์ง„ ์ค‘์ƒ๋ชจ๋žตโ€™ ํ•˜์ด๋ธŒ ์žํšŒ์‚ฌ ์ฃผ๋„ ์˜ํ˜นโ€ฆ็พŽ ๋ฒ•์ •์„œ...

โ€˜๋ฏผํฌ์ง„ ์ค‘์ƒ๋ชจ๋žตโ€™ ํ•˜์ด๋ธŒ ์žํšŒ์‚ฌ ์ฃผ๋„ ์˜ํ˜นโ€ฆ็พŽ ๋ฒ•์ •์„œ ๋“œ๋Ÿฌ๋‚˜๋Š” '์—ญ๋ฐ”์ด๋Ÿด' ์‹ค์ฒด [๋”๊ฒŒ์ดํŠธ ํƒ์‚ฌ]

๊น€ํ˜„์ˆ˜ ๊ธฐ์ž ยท [๋”๊ฒŒ์ดํŠธ]2024๋…„ 9์›” 11์ผ, ๊ทธ๋ฃน ๋‰ด์ง„์Šค ๋ฉค๋ฒ„๋“ค์ด ์œ ํŠœ๋ธŒ ๊ธด๊ธ‰ ๋ผ์ด๋ธŒ ๋ฐฉ์†ก์— ๋‚˜์™”๋‹ค. ๋‰ด์ง„์Šค๋Š” ๋ฐฉ์†ก์—์„œ ํ•˜์ด๋ธŒ์™€ ๋ฐฉ์‹œํ˜ ํ•˜์ด๋ธŒ ์˜์žฅ์„ ํ–ฅํ•ด "9์›” 25์ผ๊นŒ์ง€ ๋ฏผํฌ์ง„ ๋Œ€ํ‘œ๋ฅผ ์–ด๋„์–ด์— ๋ณต๊ท€์‹œ์ผœ ๋‹ฌ๋ผ"๊ณ  ์š”์ฒญํ–ˆ๋‹ค. K-ํŒ ์—ญ์‚ฌ์ƒ ์œ ๋ก€์—†๋Š” ์•„ํ‹ฐ์ŠคํŠธ๋“ค์˜ ์š”์ฒญ์— ์ „ ์„ธ๊ณ„ ์ด๋ชฉ์ด ์ ๋ ธ๋‹ค.๊ทธ๋Ÿฌ๋‚˜ ์ •์ž‘ 9์›” 25์ผ์ด ๋์–ด๋„ ๋ฏผ ์ „ ๋Œ€ํ‘œ ๋ณต๊ท€๋Š” ์ด๋ค„์ง€์ง€ ์•Š์•˜๋‹ค. ๋Œ€์‹  ์ดํ‹€ ๋’ค์ธ 27์ผ, 'minheejin.net(๋ฏผํฌ์ง„๋‹ท๋„ท)'์ด๋ผ๋Š” ์ •์ฒด๋ถˆ๋ช…์˜ ์‚ฌ์ดํŠธ๊ฐ€ ์ƒ๊ฒผ๋‹ค. ๋ฏผ ์ „ ๋Œ€ํ‘œ๋ฅผ ์ค‘์ƒ๋ชจ๋žตํ•˜๋Š” ์‚ฌ์ดํŠธ์˜€๋‹ค.ํ•ด๋‹น ๋„๋ฉ”์ธ์„ ๊ตฌ๋งคํ•˜๊ณ , ์‚ฌ์ดํŠธ๋ฅผ ์ œ์ž‘ํ•œ ์ฃผ์ฒด

www.spochoo.com ยท ๋”๊ฒŒ์ดํŠธ(THE GATE)

0
0

ํŠธ๋Ÿผํ”„ ๋Œ€ํ†ต๋ น์€ ์†Œ์…œ๋ฏธ๋””์–ด ํŠธ๋ฃจ์Šค์†Œ์…œ์—์„œ โ€œ์ด๋ž€๊ณผ ๊ฑฐ๋ž˜ํ•˜๋Š” ๋ชจ๋“  ๊ตญ๊ฐ€๋Š” ๋ฏธ๊ตญ๊ณผ ํ•˜๋Š” ๋ชจ๋“  ๊ฑฐ๋ž˜์—์„œ 25%์˜ ๊ด€์„ธ๋ฅผ ๋ถ€๊ณผ๋ฐ›๊ฒŒ ๋œ๋‹คโ€๋ฉฐ โ€œ์ด๋Š” ์ฆ‰์‹œ ํšจ๋ ฅ์„ ๋ฐœํœ˜ํ•œ๋‹คโ€๊ณ  ๋งํ–ˆ์Šต๋‹ˆ๋‹ค. ๊ทธ๋Š” ์ด ๋ช…๋ น์ด ์ตœ์ข…์ ์ด๋ฉฐ ํ™•์ •์ ์ธ ๊ฒƒ์ด๋ผ๊ณ ๋„ ๊ฐ•์กฐํ–ˆ์Šต๋‹ˆ๋‹ค.

ํŠธ๋Ÿผํ”„ โ€œ์ด๋ž€๊ณผ ๊ฑฐ๋ž˜ํ•˜๋ฉด ๊ด€์„ธ 25% ๋ถ€๊ณผโ€โ€ฆ์ด๋ž€ ์ •๊ถŒ...

0
0
0
0
0

์ €๋Š” ์„ธ์…˜ ์ถœ๋ฐœ ์ „ ์บ๋ฆญํ„ฐ์˜ ๋ฐฑ๊ทธ๋ผ์šด๋“œ๋ฅผ ์งœ๋†“๋Š” ๊ฑธโ€ฆ ์ผ์ข…์˜ ์ฒญ์‚ฌ์ง„๊ณผ ํ”Œ๋ ˆ์ด๋ฅผ ํ•  ๋•Œ์˜ ๋‚˜๋ฅผ ์œ„ํ•œ RP๊ฐ€์ด๋“œ๋ฅผ ๋งŒ๋“ค์–ด๋†“๋Š”๋‹ค๋Š” ๋А๋‚Œ์œผ๋กœ ์ƒ๊ฐํ•˜๊ณ  ์žˆ์–ด์š”.

๊ทธ๋ž˜์„œ ์ธ์ œ ํ”Œ ๋“ค์–ด๊ฐ€๋ฉด ์‹ค์ œ ์ฒญ์‚ฌ์ง„๊ณผ ๋‹ค๋ฅธ ๋ถ€๋ถ„์ด ์ƒ๊ธฐ๊ธฐ๋„, ์ฒญ์‚ฌ์ง„๋Œ€๋กœ ๊ตด๋Ÿฌ๊ฐ€๋Š” ๋ถ€๋ถ„์ด ์ƒ๊ธฐ๊ธฐ๋„ ํ•˜๋Š”๊ฑฐ์ง€์š”.

0
1

์„ธ์ƒ์˜ ์˜จ๊ฐ– ๋ถˆ์˜์— ํ•˜๋‚˜ํ•˜๋‚˜ ํ™”๊ฐ€ ๋‚  ๋•Œ๋ฉด, ๊ทธ ๋ถˆ์˜๊ฐ€ ๋ชจ๋‘ ํ•ด์†Œ๋˜๋Š” ๋‚ ์€ ์ ˆ๋Œ€๋กœ ์˜ค์ง€ ์•Š๋Š”๋‹ค๋Š” ์‚ฌ์‹ค์„ ๋˜๋‡Œ์ด๋ฉฐ ๋งˆ์Œ์„ ๊ฐ€๋ผ์•‰ํž ํ•„์š”๋„ ์žˆ๋‹ค๊ณ  ๋ณธ๋‹ค. ๊ทธ๋Ÿฐ ์ด์ƒ์  ์ƒํƒœ๋Š” ์„ค๋ น ์ „์ง€์  ๋งŒ์กฑ์ž์ธ ๋‚ด๊ฒŒ ์ „๋Šฅ์˜ ํž˜์ด ์ฃผ์–ด์ง„๋‹ค๊ณ  ํ•ด๋„ ์–ป์–ด์ง€๋Š” ๊ฒƒ์ด ์•„๋‹ˆ๊ธฐ ๋•Œ๋ฌธ์ด๋‹ค.

0

ไธ€็•ชใใ‚„ใ—ใ„ใฎใฏใ‚นใƒผใƒ‘ใƒผใซ่กŒใๆ™‚ใจใ‹
ๅฟ…ใšใƒžใ‚นใ‚ฏใ‚’ใ—ใฆใ„ใ‚‹ใฎใซ้ขจ้‚ชใ‚’ๆ‹พใฃใฆใใŸใ“ใจใงใ™
ๅผฑใ„โ€ฆ๏ผๅผฑใ™ใŽใ‚‹ใ“ใฎไฝ“โ€ฆ๏ผ
โ€‹:blobcat_aomuke:โ€‹โ€‹:twinkle:โ€‹

1
1
0
0

[๋‹จ๋…]๊ณต์ •์œ„, ์ฟ ํŒก ๋ณธ์‚ฌ ๋Œ€๋Œ€์  ํ˜„์žฅ์กฐ์‚ฌโ€ฆโ€˜์ด์ˆ˜ ์ง€์ •ยทํ”Œ๋žซํผ ์ง€์œ„ ์•…์šฉโ€™ ์ •์กฐ์ค€ www.khan.co.kr/article/2026... โ€œ13์ผ ์—…๊ณ„์— ๋”ฐ๋ฅด๋ฉด ๊ณต์ •์œ„ ๊ธฐ์—…์ง‘๋‹จ๊ตญยท์‹œ์žฅ๊ฐ์‹œ๊ตญยท์œ ํ†ต๋Œ€๋ฆฌ์ ๊ตญ์€ ์ด๋‚  ์˜ค์ „ ์„œ์šธ ์†กํŒŒ๊ตฌ ์ฟ ํŒก ๋ณธ์‚ฌ์— ์กฐ์‚ฌ๊ด€์„ ํŒŒ๊ฒฌํ•ด ๊ด€๋ จ ์ž๋ฃŒ ํ™•๋ณด์— ๋‚˜์„ฐ๋‹ค. ํ†ต์ƒ ํŠน์ • ๋ถ€์„œ๊ฐ€ ์กฐ์‚ฌ๋ฅผ ์ฃผ๋„ํ•˜๋Š” ๊ฒƒ๊ณผ ๋‹ฌ๋ฆฌ, ์ด๋ฒˆ์—๋Š” ๊ธฐ์—…์ง‘๋‹จ๊ตญ์„ ํฌํ•จํ•œ 3๊ฐœ๊ตญ์ด ๋™์‹œ์— ํˆฌ์ž…๋๋‹ค๋Š” ์ ์—์„œ ์กฐ์‚ฌ ๊ฐ•๋„๊ฐ€ ๋งค์šฐ ๋†’๋‹ค๋Š” ๋ถ„์„์ด ๋‚˜์˜จ๋‹ค.โ€

[๋‹จ๋…]๊ณต์ •์œ„, ์ฟ ํŒก ๋ณธ์‚ฌ ๋Œ€๋Œ€์  ํ˜„์žฅ์กฐ์‚ฌโ€ฆโ€˜์ด์ˆ˜ ์ง€์ •...

[๋‹จ๋…]๊ณต์ •์œ„, ์ฟ ํŒก ๋ณธ์‚ฌ ๋Œ€๋Œ€์  ํ˜„์žฅ์กฐ์‚ฌโ€ฆโ€˜์ด์ˆ˜ ์ง€์ •ยทํ”Œ๋žซํผ ์ง€์œ„ ์•…์šฉโ€™ ์ •์กฐ์ค€

๊ณต์ •๊ฑฐ๋ž˜์œ„์›ํšŒ๊ฐ€ ์ฟ ํŒก์„ ๋Œ€์ƒ์œผ๋กœ ๋Œ€๋Œ€์ ์ธ ํ˜„์žฅ์กฐ์‚ฌ์— ์ฐฉ์ˆ˜ํ–ˆ๋‹ค. 13์ผ ์—…๊ณ„์— ๋”ฐ๋ฅด๋ฉด ๊ณต์ •์œ„ ๊ธฐ์—…์ง‘๋‹จ๊ตญยท์‹œ์žฅ๊ฐ์‹œ๊ตญยท์œ ํ†ต๋Œ€๋ฆฌ์ ๊ตญ์€ ์ด๋‚  ์˜ค์ „ ์„œ์šธ ์†กํŒŒ๊ตฌ ์ฟ ํŒก ๋ณธ์‚ฌ์— ์กฐ์‚ฌ๊ด€์„ ํŒŒ๊ฒฌํ•ด ๊ด€๋ จ ์ž๋ฃŒ ํ™•๋ณด์— ๋‚˜์„ฐ๋‹ค. ํ†ต์ƒ ํŠน์ • ๋ถ€์„œ๊ฐ€ ์กฐ์‚ฌ๋ฅผ ์ฃผ๋„ํ•˜๋Š” ๊ฒƒ๊ณผ ๋‹ฌ๋ฆฌ, ์ด๋ฒˆ์—๋Š” ๊ธฐ์—…์ง‘๋‹จ๊ตญ์„ ํฌํ•จํ•œ 3๊ฐœ๊ตญ์ด ๋™์‹œ์— ํˆฌ์ž…๋๋‹ค๋Š” ์ ์—์„œ ์กฐ์‚ฌ ๊ฐ•๋„๊ฐ€ ๋งค์šฐ ๋†’๋‹ค๋Š” ๋ถ„์„์ด ๋‚˜์˜จ๋‹ค...

www.khan.co.kr ยท ๊ฒฝํ–ฅ์‹ ๋ฌธ

0

Your CLI's completion should know what options you've already typed

ๆดช ๆฐ‘ๆ†™ (Hong Minhee) @hongminhee@hackers.pub

Consider Git's -C option:

git -C /path/to/repo checkout <TAB>

When you hit Tab, Git completes branch names from /path/to/repo, not your current directory. The completion is context-awareโ€”it depends on the value of another option.

Most CLI parsers can't do this. They treat each option in isolation, so completion for --branch has no way of knowing the --repo value. You end up with two unpleasant choices: either show completions for all possible branches across all repositories (useless), or give up on completion entirely for these options.

Optique 0.10.0 introduces a dependency system that solves this problem while preserving full type safety.

Static dependencies with or()

Optique already handles certain kinds of dependent options via the or() combinator:

import { flag, object, option, or, string } from "@optique/core";

const outputOptions = or(
  object({
    json: flag("--json"),
    pretty: flag("--pretty"),
  }),
  object({
    csv: flag("--csv"),
    delimiter: option("--delimiter", string()),
  }),
);

TypeScript knows that if json is true, you'll have a pretty field, and if csv is true, you'll have a delimiter field. The parser enforces this at runtime, and shell completion will suggest --pretty only when --json is present.

This works well when the valid combinations are known at definition time. But it can't handle cases where valid values depend on runtime inputโ€”like branch names that vary by repository.

Runtime dependencies

Common scenarios include:

  • A deployment CLI where --environment affects which services are available
  • A database tool where --connection affects which tables can be completed
  • A cloud CLI where --project affects which resources are shown

In each case, you can't know the valid values until you know what the user typed for the dependency option. Optique 0.10.0 introduces dependency() and derive() to handle exactly this.

The dependency system

The core idea is simple: mark one option as a dependency source, then create derived parsers that use its value.

import {
  choice,
  dependency,
  message,
  object,
  option,
  string,
} from "@optique/core";

function getRefsFromRepo(repoPath: string): string[] {
  // In real code, this would read from the Git repository
  return ["main", "develop", "feature/login"];
}

// Mark as a dependency source
const repoParser = dependency(string());

// Create a derived parser
const refParser = repoParser.derive({
  metavar: "REF",
  factory: (repoPath) => {
    const refs = getRefsFromRepo(repoPath);
    return choice(refs);
  },
  defaultValue: () => ".",
});

const parser = object({
  repo: option("--repo", repoParser, {
    description: message`Path to the repository`,
  }),
  ref: option("--ref", refParser, {
    description: message`Git reference`,
  }),
});

The factory function is where the dependency gets resolved. It receives the actual value the user provided for --repo and returns a parser that validates against refs from that specific repository.

Under the hood, Optique uses a three-phase parsing strategy:

  1. Parse all options in a first pass, collecting dependency values
  2. Call factory functions with the collected values to create concrete parsers
  3. Re-parse derived options using those dynamically created parsers

This means both validation and completion work correctlyโ€”if the user has already typed --repo /some/path, the --ref completion will show refs from that path.

Repository-aware completion with @optique/git

The @optique/git package provides async value parsers that read from Git repositories. Combined with the dependency system, you can build CLIs with repository-aware completion:

import {
  command,
  dependency,
  message,
  object,
  option,
  string,
} from "@optique/core";
import { gitBranch } from "@optique/git";

const repoParser = dependency(string());

const branchParser = repoParser.deriveAsync({
  metavar: "BRANCH",
  factory: (repoPath) => gitBranch({ dir: repoPath }),
  defaultValue: () => ".",
});

const checkout = command(
  "checkout",
  object({
    repo: option("--repo", repoParser, {
      description: message`Path to the repository`,
    }),
    branch: option("--branch", branchParser, {
      description: message`Branch to checkout`,
    }),
  }),
);

Now when you type my-cli checkout --repo /path/to/project --branch <TAB>, the completion will show branches from /path/to/project. The defaultValue of "." means that if --repo isn't specified, it falls back to the current directory.

Multiple dependencies

Sometimes a parser needs values from multiple options. The deriveFrom() function handles this:

import {
  choice,
  dependency,
  deriveFrom,
  message,
  object,
  option,
} from "@optique/core";

function getAvailableServices(env: string, region: string): string[] {
  return [`${env}-api-${region}`, `${env}-web-${region}`];
}

const envParser = dependency(choice(["dev", "staging", "prod"] as const));
const regionParser = dependency(choice(["us-east", "eu-west"] as const));

const serviceParser = deriveFrom({
  dependencies: [envParser, regionParser] as const,
  metavar: "SERVICE",
  factory: (env, region) => {
    const services = getAvailableServices(env, region);
    return choice(services);
  },
  defaultValues: () => ["dev", "us-east"] as const,
});

const parser = object({
  env: option("--env", envParser, {
    description: message`Deployment environment`,
  }),
  region: option("--region", regionParser, {
    description: message`Cloud region`,
  }),
  service: option("--service", serviceParser, {
    description: message`Service to deploy`,
  }),
});

The factory receives values in the same order as the dependency array. If some dependencies aren't provided, Optique uses the defaultValues.

Async support

Real-world dependency resolution often involves I/Oโ€”reading from Git repositories, querying APIs, accessing databases. Optique provides async variants for these cases:

import { dependency, string } from "@optique/core";
import { gitBranch } from "@optique/git";

const repoParser = dependency(string());

const branchParser = repoParser.deriveAsync({
  metavar: "BRANCH",
  factory: (repoPath) => gitBranch({ dir: repoPath }),
  defaultValue: () => ".",
});

The @optique/git package uses isomorphic-git under the hood, so gitBranch(), gitTag(), and gitRef() all work in both Node.js and Deno.

There's also deriveSync() for when you need to be explicit about synchronous behavior, and deriveFromAsync() for multiple async dependencies.

Wrapping up

The dependency system lets you build CLIs where options are aware of each otherโ€”not just for validation, but for shell completion too. You get type safety throughout: TypeScript knows the relationship between your dependency sources and derived parsers, and invalid combinations are caught at compile time.

This is particularly useful for tools that interact with external systems where the set of valid values isn't known until runtime. Git repositories, cloud providers, databases, container registriesโ€”anywhere the completion choices depend on context the user has already provided.

This feature will be available in Optique 0.10.0. To try the pre-release:

deno add jsr:@optique/core@0.10.0-dev.311

Or with npm:

npm install @optique/core@0.10.0-dev.311

See the documentation for more details.

Read more โ†’
5

์„ธ์ƒ ์‚ฌ๋žŒ๋“ค ๋ชจ๋‘๊ฐ€ ๋‚˜๋งŒํผ์€ ๋ฉ์ฒญํ•˜๋‹ค๋Š” ์‚ฌ์‹ค์„ ์˜์‹์ ์œผ๋กœ ๊ณ„์† ๋จธ๋ฆฌ์†์— ์ฃผ์ž…ํ•˜๊ณ  ์‚ด๋ฉด, ์ƒ๋‹นํžˆ ๋งŽ์€ ์ŠคํŠธ๋ ˆ์Šค๊ฐ€ ์˜ˆ๋ฐฉ๋˜๋Š” ๊ฒƒ ๊ฐ™๋‹ค. ๋•Œ๋กœ ์–ด๋–ค ์ •์ƒ์„ฑ๊ณผ ์œ ๋Šฅํ•จ์ด๋ผ๋Š” ๊ฑด ์œ ๋ฌผ๋ก ์ ์œผ๋กœ ์กด์žฌํ•  ์ˆ˜ ์—†๋Š” ์‹ ์•™์  ์ƒ์ƒ์— ๋จธ๋ฌผ๊ณ  ๋งŒ๋‹ค๋Š” ์ ์„ ์ธ์ •ํ•˜๊ณ  ๋‚˜๋ฉด, ์˜จ๊ฐ– ํ—›๋œ ๊ธฐ๋Œ€์™€ ๋ง๋…์—์„œ ์ผ๋ถ€ ๋ฒ—์–ด๋‚  ์ˆ˜ ์žˆ๋‹ค.

0
0
0
0
0
1
0
1

[์ด์ƒ๊ทœ ๋ชจ๋‘๋ฅผ์œ„ํ•œ์„œ์šธํŠน์œ„์žฅ ๋ธŒ๋ฆฌํ•‘] ์„œ์šธ๋ฒ„์ŠคํŒŒ์—… ์‚ฌํƒœ, ์ˆ˜์ˆ˜๋ฐฉ๊ด€ํ•˜๋Š” ์„œ์šธ์‹œ๋ฅผ ๊ทœํƒ„ํ•œ๋‹ค. jinboparty.com/pages/?p=15&... ์˜ค๋Š˜ ๋ฒ„์ŠคํŒŒ์—… ์‚ฌํƒœ๋กœ ์‹œ๋ฏผ๋“ค์˜ ๋ถˆํŽธ์„ ๊ฒช๊ฒŒ ํ•œ ์„œ์šธ์‹œ๋ฅผ ๊ฐ•๋ ฅํžˆ ๊ทœํƒ„ํ•ฉ๋‹ˆ๋‹ค. ์ฒซ์งธ, ๋ฒ•์  ์˜๋ฌด๋ฅผ โ€˜ํ˜‘์ƒ ์นด๋“œโ€™๋กœ ๋ฏธ๋ฃจ๋Š” ์„œ์šธ์‹œ์˜ ๊ณ ์งˆ์  ๋ณ‘ํ๊ฐ€ ๋ฌธ์ œ์ž…๋‹ˆ๋‹ค. ๋‘˜์งธ, ์ค€๊ณต์˜์ œ์˜ ์‹ค์งˆ ์ฑ…์ž„์ž๊ฐ€ ๋’ค๋กœ ๋น ์ง€๋Š” ํƒœ๋„๊ฐ€ ๋ฌธ์ œ์ž…๋‹ˆ๋‹ค. ์…‹์งธ, ์‹œ๋ฏผ ๋ถˆํŽธ์„ ์ด์šฉํ•œ ๊ฐˆ๋ผ์น˜๊ธฐ, ์˜ค์„ธํ›ˆ ์‹œ์žฅ์˜ ์ „ํ˜•์  ์ˆ˜๋ฒ•์ด์ž ๋‚˜์œ ์ •์น˜๊ฐ€ ๋ฌธ์ œ์ž…๋‹ˆ๋‹ค.

0

๋งˆํฌ ๋ŸฌํŒ”๋กœ, ์™„๋‹ค ์‚ฌ์ดํฌ์Šค, ์ง„ ์Šค๋งˆํŠธ, ์•„๋ฆฌ์•„๋‚˜ ๊ทธ๋ž€๋ฐ ๋“ฑ์ด ์ฐฉ์šฉํ•œ ์ด ํ‘๋ฐฑ ๋ฐฐ์ง€๋Š” ์ง€๋‚œ 1์›” 7์ผ ๋ฏธ๋‹ˆ์• ํด๋ฆฌ์Šค์—์„œ ICE(๋ฏธ๊ตญ ์ด๋ฏผ์„ธ๊ด€๋‹จ์†๊ตญ) ์š”์›์˜ ์ด๊ฒฉ์œผ๋กœ ์‚ฌ๋งํ•œ 37์„ธ ์—ฌ์„ฑ ๋ฅด๋„ค ๊ตฟ์„ ์ถ”๋ชจํ•˜๊ธฐ ์œ„ํ•œ ๊ฒƒ์ด๋‹ค. ์ตœ์ข…์ˆ˜์ • 2026-01-12 17:48 news.nate.com/view/2026011...

"ICE์•„์›ƒ"์•„๋ฆฌ์•„๋‚˜ ๊ทธ๋ž€๋ฐยท๋งˆํฌ๋ŸฌํŒ”๋กœ ๊ณจ๋“ ๊ธ€๋กœ๋ธŒ์—์„œ ...

0
0
0
0

Sysadmin life hack: check /root/.mysql_history for the initial root password update before going through the whole "start server with --skip-grant-tables --skip-networking" song and dance.

Security advice: clear your various ~/.*history files every now and again. Especially after you do something sensitive. (Inb4 OpenBSD users are all "or just don't use shells that store history")

0
0

์„œ์šธ์‹œ ์ •์น˜ ์š•

์˜ค์„ธํ›ˆ์ด๋Š” ๋งจ๋‚  ๋ณด์—ฌ์ฃผ๊ธฐ ํ–‰์ •๋งŒ ํ•˜๋”๋‹ˆ ๋ฒ„์Šค ํŒŒ์—…์ด๋‚˜ ์ผ์œผํ‚ค๊ณ โ€ฆ ์•„์ง ํ˜‘์ƒํ•˜์ž๋Š” ์ด์•ผ๊ธฐ๋„ ์•ˆ ๊บผ๋ƒˆ๋‹ค๋˜๋ฐ ๋ญํ•˜๋Š” ๋†ˆ์ธ์ง€ ๋ชจ๋ฅด๊ฒ ์–ด์š”.
0
0

๋งˆํฌ ๋ŸฌํŒ”๋กœ, ์™„๋‹ค ์‚ฌ์ดํฌ์Šค, ์ง„ ์Šค๋งˆํŠธ, ์•„๋ฆฌ์•„๋‚˜ ๊ทธ๋ž€๋ฐ ๋“ฑ์ด ์ฐฉ์šฉํ•œ ์ด ํ‘๋ฐฑ ๋ฐฐ์ง€๋Š” ์ง€๋‚œ 1์›” 7์ผ ๋ฏธ๋‹ˆ์• ํด๋ฆฌ์Šค์—์„œ ICE(๋ฏธ๊ตญ ์ด๋ฏผ์„ธ๊ด€๋‹จ์†๊ตญ) ์š”์›์˜ ์ด๊ฒฉ์œผ๋กœ ์‚ฌ๋งํ•œ 37์„ธ ์—ฌ์„ฑ ๋ฅด๋„ค ๊ตฟ์„ ์ถ”๋ชจํ•˜๊ธฐ ์œ„ํ•œ ๊ฒƒ์ด๋‹ค. ์ตœ์ข…์ˆ˜์ • 2026-01-12 17:48 news.nate.com/view/2026011...

"ICE์•„์›ƒ"์•„๋ฆฌ์•„๋‚˜ ๊ทธ๋ž€๋ฐยท๋งˆํฌ๋ŸฌํŒ”๋กœ ๊ณจ๋“ ๊ธ€๋กœ๋ธŒ์—์„œ ...

0
0
1

่‹ฑๅœ‹่ถณ็ธฝๆฏ็ฌฌๅ››่ผชๆŠฝ็ฑค
WrexhamๅฐIpswitch Town

Wrexhamๆ˜ฏๆญปไพRyan Reynolds็š„็ƒ้šŠ๏ผŒIpswitchๆ˜ฏEd Sheeran็š„็ƒ้šŠ

Disney+ๆœ‰ไธ€้ƒจ็ด€้Œ„็‰‡่ชชๆญปไพๅฆ‚ไฝ•ๆ•‘ไบ†Wrexham้€™้šŠๆœฌไพ†ไธ€็‰‡็ต•ๆœ›็š„็ƒ้šŠ๏ผ›Ipswitchๅ‰‡ๆ˜ฏๆŠŠ17่™Ÿ็•™็ตฆEd้€™ไฝๆฑๅฎถ

0

ใ„ใพใ˜ใ‚ƒใ‚‚ใ†ใŸใถใ‚“ใ‘ใฃใ“ใ†ใชใƒฌใ‚ขใ‚‚ใฎใซใชใฃใฆใ‚‹ใจๆ€ใ†ใ€่‡ชๅˆ†็š„ๅฎ็‰ฉใฎใƒžใ‚คใƒ™ใ‚นใƒˆๆ˜ ็”ปใ€Žๆฅฝๅœ’ใฎ็‘•ใ€ๅˆๆ—ฅๆœฌไธŠๆ˜ ๆ™‚ใฎใƒ‘ใƒณใƒ•ใ€ใ‚„ใฃใจ้กใซๅ…ฅใ‚ŒใŸใ€‚้ฃพใ‚‹ใœใ€‚
ใ“ใฎใƒ‰ใ‚คใƒซใ‚ซใƒกใƒฉใฎๆทฑใ„้’ใจใ‚ณใƒณใƒˆใƒฉใ‚นใƒˆใŒ่‡ชๅˆ†ใฎไธ€ใคใฎ็†ๆƒณใชใ‚“ใ ใ‚ˆใชใƒผใ€‚ใ‚‚ใกใ‚ใ‚“ไธญ่บซ็š„ใซใ‚‚ใ ใ‘ใฉใ€‚
ใใ—ใฆใƒฌใ‚นใƒชใƒผใƒปใƒใƒฃใƒณใ‚ˆๆฐธ้ ใซใ€‚

1
0
0
1
0
1
0
0
0
0
0