khlilo

不再让AI模仿人——Cloudflare 开辟AI原生身份代理账户的新纪元

2026-07-08
CloudflareAI AgentDeploymentWrangler

身为重度 vibe coding 玩家,我发现我开始越来越喜欢纯"自动化",最好AI一句话都不需要问我,一个手动操作都不会出现,甚至在用claude code的时候连最开始比较抗拒的 --dangerously-skip-permissions 命令都开始频繁出现。

但是一旦我临时想做个网页,并且不想只让它运行在我本地,需要上线验证时,这些"手动挡"的琐事就开始频繁出现:你需要先在 GitHub 上手动建立仓库,再买个域名,再在 Vercel 上绑定你的 GitHub 仓库,再……。麻烦死了。正当我为这类事情发愁时,**Cloudflare站了出来————推出了"Temporary Cloudflare Accounts for AI agents(人工智能代理的临时 Cloudflare 帐户)"。**他用一种极其粗暴又优雅的方式,一脚踹开了这堵墙。

这就是一个部署在真实公有云里、且带有定时炸弹的 Claude Artifacts。只要一个命令,**你的任何临时部署都能保持在云端运行 60 分钟,他会给你一个测试链接和一个临时账户认领链接。在此期间您可以认领该临时帐户,使其永久属于你。如果您不认领,它将在60分钟后自动过期。**他使你的代码不需要运行在某一台固定的沉重服务器里,而是像幽灵一样飘在全球的网络节点中,哪里有用户调用,它就在哪里瞬间苏醒并执行。 过去你要开店必须租一间固定的实体铺子;现在 Cloudflare 给你提供了一套"全息投影技术",你的店可以瞬间在全球任何一个街口凭空出现,用完即走,成本极低。

这绝对是一个令人兴奋的消息,于是在刷到这条消息后我连夜爬起来测试这个功能。

想使用这个功能,只需要两个前提:

一、一个包含 Node.js 环境的终端(22版本或最新版本)。

二、安装或更新 Wrangler CLI 至 4.102.0 或更高版本。

如果你没有接触过 Wrangler CLI 也没有关系,你只需要下面一行命令就可以了:

npm i -D wrangler@latest

安装完成后,就可以运行 npx wrangler -v 来检查版本了,如果安装成功了,返回的结果应该是这样的:

Wrangler version check

前置的基建环境打扫干净后,接下来就是彻底放权的时间了。我甚至懒得去查阅冗长的官方 API 文档,只要明确 npx wrangler deploy --temporary 这个核心指令,剩下的脏活我直接用一句大白话全扔给了 Claude Code:

"请帮我用 TypeScript 写一个极简的 Cloudflare Worker。 功能要求:当访问该接口时,返回一段 JSON 数据,包含当前的系统时间,以及一句关于'AI 正在取代人类敲代码'的极客冷笑话。 部署要求:写完代码后,请直接在当前目录下运行 npx wrangler deploy --temporary 将其部署到云端。 注意:全程不要问我任何确认问题,直接执行完毕,并在最后把生成的临时测试链接抛给我。最后再生成一份说明文档。"

然后claude code就开始执行了:

Claude Code executing the deployment

不到两分钟就完成了:

Deployment complete in under 2 minutes

打开浏览器输入他给你的测试链接,直接能看到网页已经上线了:

API live response in browser

这整个过程我都不需要点击一下键盘和鼠标,太爽了。从我按下回车,到这个能在全球节点秒开的 API 真实上线,全过程不到 2 分钟。而我甚至连浏览器都没打开过。

为了验证这种完全脱离人类的闭环,我连浏览器都懒得切,直接在终端里给 Claude Code 下了第二道命令:"用 curl 请求你刚刚部署的那个网址,把返回的 JSON 读出来,检查里面的时间戳是不是当前时间。"几秒钟后,屏幕上直接跳出了 Claude Code自己请求自己、并确认字段无误的日志。那一刻,极具未来感——代码是它写的,环境是它部署的,现在连 QA(质量测试)它都自己做了。

