by Anthropic
Use Claude Code remotely via CloudForge - code from anywhere with AI assistance
What is Claude Code?
Claude Code is Anthropic's official terminal-based AI coding assistant. It can understand your codebase, write code, run commands, and help you build software.
Connect to your server via CloudForge terminal and install Claude Code:
npm install -g @anthropic-ai/claude-codeOr with npx (no installation required):
npx @anthropic-ai/claude-codeClaude Code supports two authentication methods:
If you have a Claude Pro or Max subscription, authenticate with your Anthropic account. This gives you the best experience and usage limits.
claude /loginRemote Authentication
The /login command opens a browser for OAuth. On a remote server without a display,
you'll see a URL to open on your local machine. Complete the auth there, then paste the code back.
If you prefer to use an Anthropic API key (pay-as-you-go):
export ANTHROPIC_API_KEY=sk-ant-xxx claudeTo persist the API key, add it to your shell profile:
echo 'export ANTHROPIC_API_KEY=sk-ant-xxx' >> ~/.bashrc source ~/.bashrcNavigate to your project and start Claude Code:
cd ~/my-project claudeYou can also start with a specific task:
claude "Add a login form to the homepage"| Plan | Price | Usage (5h window) | Best For |
|---|---|---|---|
| Pro | $20/mo | 10-40 prompts | Casual use |
| Max 5x | $100/mo | 50-200 prompts | Regular coding |
| Max 20x | $200/mo | 200-800 prompts | Heavy use / Teams |
| Command | Description |
|---|---|
claude | Start interactive mode |
claude "task" | Start with a specific task |
claude /login | Authenticate with Anthropic |
claude /logout | Log out |
claude /help | Show help |
/clear | Clear conversation (in session) |
/compact | Summarize conversation (in session) |
Create a CLAUDE.md file in your project root to give Claude context about your project:
# My Project
## Overview
This is a SvelteKit web app with Supabase backend.
## Tech Stack
- SvelteKit
- TypeScript
- Tailwind CSS
- Supabase
## Development
- `pnpm dev` - Start dev server
- `pnpm build` - Build for production
- `pnpm test` - Run testsIf /login fails on a remote server, you can authenticate on your local machine
and copy the auth file to the server:
On your local machine: cat ~/.config/claude-code/auth.json Copy the content and on your server: mkdir -p ~/.config/claude-code nano ~/.config/claude-code/auth.json Paste the content and saveIf you hit rate limits, wait for the cooldown period or upgrade to a higher plan. The Max plans have significantly higher limits.
Claude Code needs internet access. Ensure your server can reach api.anthropic.com.