
簡単で、安全で優雅なコマンドラインフレームワークをタイプして下さい。 エージェントのCLIフレームワーク
概要
aPI をビルドするような CLI を構築します。 タイプ安全、チェーン可能な、ゼロの依存関係。 goke は、Hono のような API で TypeScript CLI フレームワークです。 ルートのミドルウェアと.command() 用の .use() をチェーンする — REST API と同じメンタルモデルで、ターミナルに適用される。 - — — .use() はミドルウェア、 .command() はハンドラを処理します。 REST API を設計するのと同じ方法で CLI をビルドします。 - Zod スキーマを .option() に渡し、自動 coercion、TypeScript 推論、ヘルプテキストを無料で取得します。 Valibot、ArkType、または標準スキーマライブラリで動作します。 - — @goke/mcp は MCP サーバーに接続し、ツールを発見し、タイプされた CLI コマンドを自動的に生成します。 - — —CLI 全体が MCP サーバーとして、 @goke/mcp から createMcpAction({ cli }) で公開します。 すべてのコマンドは、Claudeデスクトップ、Cursor、VSコード、およびMCPクライアントの準備ができています。 - — cli.createJustBashCommand() は、CLI をサンドボックス化された JustBash コマンドとして公開します。 同じアクションコード、変更は必要ありません.
概要(AI 翻訳)
ログイン API をビルドするような CLI を構築します。 タイプ安全、チェーン可能な、ゼロの依存関係。
goke は、Hono のような API で TypeScript CLI フレームワークです。 ルートのミドルウェアと.command()のチェーン[.use()]]は、ターミナルに適用されるREST APIと同じメンタルモデルです。
##特徴
- Hono-like チェーン — [
.use()] ミドルウェア、ハンドラの[.command()]]。 REST API を設計するのと同じ方法で CLI をビルドします。 -Zod 型安全 — Zod スキーマを.option()に渡し、自動の coercion、TypeScript の推論を得、テキストを無料でヘルプします。 Valibot、ArkType、または標準スキーマライブラリで動作します。 - MCP サーバーから**CLI —
@goke/mcpは、MCP サーバーに接続し、ツールを発見し、タイプされた CLI コマンドを自動的に生成します。 - [
@goke/mcp] から [createMcpAction({ cli })] で、CLI 全体を MCP サーバーとして公開します。 すべてのコマンドは、Claudeデスクトップ、Cursor、VSコード、およびMCPクライアントの準備ができています。 - JustBashサポート — [
cli.createJustBashCommand()]は、CLIをサンドボックス化されたJustBashコマンドとして公開します。 同じアクションコード、変更は必要ありません.
このページは AI により自動翻訳されています。技術的な詳細は原文をご確認ください。
README
以下は原文 README の抜粋です。原文を見る。
goke is a TypeScript CLI framework with a Hono-like API. You chain .use() for middleware and .command() for routes — the same mental model as a REST API, applied to the terminal.
import { goke } from 'goke'
import { z } from 'zod'
const cli = goke('deploy')
// middleware — runs before every command
cli
.option('--env ', z.enum(['staging', 'production']).default('staging').describe('Target environment'))
.use((options, { console }) => {
console.log(`Environment: ${options.env}`)
})
// commands — like route handlers
cli
.command('up', 'Deploy the app')
.option('--dry-run', 'Preview without deploying')
.action((options, { console, process }) => {
console.log(`Deploying from ${process.cwd}`)
})
cli
.command('logs ', 'Stream logs')
.option('--lines ', z.number().default(100).describe('Lines to tail'))
.action((id, options) => streamLogs(id, options.lines))
cli.help()
cli.completions()
cli.parse()
Features
- Hono-like chaining —
.use()for middleware,.command()for handlers. Build a CLI the same way you’d design a REST API. - Zod type safety — pass a Zod schema to
.option()and get automatic coercion, TypeScript inference, and help text for free. Works with Valibot, ArkType, or any Standard Schema library. - CLI from any MCP server —
@goke/mcpconnects to an MCP server, discovers tools, and generates typed CLI commands automatically. - MCP server in 2 lines — expose your entire CLI as an MCP server with
createMcpAction({ cli })from@goke/mcp. Every command becomes a tool, ready for Claude Desktop, Cursor, VS Code, and any MCP client. - JustBash support —
cli.createJustBashCommand()exposes your CLI as a sandboxed JustBash command. Same action code, no changes needed. - Space-separated subcommands —
git remote add,mcp login,db migrate— multi-word commands work out of the box. - Injected
{ fs, console, process }— commands receive a portable runtime context. Swap it in tests, or let JustBash replace it with a sandbox. No global side effects. - Shell completions —
cli.completions()adds Tab completion for zsh and bash. Install once withmycli completions install; completions stay up-to-date automatically because the shell calls the binary on every Tab press. - Zero runtime dependencies — install
gokewithout pulling extra runtime packages into your CLI.
推奨ツール
別のキーワードを試すか、フィルタを外してください。
インストール
npx skillfish add remorses/goke