Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Features
Speaker Deck
PRO
Sign in
Sign up for free
Search
Search
Introduce Hono CLI
Search
Yusuke Wada
October 18, 2025
Programming
0
280
Introduce Hono CLI
Hono Conference 2025
Oct 18, 2025
Yusuke Wada
October 18, 2025
Tweet
Share
More Decks by Yusuke Wada
See All by Yusuke Wada
私はどうやって技術力を上げたのか
yusukebe
43
18k
Reactをクライアントで使わない
yusukebe
8
6.5k
AI時代のUIはどこへ行く?
yusukebe
22
11k
速いWebフレームワークを作る
yusukebe
5
1.9k
Honoアップデート 2025年夏
yusukebe
1
990
パスタの技術
yusukebe
1
660
AI Ramen Fight
yusukebe
0
180
TypeScriptでDXを上げろ! Hono編
yusukebe
4
1.1k
Honoをフロントエンドで使う 3つのやり方
yusukebe
8
5.1k
Other Decks in Programming
See All in Programming
All About Angular's New Signal Forms
manfredsteyer
PRO
0
160
AI Agent 時代的開發者生存指南
eddie
0
430
Foundation Modelsを実装日本語学習アプリを作ってみた!
hypebeans
0
110
NixOS + Kubernetesで構築する自宅サーバーのすべて
ichi_h3
0
860
いま中途半端なSwift 6対応をするより、Default ActorやApproachable Concurrencyを有効にしてからでいいんじゃない?
yimajo
2
430
開発生産性を上げるための生成AI活用術
starfish719
3
1.1k
スマホから Youtube Shortsを見られないようにする
lemolatoon
27
32k
株式会社 Sun terras カンパニーデック
sunterras
0
310
コードとあなたと私の距離 / The Distance Between Code, You, and I
hiro_y
0
170
大規模アプリのDIフレームワーク刷新戦略 ~過去最大規模の並行開発を止めずにアプリ全体に導入するまで~
mot_techtalk
1
450
なぜGoのジェネリクスはこの形なのか? Featherweight Goが明かす設計の核心
ryotaros
7
1.1k
Writing Better Go: Lessons from 10 Code Reviews
konradreiche
0
1.3k
Featured
See All Featured
CoffeeScript is Beautiful & I Never Want to Write Plain JavaScript Again
sstephenson
162
15k
XXLCSS - How to scale CSS and keep your sanity
sugarenia
248
1.3M
The Pragmatic Product Professional
lauravandoore
36
6.9k
Producing Creativity
orderedlist
PRO
347
40k
Fantastic passwords and where to find them - at NoRuKo
philnash
52
3.4k
A Tale of Four Properties
chriscoyier
161
23k
A better future with KSS
kneath
239
18k
Balancing Empowerment & Direction
lara
4
690
The Art of Programming - Codeland 2020
erikaheidi
56
14k
Build your cross-platform service in a week with App Engine
jlugia
232
18k
Design and Strategy: How to Deal with People Who Don’t "Get" Design
morganepeng
132
19k
We Have a Design System, Now What?
morganepeng
53
7.8k
Transcript
One More Thing
We invent many things Supporting mutilplaform RPC with Types Server-side
JSX HonoX 5 Routers Many Middleware Many Helpers Built with Web Standards
Go with Idea and implementation
Today we (I and @usualoma) will ship
Hono CLI
NOT create-* NOT a command for dev&build&deploy NOT a just
wrapper of Vite
Completely new concept
CLI for Human and AI
$ hono –help
Sub commands
$ hono docs
$ hono docs [path]
$ hono docs /docs/api/routing
Wait! Only this??
Yes But for AI
Display docs with Markdown
$ hono search
$ hono search <query>
$ hono search middleware
Display docs with JSON
AI can search and read docs
$ hono search “basic auth” $ hono docs \ /docs/middleware/builtin/basic-auth
/docs/middleware/builtin/basic-auth
Next
$ hono request
$ hono request [file]
$ hono request src/index.ts
Please imagine app.request()
const res = await app.request(‘/’) GET / Response You don't
need run an actual server!
const res = await app.request(‘/’) $ hono request src/index.ts
Display the response with JSON
$ hono request \ -P /api/users \ -X POST \
-d '{"name":"Alice"}' \ src/index.ts
This means
$ hono search $ hono docs $ hono request AI
can Search docs Read docs Test apps
CLAUDE.md / AGENTS.md etc. Use the `hono` CLI for efficient
development. View all commands with `hono --help`.
Demo
None
These are for AI
Next
For Human
$ hono serve
None
$ hono serve src/index.ts http://localhost:7070
Wait! Only this??
No! —use is super cool
Please imagine app.use()
app.use(middleware) app.use(logger())
app.use(logger())
$ hono serve \ –use “logger()” \ src/index.ts
None
$ hono serve \ --use "logger()" \ --use "basicAuth({username:'foo',password:'bar'})" \
src/index.ts
404 Not Found
$ hono serve \ --use "serveStatic({root:'./'})"
$ hono serve \ --use '(c) => proxy(`https://ramen-api.dev${new URL(c.req.url).pathname}`)'
Last
$ hono optimize
$ hono optimize [entry]
Let’s talk about routers before hono optimize
RegExpRouter is one of the fastest routers in JavaScript world
The idea Routes (dynamic path) RegExp Request Buid Match
Weak points 1. Initialization is slow 2. The file size
is large
The solutions 1. LinearRouter (hono/quick) 2. PatternRouter (hono/tiny)
But I want to use RegExpRouter!
Now we introduce a new (7th) router
PreparedRegExpRouter
The idea Routes Routing information with RegExp new PreaparedRegExpRouter() Create
at preparing phase Hard code!
None
None
Benchmark with initialization
https://github.com/honojs/hono/pull/1796
None
PreparedRegExpRoute r is 16.5× faster than RegExpRouter
Back to Hono CLI
$ hono optimize will create optimized Hono for your app
What is optimized Hono?
This
None
$ hono optimize src/index.ts $ wrangler deploy dist/index.js
How small has it become??
None
Size drops from 18.0 kB to 11.14 kB (38% smaller!)
will your app fast and small $ hono optimize
That’s all
We introduce Hono CLI with 5 sub commands
1. hono docs 2. hono search 3. hono request 4.
hono serve 5. hono optimize
For Human and AI
github.com/honojs/cli
npm i @hono/cli
The end!