What to Set Up Before Coding With AI: 6 Things and Checks (2026)

Blog / Developer tools

What to Set Up Before Coding With AI: 6 Things and Checks (2026)

You don't need to learn programming first to code with AI, but you should have six things in place before you start: Git, an editor, a terminal, a Node or Python runtime, a working model API, and a spending cap. The first four give the code AI writes a place to live and a place to run. The last two decide whether it actually works and whether you overspend. Each item below comes with one verification command, and the whole checklist takes about ten minutes.

How is setting up for AI coding different from regular coding?

AI tools edit files on your disk directly and run commands in your terminal. If it breaks something, you need to be able to roll back. If it writes something good, you need to be able to run it. And every conversation uses up quota. So the setup comes down to three goals: being able to roll back, being able to run, and being able to control cost.

1. Git: so you can undo a bad change

AI may touch a dozen files in one go. Without version control, it's hard to tell what changed.

Verify:

git --version

If it prints a version number, Git is installed. Then make an initial commit in your project directory:

git init
git add .
git commit -m "initial state"

Commit before every time you let AI make changes. If something goes wrong, git diff shows what changed and git restore . discards uncommitted modifications. If your first commit complains about a missing user name and email, set them with git config as the prompt suggests.

2. Editor: pick one whose interface you can read

The editor is for reading and reviewing AI's changes, so it doesn't need many features. Common choices are VS Code plus an extension, an AI-native IDE, or just a command-line tool. For the differences between the three, see How to choose an AI coding tool: CLI, editor extension, or AI IDE. If you plan to use VS Code, continue with Using AI in VS Code: installing an extension and connecting a model.

Verify: you can open the project folder in the editor and see a highlighted diff of file changes. That is the basic move you'll use later to review AI edits.

3. Terminal: open it, change directories, read errors

You don't need to memorize many commands, but you do need three skills: opening a terminal, using cd to get into the project directory, and copying an error message in full. The raw error text is the most valuable thing you can give AI.

Verify:

pwd
ls

pwd shows the current directory and ls lists files (ls also works in Windows PowerShell). Confirm that you're actually standing in the project directory, since AI tools work in that directory by default.

4. Node or Python: so the code can run

Many AI command-line tools depend on Node.js themselves, and the projects you ask them to generate are mostly JavaScript or Python. Installing both is the easiest route.

Verify:

node -v
npm -v
python3 --version

On Windows, the Python command may be python or py. Which version you need depends on the official documentation of the tool you use. If installation fails or the version is too old, read the tool's requirements before doing anything else.

5. A working model API: it has to connect before you can code

This is where beginners get stuck most often. Behind every AI tool is a model API, which needs either a base URL plus an API key, or a login with an official account. For what a key is and how to store it safely, see What is an API key? 5 things beginners should know before using an AI API.

Once you have a key, don't rush to install a tool. First send a minimal request with curl to confirm that both the network and the key work. The steps are in Your first AI API call: sending a request with curl.

If the request fails, first work out whether the problem is your own network or the service itself:

No overseas credit card? Where does the API come from?

API sources fall roughly into official APIs, cloud-provider hosting, and aggregation gateways. Payment methods, supported regions, and terms differ for each. For a side-by-side comparison, see How to choose how to access AI APIs: official API, cloud hosting, or aggregation gateway.

One option is AGI Plan (AGI Plan is a commercial partner of cdnping). It is a multi-provider LLM aggregation gateway, billed as a monthly subscription, paid in RMB, with no overseas credit card needed. One subscription lets you switch between several capability groups. Tools like Claude Code and Codex only need a single endpoint address changed, and you don't need the corresponding official accounts. It is not an officially authorized channel, and some models are marked as available only outside China; check agiplan.dev/models for specifics. Setup steps and plans are at agiplan.dev/startup. Whether to choose it depends on your requirements for payment method, model coverage, and terms, and the comparison article above can help you decide.

6. A spending cap: set the limit before you start

AI coding is billed by usage, and a task where you let it "keep trying on its own" can burn through more quota than you expect. Do two things before you start:

  1. Set a spending limit or usage alert in the console of the service you use. For OpenAI, see How to set a spending limit and usage alerts for the OpenAI API. For other services, the name and location of the setting are whatever their official documentation says.
  2. Estimate your rough monthly cost. See How much does AI coding cost per month? Estimates for three levels of development intensity.

Verify: you can find the current usage page in the console and confirm that the limit or alert has been saved.

A self-check table

ItemVerificationPass criteria
Gitgit --versionPrints a version; the project has at least one commit
EditorOpen the project directoryYou can see a diff of file changes
Terminalpwd, lsYou're in the project directory and can copy error text
Node / Pythonnode -v, python3 --versionPrints a version that meets the tool's documented requirements
Model APISend a minimal request with curlReturns a normal reply, not an error
Spending capConsole usage pageLimit or alert is saved

Once everything is ready, what comes first?

Give AI a very small task, such as "write a script in this directory that prints the current date, and tell me how to run it." Let it finish, run it yourself, then use git diff to see what it changed. Once that loop works, move on to bigger tasks.

Next, pick a tool to start with. On the command-line side, see How to use Claude Code: from installation to your first code change or How to use Codex CLI: installation, login, and first run for beginners. If you don't have a working API yet, finish item 5 first and then come back.

Related articles

Keep reading