Skip to content

feat(request): read the app and body from stdin - #97

Merged
yusukebe merged 1 commit into
nextfrom
feat/stdin
Aug 19, 2026
Merged

feat(request): read the app and body from stdin#97
yusukebe merged 1 commit into
nextfrom
feat/stdin

Conversation

@yusukebe

Copy link
Copy Markdown
Member

Two stdin features for agents (ideas from Yusuke):

  • -d @file reads the request body from a file, -d @- from stdin (curl style)
  • Pass - as the file to read the app code from stdin. No boilerplate needed: app is predefined and exported. Code with its own export default is used as-is
echo 'app.get("/hello", (c) => c.json({ ok: true }))' | hono request - -P /hello
cat payload.json | hono request -P /api -X POST -d @-

- also works for routes and ssg through the shared loader. Using - together with -d @- or --watch is an INVALID_OPTION error.

The author should do the following, if applicable

  • Add tests
  • Run tests
  • pnpm run format:fix && pnpm run lint:fix to format the code
  • Add TSDoc/JSDoc to document the code

@yusukebe
yusukebe merged commit 622404d into next Aug 19, 2026
4 checks passed
@yusukebe
yusukebe deleted the feat/stdin branch August 19, 2026 01:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant