AIニュース最前線
最新ニュースAI日報Hacker日報週報動画AIツールトレンド企業

AIニュース最前線

世界中のAI最新情報を日本語で毎時更新

最新ニュース日報トレンド企業プレミアムRSS
© 2026 ainew.jp特定商取引法に基づく表記
ニュース一覧元記事を開く
Cloudflare Blog·2026年4月13日 23:29·約11分で読める

Cloudflare全体のためのCLI構築

#AIエージェント#開発者ツール#API自動生成#インフラストラクチャー・アズ・コード#Cloudflare#CLI
TL;DR

Cloudflareは、エージェントの需要に対応するため、全製品をカバーする新しいCLI「cf」の技術プレビューを公開し、APIスキーマからの自動生成システムを構築して開発効率の向上を目指している。

AI深層分析2026年4月14日 01:42
4
重要/ 5段階
深度40%
4
関連度30%
5
実用性20%
4
革新性10%
3

キーポイント

1

エージェント向けCLIの拡充

エージェントが主要なAPI利用者となっている状況を踏まえ、Cloudflareは全製品をCLIで操作可能にする「cf」の技術プレビューを公開した。

2

自動生成システムの構築

製品開発の迅速なペースに対応するため、OpenAPIスキーマからCLIコマンド、設定、バインディングAPIなどを自動生成する新しいシステムを構築した。

3

既存ツールとの統合計画

現在の「cf」は製品の一部のみをサポートしているが、将来的には既存のWrangler CLIと統合し、全API表面をカバーする計画である。

4

開発者体験の向上

エージェントと人間の両方にとって使いやすい出力を目指し、各製品のコマンドを意図的にレビュー・調整している。

5

TypeScriptスキーマの導入

OpenAPIスキーマでは表現できないCLIコマンドや複合アクション、RPC APIなどを定義するために、Cloudflareは独自のTypeScriptスキーマを導入した。これは単なるTypeScript型の集合であり、一貫性を保つための規約とガードレールが設けられている。

6

CLIの一貫性とコンテキストエンジニアリング

エージェントはCLIの一貫性を期待しており、大規模な組織では手動での一貫性確保は困難である。そのため、スキーマ層でルールとガードレールを強制し、コマンド名やオプションの命名を統一している。

7

Local Explorerのリリース

WranglerとCloudflare ViteプラグインでオープンベータとしてLocal Explorerをリリース。ローカル開発時にWorkerが使用するシミュレートされたリソース(KV、R2、D1など)をイントロスペクトできる。

影響分析・編集コメントを表示

影響分析

この取り組みは、AIエージェントが開発ワークフローの中心となる時代に向けた重要なインフラ整備であり、開発者の生産性向上とエージェントの活用促進に寄与する。また、大規模APIの管理における自動生成システムの重要性を示している。

編集コメント

AIエージェントの実用化が進む中、開発者ツールの進化がどのようにワークフローを変えるか注目すべき事例。大規模APIの管理課題に対する技術的アプローチも参考になる。

Cloudflare には広大な API の表面があります。私たちは 100 を超える製品を持っており、HTTP API オペレーションは約 3,000 に及びます。

現在、API の主要な顧客はエージェント(AI エージェント)になりつつあります。開発者はコーディングエージェントを連れてきて、アプリケーション、エージェント、プラットフォームを Cloudflare に構築・デプロイし、アカウントを設定し、分析やログのために当社の API をクエリします。

私たちは、Cloudflare のすべての製品を、エージェントが必要とするあらゆる方法で提供したいと考えています。例えば、現在では Cloudflare の全 API を、1,000 トークン未満で動作する単一の Code Mode MCP サーバーとして提供しています。しかし、カバーすべき範囲はまだ広いです。CLI コマンドです。Workers Bindings(ローカル開発およびテスト用の API を含む)。複数の言語にわたる SDK。設定ファイル。Terraform。開発者向けドキュメント。API ドキュメントおよび OpenAPI スキーマ。Agent Skills(エージェントスキル)です。

現在、当社の製品の多くはこれらのインターフェースすべてで利用できません。特に CLI である Wrangler がそうです。Cloudflare の多くの製品には、Wrangler における CLI コマンドがありません。そして、エージェントは CLI を好みます。

そこで、Wrangler CLI を再構築し、Cloudflare 全体の CLI とすることを目指しています。これにより、すべての Cloudflare 製品のコマンドを提供し、インフラストラクチャ・アズ・コード(Infrastructure-as-Code)を使用してそれらを一緒に設定できるようになります。