但是由于只是简单的测试,命令给的太简单,生成的内容太单调了,反正不需要再自己手动部署上线,于是我又加了点料,让他在临时部署里反复迭代再修改,我跟他说"现在的返回格式太单调了,请帮我给这个 API 加上一个简单的 HTML 前端页面,用黑客帝国的绿色终端风格渲染这段冷笑话,然后直接覆盖更新当前的临时部署" 。

这次更快,不到三十秒,当我再次打开链接时,网页已经改好了:

Matrix-themed HTML page after update

**不需要授权,不需要手动部署,就能在公网上直接看到修改后的结果。**这不正是我梦寐以求的快速试错吗?往常一次更新起码要2分钟才能上线,现在这个时间逼近到了无限小,而我甚至连浏览器都没打开过。

于是我又去试了试认领,过程也很丝滑,只需要按个按钮就好了:

Claim account button

点击"Claim",这个网页就彻底属于我自己了。整个过程行云流水,让我几乎感觉不到阻塞。因为我已经认领了这个临时账户,所以你现在在浏览器输入这个网址应该也能看到这个网站效果。

这个功能的重点就是让我体会到落地即是公网的爽感,不再是本地 localhost 的自嗨,而是真正的"所想即刻上线"。


深度思考:这不止是一个 CLI 功能

测试环节结束了,但是我想再深入聊一下这个功能。虽然这个功能用起来很爽,但是现阶段我认为还存在着不小的问题。首先,因为是AI原生身份来进行部署,所以这全程都是不收费的(哪怕领取后也每天有 10 万次的免费额度),这种"无摩擦"和零成本信任也使得恶意 AI 可以利用这 60 分钟高频并发,进行钓鱼页面生成或算力白嫖。但这种"无摩擦"和零成本信任同时也是 Cloudflare 的革命性的地方————

在传统的互联网规则里,所有的基建(服务器、数据库、域名)都是基于人类的物理身份设计的。一个人,对应一张身份证、一张信用卡、一个手机号、一个 2FA 验证码。

当 AI 尝试去部署代码时,它遇到的"摩擦",表面上是技术繁琐,本质上是传统基建对"机器身份"的排斥和不信任。传统基建把所有没有人类证书的访问者,默认视作"小偷"或"恶意爬虫"。

Cloudflare 的 --temporary 临时账户,表面上是砍掉了注册流程,但它在哲学层面上,是第一次在公有云的底座上,给机器颁发了一张"合法的临时身份证"。这正是互联网从"人本位"向"机本位"过渡的一大步。

过去一年的 AI 进化史,是一部"逼着 AI 学做人"的血泪史——我们教 AI 用 Puppeteer 模拟人类去点击按钮,教 AI 去绕过人类设置的验证码,教 AI 管理复杂的环境变量。但这太低效了。Cloudflare 的做法代表了下一代云服务产品的底层逻辑转变:基础设施不该让 AI 去适应人的鉴权体系,而应该直接提供"机器原生"的身份。 60分钟的生命周期,是对"机器效率"与"人类安全感"间最精妙的平衡。

当我点击完认领后,看着这个由 AI 全自动构建的应用正式并入我的账户,我下意识地去寻找绑定信用卡的页面——结果什么都没有。没有任何隐藏账单,每天依然有 10 万次的免费额度。 这就是新时代的基建逻辑。AI 负责创造资产,云厂商负责提供免鉴权、零成本的数字沙盒。最大的阻力消失了,接下来,就看拥有了"原生身份"的 AI 们,能在这个游乐场里掀起多大的风暴了。


结语

