Skip to content

Getting set up

There are plenty of harnesses to choose from.

  • Codex and Claude Code are the popular proprietary harnesses, complete with a Command Line Interface (CLI), desktop apps, and plugins for Integrated Development Environments (IDEs) like VS Code or JetBrains.

  • Some others are complete IDEs of their own (like Cursor or Antigravity), usually forks of the popular VS Code IDE.

  • There are also lots of open-source options that you can find on GitHub, like cline, Kilo Code and opencode.

  • Use the CLI, an IDE plugin, or the desktop app, whichever you are most familiar with. They all tend to offer similar functionalities.

Logos of six AI model providers: OpenAI, Anthropic (Claude), DeepSeek, Moonshot AI (Kimi), xAI (Grok), and Alibaba (Qwen).

A handful of the providers you’ll run into: proprietary (OpenAI, Anthropic, xAI) alongside open-weight (DeepSeek, Kimi, Qwen).

The answer to this question keeps changing: models keep getting better, the competition is fierce, and the ‘best’ one depends on when you ask. You can follow the leaderboard of model performance on sites like LMArena (now Arena): https://arena.ai/leaderboard

Then, there is the cost: proprietary models tend to be the most expensive. They charge separately for the tokens you send in and the tokens they send back, while the alternative open-source, cloud-based models are often dramatically cheaper. DeepSeek-V4-Flash, for instance, runs about $0.14 per million input tokens and $0.28 per million output, against Claude Sonnet 5 at $2 and $10: between 14 and 36 times less, depending on how your usage splits between input and output.

Don’t take that as a rule, though. Pricing varies by model and by the provider hosting it, and open weights — a model whose innards the maker has published, so anyone can host it or run it themselves — do not automatically mean cheap: Kimi K3 is $3 and $15 per million, which is more expensive than Sonnet 5. On quality, the open models may not be at the very top, but they are often close (depending on the moment).

Everything above assumes you are renting a model from somebody. You don’t have to: open weights means you can download the model and run it on your own hardware. Your code never leaves the machine, there is no per-token bill, and nothing changes under you when a provider updates its pricing or its terms. If you work on code you are contractually not allowed to send to a third party, that isn’t a preference, it’s the only option.

The catch is what it costs to get there.

The rest of this section is hardware arithmetic; if you are not shopping for a machine, the short version is that it costs more than you think and the target keeps moving.

Around 24GB of VRAM — the memory on the graphics card, which is where the model has to sit — is a fair floor for a model genuinely useful for coding, and you shouldn’t spend all of it on weights: target 14 to 20GB and leave the rest for the KV cache, the running notes the model keeps on the conversation, which fills fast once an agent starts accumulating tool calls and file contents. That budget runs something like Gemma 4 or Qwen3.8-27B, quantized to fit. Good models. Not the model you are used to.

Going past that gets expensive quickly. A Mac Studio or an NVIDIA DGX Spark with 128GB of unified memory runs $4,500 to $6,900, and a top-tier open-weight model like Kimi K3 will not fit on one. All 2.8 trillion of its parameters have to sit in memory even though only 104 billion are active on any given token, which puts its weights at 1.56TB. Marketing quotes the active number; memory doesn’t care.

People do build clusters for it, and the one that works is four Mac Studios with 512GB each, mesh-connected, around $40,000. It generates about fifteen tokens a second — the speed of a slow typist — because the link between consumer machines is nothing like the wiring inside a real server. Apple stopped selling that 512GB configuration in 2026 when memory prices spiked, so you may not even be able to buy it new. The same model rented through an API costs $3 and $15 per million tokens. Running a frontier open-weight model at home is a demonstration, not a deployment.

Two costs people leave out. Power: a few active hours a day on a small rig runs near 180kWh a month, about $61 in California — a recurring cost that never shows up on the sticker price. And obsolescence: a year ago a far smaller rig would have done, because Kimi K2 was a third the size. K3 tripled it, and the advice went stale without anyone announcing it. You are buying hardware against a target that moves every few months.

Privacy is worth paying for. Just know what you are paying.

Models are priced per input token and per output token (per million tokens, actually) for API usage — paying the provider directly, by the token, instead of buying a subscription — so they can be compared that way, but using the API is usually much more costly than using a subscription.

Proprietary model providers as well as open-source cloud model providers offer subscriptions that include a variable and undisclosed amount of token usage per ‘session’ and per week. Sessions tend to be a 5-hour block of time, with a cap per week on top. Some subscriptions start with a very limited free tier, but the realistic entry point is around $20 a month: that is what both Claude Pro and ChatGPT Plus cost, and it may sometimes be worth hundreds of dollars of API token usage. The heavier tiers run $100 to $200 a month.

Compare and contrast for yourself, but a subscription is usually the way to go.

Can I use OpenAI models with Claude Code? In theory, yes. In practice, it’s best to stick with the harness built by the model provider, for many reasons:

  • proprietary model subscriptions have terms and conditions for their usage. An Anthropic subscription, for example, is meant for Claude Code, the Agent SDK, and Anthropic’s own applications (claude.ai, Claude Desktop) — not for third-party clients. Their Legal & Compliance page states that OAuth login is “intended exclusively for purchasers of Claude Free, Pro, Max, Team, and Enterprise subscription plans and is designed to support ordinary use of Claude Code and other native Anthropic applications”, and it bars third parties from routing requests through those credentials.

    The risk here is not Codex or Cursor, which don’t offer an Anthropic login in the first place. It is the various tools and wrappers that extract your Claude OAuth token and replay it to impersonate Claude Code. That is exactly what the terms prohibit, Anthropic reserves the right to enforce them without prior notice, and it did enforce in February 2026. Using one of those is a real way to get your account blocked or banned.

