白嫖 Claude Code,国内也能免费使用

B站影视 欧美电影 2025-09-26 04:07 1

摘要:免费领取 Claude Code $100 额度,可用 Claude4-Opus,手慢无! 链接地址:anyrouter.top/register?af…

免费领取 Claude Code $100 额度,可用 Claude4-Opus,手慢无! 链接地址:anyrouter.top/register?af…

添加 API 令牌(后面要用):注册后在 API 令牌 页面点击 添加令牌 获得(以 sk- 开头) 名称随意,额度建议设为无限额度,其他保持默认设置即可

确保 Node.js 版本 ≥ 18.0

curl -fsSL https://deb.nodesource.com/setup_lts.x | sudo bash - #技术分享node --versionsudo xcode-select --install /bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)" brew install node node --versionsudo npm install -g @anthropic-ai/claude-codeclaude --version

为避免每次重复输入,将环境变量写入 bash_profile 和 bashrc 将 sk-xxx 替换为前面获取的 API 令牌:

echo -e '\n export ANTHROPIC_AUTH_TOKEN=sk-xxx' >> ~/.bash_profileecho -e '\n export ANTHROPIC_BASE_URL=https://anyrouter.top' >> ~/.bash_profileecho -e '\n export ANTHROPIC_AUTH_TOKEN=sk-xxx' >> ~/.bashrcecho -e '\n export ANTHROPIC_BASE_URL=https://anyrouter.top' >> ~/.bashrcecho -e '\n export ANTHROPIC_AUTH_TOKEN=sk-xxx' >> ~/.zshrcecho -e '\n export ANTHROPIC_BASE_URL=https://anyrouter.top' >> ~/.zshrc

重启终端后,直接使用:

cd your-project-folderclaude

首次运行:选择你喜欢的主题 +

确认安全须知 +

使用默认 Terminal 配置 +

信任工作目录 + Enter

开始在终端里和你的 AI 编程搭档一起写代码吧!

我试着用它写了个贪吃蛇小游戏,也就用了1分钟,耗费$0.1,还行

来源:墨码行者

相关推荐