本日、次期 Wrangler の外観を示す初期バージョンを技術プレビューとして公開します。非常に初期段階ですが、私たちはパブリック(公開)での作業を通じて最も優れたフィードバックを得ています。

npx cf を実行することで、本日より Technical Preview の利用が可能です。あるいは、npm install -g cf を実行してグローバルにインストールすることもできます。

現在、cf は Cloudflare 製品の非常に限られたサブセットに対するコマンドのみを提供しています。私たちは、Cloudflare API の全表面をカバーする cf のバージョンのテストを行っており、エージェントと人間の両方にとって使い勝手の良い出力を得るために、各製品のコマンドを意図的にレビューし調整していく予定です。明確に申し上げますと、この Technical Preview は、将来の Wrangler CLI の一部に過ぎません。今後数ヶ月をかけて、あなたが知る愛する Wrangler の他の部分とこれを統合していきます。

Cloudflare における製品の開発ペースの速さに追いつく形でこれを開発するため、コマンド、設定、バインディング API などを生成できる新しいシステムを作成する必要がありました。

スキーマとコード生成パイプラインを第一原理から再考する

私たちはすでに、Cloudflare API の OpenAPI スキーマに基づいて Cloudflare API SDK、Terraform プロバイダー、Code Mode MCP サーバーを生成しています。しかし、CLI、Workers Bindings、wrangler.jsonc 設定、Agent Skills、ダッシュボード、ドキュメントの更新は依然として手動プロセスです。これはすでに誤りやすく、やり取りが多すぎ、次バージョンの CLI で Cloudflare API 全体をサポートするにはスケーラビリティに欠けていました。

image
image

これを実現するには、OpenAPIスキーマで表現できる範囲を超えたものが必要でした。OpenAPIスキーマはREST APIを記述するものですが、私たちが扱うインタラクティブなCLIコマンドには、ローカル開発とAPIリクエストの両方を含む複数のアクションが組み合わさっており、WorkersプラットフォームにビルトインされたRPC APIとして表現されるWorkersバインディング、そしてこれらすべてを結びつけるAgent Skillsやドキュメントが含まれています。

CloudflareではTypeScriptを多用しています。それはソフトウェアエンジニアリングにおける共通言語です。そして私たちは、Cap n’ Web、Code Mode、WorkersプラットフォームにビルトインされたRPCシステムで行っているように、TypeScriptでAPIを表現する方がより適切であることを繰り返し発見しています。

そこで私たちは、インターフェースを生成するために必要なAPIの全範囲、CLIコマンドと引数、およびコンテキストを定義できる新しいTypeScriptスキーマを導入しました。このスキーマ形式は「単に」一貫性を確保するための規約、リンティング、ガードレールを備えたTypeScript型のセットです。しかし、これは私たちの独自フォーマットであるため、今日あるいは将来必要となるあらゆるインターフェースのサポートを容易に拡張可能でありながら、OpenAPIスキーマも生成することができます:

image
image

これまで私たちの焦点は主にこのレイヤーにありました——私たちが欲していたCLIやその他のインターフェースを構築するために必要な「機械」を作ることです。これにより、Cloudflare全体で標準化できることや、特にコンテキストエンジニアリングの観点からCLIを改善できることについて、より大きな夢を描き始めることができます。

AgentsとCLIs——一貫性とコンテキストエンジニアリング

AIエージェントは、CLIが一貫していることを期待します。あるコマンドがリソースに関する情報を取得する構文として info を使用し、別のコマンドが get を使用する場合、エージェントは前者を期待して後者の存在しないコマンドを呼び出してしまいます。数百人、数千人のエンジニアがいる大規模な組織で、多くの製品が存在する場合、レビューを通じて手動で一貫性を強制するのは Swiss cheese(穴だらけ)の状態です。CLIレイヤーでこれを強制することも可能ですが、その場合CLI、REST API、SDK間で命名が異なるため、問題がむしろ悪化する可能性があります。

私たちが最初に実施したことの1つは、スキーマレイヤーで強制されるルールとガードレールを作成し始めたことです。常に get を使用し、決して info は使いません。常に --force を使用し、決して --skip-confirmations は使いません。常に --json を使用し、決して --format は使わず、すべてのコマンドでサポートされます。

