Skip to content

New concept #77

Description

@yusukebe

I thought long about this Hono CLI. You might think Hono CLI seems to have faded out, as it is. BUT make it completely for AI, especially an AI coding agent, Hono CLI will get brilliant. Make a skill to use Hono CLI; use it in your coding agent. The agent will debug your application, build it, and benchmark it with Hono CLI instead of a human.

What's changed

Default output is JSON

Make the default output as JSON for AI. If humans want to see the result, use the --plain option.

Remove commands accessing remote resources

Sometimes using the CLI to access remote resources can be dangerous. Current Hono CLI commands search and docs access the remote https://hono.dev. With them, for instance, a security scanner like Snyk may detect a security issue. As a result, the skill using the current Hono CLI is marked as having risk: https://www.skills.sh/yusukebe/hono-skill/hono/security/snyk

Image

Let's remove search and docs. If you want an agent to read the docs, you can use the "Web Fetch" function in the agent.

Remove serve

serve is just for humans. We can remove it.

Add --runtime option to request

It's not super related to this topic, but I want to add specifying the runtime environment to the request command. Now the candidates are:

  • Cloudflare Workers
  • Bun
  • Deno
  • Node.js

If an agent wants to request your application on Cloudflare Workers, the agent can run request --runtime cloudflare.

optimize to build

Change the thought to an AI agent to "build," not only optimization. If AI can deploy, AI should want to build. If so, it's not enough just "optimization". And we can add --optimize option to the build command.

New commands

I propose the following new commands:

  • routes - Show all endpoints of the app like showRoutes()
  • ssg - Generate static files for your application. Using SSG Helper inside.
  • benchmark - Measure the performance of your app without running the server, and just send Request to the app and get Response.

agent-context

And I want to add the agent-context command. This command is inspired by the cf command from Cloudflare. The agent-context subcommand shows a list of command usage in Markdown format.

All commands

We will have the following commands:

  • hono agent-context
  • hono routes
  • hono request
  • hono ssg
  • hono build
  • hono benchmark

Next

The current Hono CLI version is 0.1. We can make 0.2 with this new concept.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions