Skip to content
XXD VPS Guide
中文
Main guide · step 2 of 715 minutes

Set up an AI assistant

You need: A computer; for the AI route, a paid Claude or ChatGPT planInstall Claude Code or Codex — or take the manual route

What this step is

Prepare the tools for the next step: a terminal to type commands into, and — on the AI route — an AI assistant that runs commands for you.

Whichever route you take, you need the terminal: the AI works inside it too.

First: open a terminal

Mac has Terminal built in: press ⌘ + Space, type “Terminal” and press Enter. A window appears with a line ending in % or $ — that’s the terminal.

Using the terminal

Paste a command, press Enter and wait. A fresh $ or % line means the command has finished. When you paste or type a password, nothing appears on screen — that’s normal.

Manual route: you’re done here

If you won’t use AI, the terminal is all you need. Go to the next step and choose “Type it yourself”.

AI route: install an AI assistant

Pick one — whichever you have an account for:

Claude Code Codex
From Anthropic (Claude) OpenAI (ChatGPT)
Account needed Claude Pro, Max, Team, Enterprise or Console (not the free plan) A paid ChatGPT plan such as Plus, Pro, Business, Edu or Enterprise

Heads up

These AI services must be used in the countries and regions they support. If you can’t use one yet, take the manual route now and install an AI assistant later.

Paste this into the terminal and press Enter (same command on Mac and in WSL):

Install Claude Code
curl -fsSL https://claude.ai/install.sh | bash

When it finishes, close the terminal and open it again, then check — a version number means it worked:

Check
claude --version

Then type claude, press Enter and log in to your Claude account in the browser when prompted. Details: Install Claude Code.

You should see

Typing claude or codex opens the AI assistant, you’re logged in, and you can chat with it.

Optional: install it as a skill

If you’ll set up servers often, install this setup as an AI skill; afterwards one sentence — “use xiaoxiaodong-vps to set up my new server” — is enough. Not needed the first time: the message in the next step tells the AI to download the setup itself. See Install the xiaoxiaodong-vps skill.

Stuck?

It says command not found?

Close and reopen the terminal after installing so the new command is found. Still failing? See the matching how-to.

The browser didn't open for login?

The terminal prints a URL — copy it into a browser, log in, then return to the terminal.

Can I skip WSL on Windows and use PowerShell?

The AI assistants themselves run on Windows, but this setup’s scripts need Linux tools like bash and ssh, which are easiest in WSL — so the guide uses WSL throughout.

Before moving on, check

This setup is for you and your family only. Follow local laws and each site's and AI tool's terms of use. Open source (MIT) — code and feedback on GitHub.