Wrangler CLI もまた非常にユニークなもので、シミュレートされたローカルリソースと、D1 データベース、R2 ストレージバケット、KV ネームスペースといったリモートリソースの両方と連携するコマンドおよび設定を提供します。これは、一貫したデフォルトの設定がさらに重要であることを意味します。エージェントがリモートデータベースを修正していると考えているのに、実際にはローカルデータベースにレコードを追加しており、開発者がリモートバインディングを使用してリモートデータベースに対してローカルで開発している場合、エージェントはローカル開発サーバーへのリクエスト時に新しく追加されたレコードが表示されない理由を理解できません。一貫したデフォルト設定と、コマンドがリモートリソースまたはローカルリソースのどちらに適用されるかを明確に示す出力により、エージェントには明示的なガイダンスが提供されます。

ローカルエクスプローラー — リモートでできることは、今ではローカルでも可能

今日、私たちはオープンベータ版として Wrangler および Cloudflare Vite プラグインの両方で利用可能な新機能「Local Explorer」もリリースしました。

Local Explorer を使用すると、ローカル開発時に Worker が使用するシミュレートされたリソース(KV、R2、D1、Durable Objects、Workflows)を内部から確認できます。これらの各リソースに対して Cloudflare API およびダッシュボードを通じて実行できる操作は、同じ基盤となる API 構造によって駆動され、完全にローカル環境でも実行可能です。

長年にわたり、私たちはローカル開発の完全な実現に賭けてきました。それはCloudflare Workersだけでなく、プラットフォーム全体を対象としています。D1を使用する場合、D1はホストされたサーバーレスデータベース製品ですが、追加の設定やツールなしで、バインディングを介してローカルだけでデータベースを実行し通信することができます。Miniflare(私たちのローカル開発プラットフォームエミュレーター)を通じて、Workersランタイムは本番環境と同じAPIをローカル開発でも提供し、ローカルのSQLiteデータベースを使用して同等の機能を実現します。これにより、ネットワークアクセスが必要なくオフラインで動作する高速なテストを記述して実行することが容易になります。

しかしこれまで、ローカルに保存されたデータを把握するには、.wrangler/stateディレクトリのコンテンツを逆エンジニアリングして内部調査するか、サードパーティのツールをインストールする必要がありました。

現在、Wrangler CLIまたはCloudflare Viteプラグインを使用してアプリを実行すると、ローカルエクスプローラーを開くよう促されます(キーボードショートカットはe)。これにより、現在Workerにアタッチされているバインディングとそのデータがどのように保存されているかを確認できるシンプルなローカルインターフェースが提供されます。

Agentを使用してビルドする場合、Local Explorerはエージェントがデータをどのように処理しているかを理解するのに優れた方法であり、ローカル開発サイクルをよりインタラクティブなものにします。スキーマを検証したり、テストレコードをシードしたり、あるいは単純にやり直してDROP TABLEを実行したい場合など、いつでもLocal Explorerを利用できます。

ここで目指しているのは、ローカルデータのみを変更するCloudflare APIのミラーを提供することです。これにより、リモートで使用するのと同じAPIを通じて、すべてのローカルリソースを利用可能になります。さらに、ローカルとリモートでAPIの形状を一致させることで、今後のCLIバージョンでCLIコマンドを実行し、--localフラグを渡すと、コマンドがそのまま機能します。唯一の違いは、コマンドがCloudflare APIのこのローカルミラーに対してリクエストを送信する点です。

本日より、このAPIはWranglerやVite Pluginをサポートするすべてのアプリケーションにおいて/cdn-cgi/explorer/apiで利用可能です。エージェントをこのアドレスに指向させることで、エージェントと対話するだけで、ローカルリソースの管理に必要なOpenAPI仕様を見つけられます。

Cloudflare全体のCLIに関するあなたの希望と夢を教えてください

機械が完成した今、Wranglerの現在の最良の部分を集め、現在可能になったことと組み合わせ、Cloudflare全体を使用するための最適なCLIであるWranglerを作り上げる時です。

npx cfを実行することで、今日から技術プレビューをお試しいただけます。または、npm install -g cfを実行してグローバルにインストールすることもできます。

この非常に初期のバージョンでは、技術プレビューが現在何を行っているかだけでなく、Cloudflare のプラットフォーム全体に対する CLI に対してあなたが何を求めているかについてもフィードバックをいただいています。現在ダッシュボードで数クリック必要であるものを、ワンラインの CLI コマンドとして簡単に実行できればよいのにと思うことや、wrangler.jsonc で設定できたら嬉しい DNS レコードやキャッシュルールのようなもの、そしてエージェントが立ち往生している箇所や、エージェントに使用してほしい CLI コマンドについてお知らせください。