However, it’s possible to use API access with any harness; the cost may not be worth it.

Most open-source model providers don’t have restrictions on what harness you use, so it’s possible to use models like DeepSeek, Qwen, or Kimi using the Claude Code harness or Codex. This is set in the configuration — here’s what that actually looks like for each harness, pointed at the GLM models from Z.ai, the Chinese lab Zhipu AI, over its Anthropic-compatible endpoint. If you aren’t going to wire up a third-party provider yourself, skip to “Useful plugins and skills” — nothing later on depends on this.

Claude Code reads a third-party endpoint and model overrides from an env block in a settings JSON file. For your own machine, that’s ~/.claude/settings.json (create it if it doesn’t already exist); for a project shared with a team, put the same block in that project’s .claude/settings.json instead. See Settings files and precedence for how the two combine, and note that keys set closer to the project win.

~/.claude/settings.json
{
"env": {
"ANTHROPIC_AUTH_TOKEN": "<your-api-key>",
"ANTHROPIC_BASE_URL": "https://api.z.ai/api/anthropic",
"ANTHROPIC_DEFAULT_HAIKU_MODEL": "glm-5.3-flash[1m]",
"ANTHROPIC_DEFAULT_SONNET_MODEL": "glm-5.3[1m]",
"ANTHROPIC_DEFAULT_OPUS_MODEL": "glm-5.3[1m]",
"CLAUDE_CODE_AUTO_COMPACT_WINDOW": "1000000",
"CLAUDE_CODE_DISABLE_NONESSENTIAL_TRAFFIC": "1",
"API_TIMEOUT_MS": "3000000"
}
}

What each key does, confirmed against Claude Code’s own environment variables reference and model configuration docs:

  • ANTHROPIC_AUTH_TOKEN sends your key as an Authorization: Bearer header, the shape most third-party gateways expect (as opposed to ANTHROPIC_API_KEY, which is for Anthropic’s own Console keys and sends X-Api-Key instead).
  • ANTHROPIC_BASE_URL overrides the API endpoint.
  • ANTHROPIC_DEFAULT_HAIKU_MODEL / _SONNET_MODEL / _OPUS_MODEL remap what the haiku, sonnet, and opus aliases resolve to; the [1m] suffix requests the provider’s extended context window where it’s supported.
  • CLAUDE_CODE_AUTO_COMPACT_WINDOW sets how many tokens of context Claude Code fills before summarizing older turns — from 100,000 up to 1,000,000.
  • CLAUDE_CODE_DISABLE_NONESSENTIAL_TRAFFIC turns off auto-update checks, telemetry, and other calls back to Anthropic that a third-party-only setup doesn’t need.
  • API_TIMEOUT_MS is the per-request timeout in milliseconds; third-party endpoints are sometimes slower than Anthropic’s own.

Model names move fast — GLM was on 5.3 at the time of writing, and the exact IDs above came straight from Z.ai’s own Claude Code setup guide. Check that page for whatever’s current before pasting this in.

There is a vast quantity of open-source plugins and skills out there, and some are worth mentioning:

  • The official Claude Code plugins live at https://github.com/anthropics/claude-plugins-official, and include:
    • superpowers: a set of process skills (brainstorming before building, systematic debugging, test-driven development, writing plans) that push the agent through an engineering workflow instead of letting it dive straight into code. If you install only one thing from this list, install this one.
    • remember: persists session history and the decisions made along the way, so your context survives between sessions instead of starting from nothing every morning.
    • code-review: structured review of the changes that were just made.

Add the marketplace once, then install whichever plugins you want from it — either from inside a session with the /plugin slash command:

Terminal window
/plugin marketplace add anthropics/claude-plugins-official
/plugin install superpowers@claude-plugins-official

or, non-interactively (for example in a setup script), with the claude plugin CLI subcommand:

Terminal window
claude plugin marketplace add anthropics/claude-plugins-official
claude plugin install superpowers@claude-plugins-official

Swap superpowers for remember or code-review to install those instead — same marketplace, same two commands. Both forms are confirmed against Claude Code’s own plugin discovery and plugins reference docs.

A plugin bundles several skills at once; sometimes you just want one, from a repo that isn’t a plugin at all. That’s a plain file copy — no marketplace involved.

Skills live at .claude/skills/<skill-name>/SKILL.md: inside a project to check into git and share with the team, or under ~/.claude/skills/<skill-name>/SKILL.md on your own machine to load in every project you open. The file needs name and description in a short header block at the top; everything after it is the instructions Claude reads once the task matches.

The Karpathy repo above ships exactly such a file, so grab it directly:

Terminal window
mkdir -p .claude/skills/karpathy-guidelines
curl -o .claude/skills/karpathy-guidelines/SKILL.md \
https://raw.githubusercontent.com/multica-ai/andrej-karpathy-skills/main/skills/karpathy-guidelines/SKILL.md

That’s the whole install. (The repo also ships a Claude Code plugin wrapper — /plugin marketplace add multica-ai/andrej-karpathy-skills then /plugin install andrej-karpathy-skills@karpathy-skills — which installs the same skill file; either path works.) If you’d rather have the four rules as always-on project context instead of a skill Claude decides when to invoke, curl the repo’s plain CLAUDE.md into your own instead:

Terminal window
curl https://raw.githubusercontent.com/multica-ai/andrej-karpathy-skills/main/CLAUDE.md >> CLAUDE.md

Confirmed against Claude Code’s own skills docs.