用智能体部署
能运行 shell 命令的编程智能体(Claude Code、Codex、Cursor、Gemini CLI、Aider 等)可以凭一条提示词 完成整个设置。它从两个为智能体准备的纯文本文件中阅读文档:
- llms.txt:casty 是什么、各条命令,以及指向 每一个页面的链接;
- llms-full.txt:本文档的全部页面, 合在一个文件中。
仓库根目录下也有同样的 llms.txt。
原样粘贴。智能体会询问你的 fid 以及你想要的方式:一个属于你自己的新节点, 或者让 casty 连接一个已经运行的节点。
Set up casty for me: https://github.com/castyfun/casty. Read https://castyfun.github.io/casty/llms-full.txt first.1. Clone the repository and cd into it.2. Ask me for my Farcaster fid, and which of these I want: a) a new node of my own: I give you HCLOUD_TOKEN or AWS credentials, or user@ip of a Linux host with 16 GB RAM and 2 TB free disk; b) no node of my own: connect casty to an existing Snapchain node URL (default https://snap.farcaster.xyz:3381).3. For a), first run ./scripts/deploy.sh --fid <fid> --dry-run (add -- --host user@ip for my own host), show me what it would create and what it costs, and only after my "yes" run the same command with --yes instead of --dry-run. The node sync takes hours: if the wait stops, run ./scripts/1-node.sh status --wait, then run deploy.sh again; it resumes. For b), run ./scripts/2-client.sh --node <url> --fid <fid>.4. Never ask me for my seed phrase or recovery phrase and never type one anywhere. The app key is added with my wallet: tell me to run ./bin/casty web in my own terminal (it asks me for a new passphrase), open the link it prints, go to "you" and press "add a key with your wallet". If my account was made in the Farcaster app, no browser wallet holds its custody key: tell me to show the recovery phrase in the app on my phone and import it once into a browser wallet (MetaMask or Rabby), or to run ./bin/casty init in my own terminal and type it there.5. Check the result with ./bin/casty doctor and ./bin/casty whoami, then show me ./bin/casty feed --limit 5.If a step fails, read its error line and hint, look the message up in https://castyfun.github.io/casty/troubleshooting/, fix the cause and run the same command again.什么始终由你掌握
Section titled “什么始终由你掌握”- 钱。 在你看过
--dry-run给出的计划并同意之前,不会创建任何花钱的东西。./scripts/0-provision.sh --destroy会再把它们删除。 - 助记词。 提示词禁止智能体索要它。应用密钥由你的钱包在
casty web中授权,而它 由你自己启动,所以密钥库口令也由你掌握。 - 云凭据。 只有新建节点时,智能体才需要
HCLOUD_TOKEN或 AWS 凭据。 给它一个你可以撤销的令牌,并在节点运行起来后撤销它;casty 只有在删除服务器时才会再次需要它。
涉及的每一个机密以及如何撤销每一个,见安全。