Cloudflare Developers Discord に参加し、CLI にまず何を追加してほしいかをお知らせください。近日中にさらに多くのアップデートをお届けしますので、ご注目ください。

Local Explorer プロジェクトの開始に貴重な貢献をいただいた Emily Shen に感謝します。

原文を表示

Cloudflare has a vast API surface. We have over 100 products, and nearly 3,000 HTTP API operations.

Increasingly, agents are the primary customer of our APIs. Developers bring their coding agents to build and deploy applications, agents, and platforms to Cloudflare, configure their account, and query our APIs for analytics and logs.

We want to make every Cloudflare product available in all of the ways agents need. For example, we now make Cloudflare’s entire API available in a single Code Mode MCP server that uses less than 1,000 tokens. There’s a lot more surface area to cover, though: CLI commands. Workers Bindings — including APIs for local development and testing. SDKs across multiple languages. Our configuration file. Terraform. Developer docs. API docs and OpenAPI schemas. Agent Skills.

Today, many of our products aren’t available across every one of these interfaces. This is particularly true of our CLI — Wrangler. Many Cloudflare products have no CLI commands in Wrangler. And agents love CLIs.

So we’ve been rebuilding Wrangler CLI, to make it the CLI for all of Cloudflare. It provides commands for all Cloudflare products, and lets you configure them together using infrastructure-as-code.

Today we’re sharing an early version of what the next version of Wrangler will look like as a technical preview. It’s very early, but we get the best feedback when we work in public.

You can try the Technical Preview today by running npx cf. Or you can install it globally by running npm install -g cf.

Right now, cf provides commands for just a small subset of Cloudflare products. We’re already testing a version of cf that supports the entirety of the Cloudflare API surface — and we will be intentionally reviewing and tuning the commands for each product, to have output that is ergonomic for both agents and humans. To be clear, this Technical Preview is just a small piece of the future Wrangler CLI. Over the coming months we will bring this together with the parts of Wrangler you know and love.

To build this in a way that keeps in sync with the rapid pace of product development at Cloudflare, we had to create a new system that allows us to generate commands, configuration, binding APIs, and more.

Rethinking schemas and our code generation pipeline from first principles

We already generate the Cloudflare API SDKs, Terraform provider, and Code Mode MCP server based on the OpenAPI schema for Cloudflare API. But updating our CLI, Workers Bindings, wrangler.jsonc configuration, Agent Skills, dashboard and docs is still a manual process. This was already error-prone, required too much back and forth, and wouldn’t scale to support the whole Cloudflare API in the next version of our CLI.

imageimage

To do this, we needed more than could be expressed in an OpenAPI schema. OpenAPI schemas describe REST APIs, but we have interactive CLI commands that involve multiple actions that combine both local development and API requests, Workers bindings expressed as RPC APIs, along with Agent Skills and documentation that ties this all together.

We write a lot of TypeScript at Cloudflare. It’s the lingua franca of software engineering. And we keep finding that it just works better to express APIs in TypeScript — as we do with Cap n’ Web, Code Mode, and the RPC system built into the Workers platform.

So we introduced a new TypeScript schema that can define the full scope of APIs, CLI commands and arguments, and context needed to generate any interface. The schema format is “just” a set of TypeScript types with conventions, linting, and guardrails to ensure consistency. But because it is our own format, it can easily be adapted to support any interface we need, today or in the future, while still also being able to generate an OpenAPI schema:

imageimage

To date most of our focus has been at this layer — building the machine we needed, so that we can now start building the CLI and other interfaces we’ve wanted for years to be able to provide. This lets us start to dream bigger about what we could standardize across Cloudflare and make better for Agents — especially when it comes to context engineering our CLI.

Agents and CLIs — consistency and context engineering

Agents expect CLIs to be consistent. If one command uses <command> info as the syntax for getting information about a resource, and another uses <command> get, the agent will expect one and call a non-existent command for the other. In a large engineering org of hundreds or thousands of people, and with many products, manually enforcing consistency through reviews is Swiss cheese. And you can enforce it at the CLI layer, but then naming differs between the CLI, REST API and SDKs, making the problem arguably worse.

One of the first things we’ve done is to start creating rules and guardrails, enforced at the schema layer. It’s always get, never info. Always --force, never --skip-confirmations. Always --json, never --format, and always supported across commands.

