cli-to-server
cli-to-serveris a small Node/Hono adapter that turns a local CLI command surface into callable HTTP endpoints.
The bookmark image shows the intended shape: import convertCliToServer, wrap git, and expose command-shaped HTTP routes such as POST /status -> git status, POST /log -> git log --oneline, and POST /diff -> git diff HEAD~1. The durable idea is an adapter layer for existing command-line tools when the caller expects HTTP. Source: X/@aidenybai, 2026-04-13; Source: local image artifact, reviewed 2026-07-03
Version snapshot
| Field | Value |
|---|---|
| npm package | cli-to-server |
| Latest version | 0.0.2 |
| Published | 2026-04-13 |
| Runtime | Node >=18 |
| License | MIT |
| Depends on | @hono/node-server, hono, commander, cli-to-js@0.0.5 |
| Repository metadata | github.com/aidenybai/cli-to-js |
The npm registry is the current source authority. The package metadata points at github.com/aidenybai/cli-to-js, but that repository returned 404 to GitHub API and git ls-remote on 2026-07-03. Treat the package tarball and npm metadata as the verifiable source until the repository is public again. Source: npm registry, checked 2026-07-03
Routing
Use cli-to-server when a trusted local CLI already owns the behavior and a caller needs an HTTP surface: local demos, agent tool experiments, internal glue, or browser-side calls into a constrained development process.
Do not treat it as a production API boundary by default. A CLI wrapper inherits all the risks of shell execution: command allowlisting, working-directory control, environment leakage, timeouts, auth, logging, and network exposure. If the server crosses a trust boundary, route through Agent Security Model and design explicit authorization, input validation, and process isolation.
This is adjacent to Agent-Native CLIs, not a replacement for it. Agent-native CLIs remain the higher-bandwidth shell path; cli-to-server is useful when the harness, UI, or workflow speaks HTTP.
Timeline
- 2026-07-03 | Promoted from X bookmark artifact review. Added the local screenshot interpretation and npm version snapshot; recorded that the GitHub repository URL in npm metadata was not publicly reachable. Source: X/@aidenybai, 2026-04-13; Source: npm registry, 2026-07-03