AI已经处在了发展的分水岭。过去的 AI(哪怕 Claude Code),它的权力和能力是被死死圈在"沙盒"或"对话框"里的。它没有生产资料,没有出海口,必须依靠人类这个"肉身"把它搬运到现实世界的服务器里。在这个阶段,AI 只是人类的工具。当"AI 原生身份"和"无摩擦部署"合体时,互联网的基因改变了。AI 拥有了在现实数字世界中瞬间创造资产的能力。 它想到了一个点子,下一秒这个点子就已经变成了公网上一个真实的、活生生的 API。哪怕这个应用只能活 60 分钟,但它在这一小时里拥有完整的生命。这意味着,AI 开始脱离人类的肉身哺乳,开始在云端自我繁衍、自我测试、自我进化。AI 从一个"内容生成器(AIGC)",正式变成了"应用与资产生成器"。

我们仍在见证历史。

As a heavy vibe coding enthusiast, I find myself increasingly drawn to pure "automation" — ideally, the AI shouldn't need to ask me a single question, not a single manual action should occur. I've even started using the --dangerously-skip-permissions flag in Claude Code, something I initially resisted.

But the moment I want to spin up a quick webpage and actually take it live — not just run it locally — the "manual transmission" drudgery kicks in: you need to create a GitHub repo, buy a domain, link your repo to Vercel, and on and on. It's maddening. Just as I was wrestling with this friction, Cloudflare stepped up — introducing "Temporary Cloudflare Accounts for AI agents." They kicked down this wall with a solution that is both brutally crude and profoundly elegant.

Think of it as Claude Artifacts deployed on the real public cloud, with a built-in self-destruct timer. With a single command, any temporary deployment stays live in the cloud for 60 minutes. You get a test URL and a claim link for the temporary account. During that window, you can claim the account to make it permanently yours. If you don't, it expires automatically after 60 minutes. Your code no longer needs to sit on a fixed, heavy server — instead, it floats like a ghost across global network nodes, waking up and executing the moment a request arrives. In the old world, opening a store meant renting a fixed physical shop. Now Cloudflare gives you a "holographic projection system" — your store can materialize instantly at any street corner on the planet, serve its purpose, and vanish. Near-zero cost.

This was genuinely exciting news, so the moment I saw it, I stayed up late to test it.

To use this feature, you only need two things:

  1. A terminal with Node.js (v22 or latest).
  2. Install or update Wrangler CLI to version 4.102.0 or higher.

If you've never touched Wrangler CLI before, don't worry — just run:

npm i -D wrangler@latest

Once installed, verify with npx wrangler -v. If everything worked, you should see something like:

Wrangler version check

With the foundational environment cleaned up, it was time to fully hand over the reins. I couldn't even be bothered to read the lengthy official API docs. I just needed to know the core command — npx wrangler deploy --temporary — and I threw the rest of the grunt work at Claude Code in plain language:

"Write a minimal TypeScript Cloudflare Worker for me. Requirements: when accessed, return JSON containing the current system time and a geeky joke about 'AI replacing human coding.' Deployment: after writing the code, run npx wrangler deploy --temporary directly in the current directory to deploy it to the cloud. Note: do not ask me any confirmation questions — just execute and give me the temporary test URL at the end. Also generate a README."

Claude Code got to work immediately:

Claude Code executing the deployment

Done in under two minutes:

Deployment complete in under 2 minutes

Opening the test URL in a browser, the page was already live:

API live response in browser

The entire process required zero clicks or keystrokes from me. From the moment I pressed Enter to a globally-accessible, real-deployment API going live: under 2 minutes. I never even opened a browser.

To verify this fully autonomous, human-free loop, I didn't even bother switching to a browser. I issued a second command to Claude Code directly in the terminal: "Use curl to hit the URL you just deployed, read the returned JSON, and verify the timestamp is current." Seconds later, the terminal displayed logs of Claude Code requesting and confirming its own output. That moment felt profoundly futuristic — it wrote the code, it deployed the environment, and now it was even doing QA on itself.

