Skip to content

Theme

Theme color ·

中文
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 planTest whether your AI can run commands; if not, install 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 to be able to open a terminal: the manual route types commands there, and the AI route may ask you to type the server password there once.

Test first: can your AI run commands?

If you already have an AI tool, tell it:

Test message for the AI
Please run whoami on my computer and tell me the result.
  • It actually runs it and answers with a user name: it works. Once you can open a terminal (first thing below), skip “install an AI assistant” and go straight to step 3.
  • It tells you to run it yourself, or says it can’t: it’s chat-only and can’t do this for you. Install Claude Code or Codex below, or take the manual route.

On Windows, also have it run uname -a: the answer must include Linux, meaning it works inside WSL (the setup’s scripts only run there). If not, install one inside WSL as below.

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”.

No AI that runs commands yet: install one

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.