Wrangler CLI is also fairly unique — it provides commands and configuration that can work with both simulated local resources, or remote resources, like D1 databases, R2 storage buckets, and KV namespaces. This means consistent defaults matter even more. If an agent thinks it’s modifying a remote database, but is actually adding records to local database, and the developer is using remote bindings to develop locally against a remote database, their agent won’t understand why the newly-added records aren’t showing up when the agent makes a request to the local dev server. Consistent defaults, along with output that clearly signals whether commands are applied to remote or local resources, ensure agents have explicit guidance.

Local Explorer — what you can do remotely, you can now do locally

Today we are also releasing Local Explorer, a new feature available in open beta in both Wrangler and the Cloudflare Vite plugin.

Local Explorer lets you introspect the simulated resources that your Worker uses when you are developing locally, including KV, R2, D1, Durable Objects and Workflows. The same things you can do via the Cloudflare API and Dashboard with each of these, you can also do entirely locally, powered by the same underlying API structure.

For years we’ve made a bet on fully local development — not just for Cloudflare Workers, but for the entire platform. When you use D1, even though D1 is a hosted, serverless database product, you can run your database and communicate with it via bindings entirely locally, without any extra setup or tooling. Via Miniflare, our local development platform emulator, the Workers runtime provides the exact same APIs in local dev as in production, and uses a local SQLite database to provide the same functionality. This makes it easy to write and run tests that run fast, without the need for network access, and work offline.

But until now, working out what data was stored locally required you to reverse engineer, introspect the contents of the .wrangler/state directory, or install third-party tools.

Now whenever you run an app with Wrangler CLI or the Cloudflare Vite plugin, you will be prompted to open the local explorer (keyboard shortcut e). This provides you with a simple, local interface to see what bindings your Worker currently has attached, and what data is stored against them.

When you build using Agents, Local Explorer is a great way to understand what the agent is doing with data, making the local development cycle much more interactive. You can turn to Local Explorer anytime you need to verify a schema, seed some test records, or just start over and DROP TABLE.

Our goal here is to provide a mirror of the Cloudflare API that only modifies local data, so that all of your local resources are available via the same APIs that you use remotely. And by making the API shape match across local and remote, when you run CLI commands in the upcoming version of the CLI and pass a --local flag, the commands just work. The only difference is that the command makes a request to this local mirror of the Cloudflare API instead.

Starting today, this API is available at /cdn-cgi/explorer/api on any Wrangler- or Vite Plugin- powered application. By pointing your agent at this address, it will find an OpenAPI specification to be able to manage your local resources for you, just by talking to your agent.

Tell us your hopes and dreams for a Cloudflare-wide CLI

Now that we have built the machine, it’s time to take the best parts of Wrangler today, combine them with what’s now possible, and make Wrangler the best CLI possible for using all of Cloudflare.

You can try the technical preview today by running npx cf. Or you can install it globally by running npm install -g cf.

With this very early version, we want your feedback — not just about what the technical preview does today, but what you want from a CLI for Cloudflare’s entire platform. Tell us what you wish was an easy one-line CLI command but takes a few clicks in our dashboard today. What you wish you could configure in wrangler.jsonc — like DNS records or Cache Rules. And where you’ve seen your agents get stuck, and what commands you wish our CLI provided for your agent to use.

Jump into the Cloudflare Developers Discord and tell us what you’d like us to add first to the CLI, and stay tuned for many more updates soon.

Thanks to Emily Shen for her valuable contributions to kicking off the Local Explorer project.

この記事をシェア

関連記事

Cloudflare Blog★42026年6月4日 21:59

Vite 開発元 VoidZero が Cloudflare に参画

Vite や Vitest を開発する企業「VoidZero」がクラウドプロバイダー「Cloudflare」に合流し、同社全従業員も Cloudflare の一員となる。ただし、主要プロジェクトは引き続きオープンソースとして運営される方針を示した。

TLDR AI★42026年5月15日 09:00

Genkit ミドルウェア(10 分読了)

Genkit は、TypeScript や Python など複数の言語に対応し、信頼性の高い AI エージェントアプリケーションを構築するためのフレームワークです。このツールは、生成呼び出しをインターセプトするコンポーザブルフックや、破壊的なツールの実行前に人間が承認を行う機能を提供します。

GitHub Blog★32026年4月29日 03:00

GitHub 初心者向け:Markdown の始め方

GitHub は、このシリーズで Issues や Actions など多様なトピックを扱った後、GitHub で広く使われているマークアップ言語である Markdown の基礎から実践までを解説する。これにより、README の作成や Issue、プルリクエストの書式設定が効率化される。

ニュース一覧に戻る元記事を読む