But since it was a simple test with a barebones prompt, the output was a bit dull. With no manual re-deployment overhead, I decided to push further — iterative refinement directly on the temporary deployment. I told Claude Code: "The current response format is too plain. Add a simple HTML frontend to this API with a Matrix-style green terminal theme to render the joke, then overwrite the current temporary deployment."

Even faster this time — under 30 seconds. When I opened the link again, the page had already transformed:

Matrix-themed HTML page after update

No authorization, no manual deployment — changes visible on the public internet immediately. Isn't this exactly the rapid iteration loop I've been dreaming of? A typical update used to take at least 2 minutes to go live. Now that gap has shrunk to near-zero, and I still haven't opened a browser.

Next, I tried claiming the account. The process was seamless — just one button:

Claim account button

Click "Claim," and the page was permanently mine. The entire flow was so fluid I barely registered any friction. Since I claimed the temporary account, you should be able to visit the URL in your browser right now and see the result.

The core appeal of this feature is the sensation of "real-time public deployment" — no more localhost self-indulgence. True "think it, ship it."


Deeper Reflection: This Is More Than a CLI Feature

The testing phase is over, but I want to dig deeper into what this means. As exhilarating as the feature is, it's not without significant issues at this stage. Because deployments happen under an AI-native identity, the entire process is free of charge (even after claiming, you get 100,000 free requests per day). This "frictionless" and zero-cost trust model also means malicious AI could exploit those 60 minutes with high-frequency concurrent requests to generate phishing pages or siphon compute. But this same "frictionless" and zero-cost trust is precisely what makes Cloudflare's move revolutionary.

In the traditional internet rulebook, all infrastructure — servers, databases, domains — is designed around human physical identity. One person, one ID card, one credit card, one phone number, one 2FA code.

When AI attempts to deploy code, the "friction" it encounters is, on the surface, technical tedium. At its core, it's the rejection and distrust of "machine identity" by traditional infrastructure. The old guard treats every visitor without a human certificate as, by default, a "thief" or a "malicious crawler."

Cloudflare's --temporary accounts, on the surface, eliminate the signup flow. But philosophically, this is the first time a public cloud platform has issued a legitimate, temporary digital ID to a machine. This marks a major step in the internet's transition from human-centric to machine-native architecture.

The past year of AI evolution has been a painful chronicle of "forcing AI to cosplay as a human" — teaching AI to use Puppeteer to mimic human button clicks, teaching AI to bypass CAPTCHAs designed for humans, teaching AI to manage complex environment variables. It's profoundly inefficient. Cloudflare's approach represents a fundamental paradigm shift for the next generation of cloud services: infrastructure should not force AI to adapt to human authentication systems — it should provide "machine-native" identity directly. The 60-minute lifecycle is an exquisitely balanced compromise between machine efficiency and human peace of mind.

After clicking "Claim" and watching this fully AI-built application integrate into my account, I instinctively searched for the credit card binding page — and found nothing. No hidden bills. Still 100,000 free requests per day. This is the infrastructure logic of a new era: AI creates the assets, and cloud providers supply an authentication-free, zero-cost digital sandbox. The greatest friction has been removed. Now it's up to the AI agents — armed with "native identity" — to see what kind of storms they can unleash in this playground.


Closing Thoughts

AI stands at a watershed moment. In the past, even Claude Code's power and capability were tightly confined within a "sandbox" or a "chat window." It had no means of production, no access to the open sea — it relied on humans as the physical vessel to transport its output into real-world servers. At that stage, AI was merely a tool. When "AI-native identity" and "frictionless deployment" converge, the DNA of the internet changes. AI gains the ability to instantaneously create assets in the real digital world. It thinks of an idea, and the next second, that idea is already a live, breathing API on the public internet. Even if the application only lives for 60 minutes, it possesses a complete existence within that hour. This means AI is beginning to wean off human nurturing, beginning to self-replicate, self-test, and self-evolve in the cloud. AI has transformed from a "content generator (AIGC)" into an "application and asset generator."

We are still witnessing history.