Safeguard
Developer Tools•

Claude Code Alternatives in 2026: Open-Source and Commercial Options

Claude Code alternatives in 2026 include Codex CLI, Gemini CLI, OpenCode, Aider, Cline, goose, Qwen Code and Kilo Code, compared on licence and approvals.

Safeguard Security Team
18 min read

The main Claude Code alternatives in 2026 are OpenAI's Codex CLI, Google's Gemini CLI, and the open-source agents OpenCode, Aider, Cline, goose, Qwen Code and Kilo Code. They differ in licence, interface, model choice and how often they ask before acting. Pick on those facts, then scan whatever any agent changes before you merge.

Safeguard is also an alternative you can switch to without losing what you already pay for. Bring the Claude, ChatGPT or Codex plan you already pay for and use it inside the Safeguard CLI. Safeguard adds no extra charge for that usage; your plan's own usage limits and terms still apply. You can also connect Claude or ChatGPT to the Safeguard MCP server and use Safeguard from the chat you already use.

Every fact about a third-party tool below comes from that tool's own docs, repository or pricing page, linked at the end. There are no rankings, because these tools do different jobs.

What Claude Code is, according to Anthropic's docs

Anthropic describes Claude Code as "an agentic coding tool that reads your codebase, edits files, runs commands, and integrates with your development tools." The docs list several surfaces on the same engine:

  • Terminal. Install with curl -fsSL https://claude.ai/install.sh | bash on macOS, Linux and WSL, or irm https://claude.ai/install.ps1 | iex in Windows PowerShell. Homebrew and WinGet packages also exist.
  • IDE. A VS Code extension (also installable in Cursor) and a JetBrains plugin, which needs the CLI installed separately.
  • Desktop app. For macOS and Windows, with Ubuntu and Debian in beta. The docs say a paid subscription is required.
  • Web. Claude Code in the browser at claude.ai/code, including from the Claude app on iOS and Android.

Your repository's CLAUDE.md files, settings and MCP servers carry across those surfaces.

How you sign in and which plans include it

On first launch, claude opens a browser window to log in. The authentication docs list a Claude Pro or Max subscription, Claude for Teams or Enterprise, a Claude Console account with API billing, and cloud providers (Amazon Bedrock, Google Cloud's Agent Platform or Microsoft Foundry). Claude's pricing page marks Claude Code as not included on the Free plan and says "Claude Code is included in all paid plans."

One detail trips people up. If ANTHROPIC_API_KEY is set and you approve it, Claude Code uses that key rather than your subscription. /status shows which credential is active.

Permission modes

You switch permission modes with Shift+Tab in the CLI. The docs list six:

  • Manual (config value default): only reads run without asking.
  • acceptEdits: reads, file edits and common filesystem commands run without asking.
  • plan: Claude Code blocks edits until you approve a plan.
  • auto: a second model, the classifier, reviews actions instead of you. From v2.1.283 it is the starting mode for interactive terminal and VS Code sessions.
  • dontAsk: only pre-approved tools run; anything that would prompt is denied. Aimed at CI.
  • bypassPermissions: everything runs. The docs say this is for isolated containers and VMs only.

Every alternative below has its own version of this list, with different names and defaults.

Claude Code alternatives, tool by tool

Each description covers what the tool is, how it runs, its licence and one thing to know before adopting it. We confirmed each open-source licence on the project's own page.

OpenAI Codex CLI

Codex CLI is "a coding agent from OpenAI that runs locally on your computer." OpenAI also offers an IDE extension for VS Code, Cursor and Windsurf, a desktop app (codex app) and Codex Web in the cloud. The repository is Apache-2.0. You sign in with ChatGPT on a Plus, Pro, Business, Edu or Enterprise plan, or set up an API key. Read the approvals page first: sandbox modes are read-only, workspace-write and danger-full-access, network access is off by default, and the old untrusted approval policy is no longer supported.

Google Gemini CLI

Gemini CLI is "an open-source AI agent that brings the power of Gemini directly into your terminal," licensed Apache-2.0, with a VS Code companion and MCP servers configured in ~/.gemini/settings.json. You authenticate with a Google account, a Gemini API key or Vertex AI. One thing to know: its README and docs say that for unpaid tier and Google One users, Gemini CLI was replaced by Antigravity CLI on 18 June 2026.

OpenCode

OpenCode calls itself "the open source AI coding agent." It runs as a terminal UI and a desktop app in beta, under the MIT licence. Its providers page says it supports 75 or more LLM providers plus local models. The built-in build agent is described as full access, while plan denies file edits by default and asks before bash commands. See our OpenCode alternatives guide for more.

Aider

Aider lets you "pair program with LLMs" from the terminal. It is Apache-2.0, installs with python -m pip install aider-install then aider-install, and connects to most hosted and local models. It "automatically commits changes with sensible commit messages," so every edit can be undone with git. Check release activity first: PyPI shows version 0.86.2 released on 12 February 2026, with the previous release in August 2025.

Cline

Cline describes itself as "the open source coding agent in your IDE, terminal, & desktop." It runs as a VS Code extension, a JetBrains plugin, a CLI (npm i -g cline) and a desktop app for macOS and Windows, with Anthropic, OpenAI, Google, OpenRouter, Bedrock, Vertex, Ollama, LM Studio and any OpenAI-compatible API. By default every file edit and terminal command needs your approval. The licence is Apache 2.0, but the repository says the JetBrains plugins are not open source yet.

goose

goose is "a general-purpose AI agent that runs on your machine," aimed at research, writing and data work as well as code. It has a desktop app for macOS, Linux and Windows, a CLI and an API, under Apache-2.0, and is part of the Agentic AI Foundation at the Linux Foundation. Know the default: goose's permission docs say Completely Autonomous mode, which can modify and delete files without approval, applies by default. Manual Approval and Smart Approval are one command away.

Qwen Code

Qwen Code is "an open-source AI coding agent that lives in your terminal," licensed Apache-2.0. It started from Gemini CLI v0.8.2 and has developed independently since v0.1. /auth sets your provider: OpenAI, Anthropic, Gemini and Qwen APIs, or local models through Ollama or vLLM. Its approval modes are Plan, Ask Permissions, Auto-Edit, Auto and YOLO; the docs page names two different defaults, so check the mode bar on first run.

Kilo Code

Kilo Code is "the open source coding agent for building with AI in VS Code, JetBrains, or the CLI," a fork of OpenCode under the MIT licence, with a web-based Cloud Agent too. The README says you can pick from 500 or more models. For CI, kilo run --auto auto-approves permission prompts unless a rule denies the action, and the README says to use it only in trusted environments.

Comparison table

Facts only, taken from each project's own pages.

ToolInterfaceLicenceModels and sign-inWhere code runsApproval prompts
Claude CodeTerminal, VS Code, JetBrains, desktop, webCommercial productClaude paid plans, Console, Bedrock, Google Cloud, FoundryYour machine; web sessions in the cloudSix modes, from Manual to bypassPermissions
Codex CLITerminal, IDE extension, desktop app, Codex WebApache-2.0ChatGPT Plus, Pro, Business, Edu, Enterprise; API keyLocally; Codex Web in the cloudSandbox modes plus approval policies
Gemini CLITerminal, VS Code companionApache-2.0Google account, Gemini API key, Vertex AIYour machinePlan mode, sandboxing, trusted folders
OpenCodeTerminal UI, desktop (beta)MIT75+ providers, local modelsYour machineplan asks before bash; build is full access
AiderTerminal, alongside your editorApache-2.0Most hosted and local modelsYour machineAuto-commits each change to git
ClineVS Code, JetBrains, CLI, desktopApache 2.0 (JetBrains plugin not open source)Many providers, Ollama, LM StudioYour machineEvery edit and command by default
gooseDesktop, CLI, APIApache-2.015+ providersYour machineCompletely Autonomous by default; three other modes
Qwen CodeTerminal, plus editor and desktopApache-2.0OpenAI, Anthropic, Gemini, Qwen, Ollama, vLLMYour machinePlan, Ask Permissions, Auto-Edit, Auto, YOLO
Kilo CodeVS Code, JetBrains, CLI, Cloud AgentMIT500+ modelsYour machine; Cloud Agent on the webkilo run --auto for CI auto-approves
SafeguardCLI, desktop, iOS, Android, IDE and browser extensions, cloudSafeguard productBring your Claude, ChatGPT or Codex plan; /modelScans on your machine; only results uploadedAsk, Auto (default) or Yolo

Which option fits your team

This is based on what each tool says it supports, not on any test of output quality.

  • Already on Claude Team or Enterprise. Claude Code is included, so the simplest change may be none. Add a scan step after each session.
  • Standardised on ChatGPT Business or Enterprise. Codex CLI signs in with those plans, and its IDE extension and desktop app cover people who avoid the terminal.
  • Google Cloud shops. Gemini CLI authenticates through Vertex AI. Confirm the Antigravity CLI note does not affect your accounts.
  • Want provider choice or local models. OpenCode, Cline, Kilo Code, Qwen Code, goose and Aider all list multiple providers, and most list local options such as Ollama.
  • IDE-first teams. Cline and Kilo Code ship VS Code and JetBrains integrations; Claude Code and Codex have IDE extensions too.
  • Live in git. Aider commits every change, so review and rollback are normal git tasks.
  • Want to switch but keep your current plan. Safeguard lets you bring your Claude, ChatGPT or Codex plan, adds vulnerability knowledge to the assistant, and runs on every surface you use.
  • Security-conscious and regulated teams. Set the approval mode on purpose and put a vulnerability check between any agent and your main branch. Our guide to checking what a coding agent changed walks through it.

Moving from Claude Code to another tool

Migration steps

  1. Inventory your Claude Code setup. List your CLAUDE.md files, skills, hooks, MCP servers, permission rules, current permission mode and any CI jobs that call claude -p.
  2. Take a baseline scan. Before the new agent touches anything, run safeguard scan --dir . and keep ./output/vuln.json as your starting point.
  3. Install the new tool and sign in with the vendor's own install command and an account your organisation approves.
  4. Move your instructions. Find out which project instructions file the new tool reads, then copy across the parts of CLAUDE.md that still apply.
  5. Reconnect MCP servers one at a time. Each tool has its own config location, such as ~/.gemini/settings.json for Gemini CLI.
  6. Set the approval mode before the first task. Map Manual to the closest equivalent, such as Codex read-only with on-request, goose Manual Approval, Qwen Code Ask Permissions or Safeguard Ask.
  7. Pilot on one repository. Scan again afterwards and compare with the baseline. Anything new came from the pilot.
  8. Update CI last. Replace claude -p steps with the new tool's non-interactive mode, and keep a scan or safeguard exec step after it.
  9. Clean up credentials. Run /logout in Claude Code if you are leaving it, and unset any ANTHROPIC_API_KEY you no longer need.

Common mistakes

  • Starting in the most permissive mode. Claude Code's bypassPermissions, Codex's danger-full-access, Qwen Code's YOLO and Safeguard's Yolo all approve everything. Claude's docs reserve bypass mode for containers and VMs. Treat the others the same way.
  • Assuming defaults match. Cline asks before every edit by default; goose runs autonomously by default.
  • Connecting a subscription against its terms. OpenCode's providers page says plugins exist to use Claude Pro or Max models in OpenCode and that "Anthropic explicitly prohibits this." Read your provider's terms first.
  • Ignoring maintenance signals. Check release dates and notices, such as Aider's release gap and Gemini CLI's Antigravity notice, before a team rollout.
  • Reading only the code diff. A diff shows the lines an agent touched, not whether a package it added carries a known vulnerability.

Switch to Safeguard and do the work properly

If you want to switch, Safeguard is the alternative that keeps what you already pay for. Bring the Claude, ChatGPT or Codex plan you already pay for and use it inside the Safeguard CLI. Safeguard adds no extra charge for that usage; your plan's own usage limits and terms still apply. /model shows or switches the AI model; see the CLI docs for connecting a model. And if you would rather stay in the chat you already use, connect Claude or ChatGPT to the Safeguard MCP server.

The Safeguard CLI scans code, container images and SBOMs on your own machine, sends only the results to the Safeguard platform, and includes an assistant that writes code and fixes what it finds.

Install and start the CLI

On macOS and Linux run curl -fsSL https://cli.safeguard.sh/install | bash. On Windows run irm https://cli.safeguard.sh/install.ps1 | iex. It is a single static binary with no Node, Python or JVM needed, on x86_64 or arm64 (Windows is x86_64 only).

Run safeguard to open the interactive terminal, type /login to sign in through the browser, then /scan . to scan the folder you are in. Then ask in plain language:

how many critical vulns do we have
fix the lodash CVE in this repo

Type @ to attach a file from the folder you started in, and /resume picks up the last session in that folder.

Use it on your machine

The assistant has tools for your local files and for your Safeguard data, and picks whichever the question needs. It can write files, edit code and run commands, with your approval, so it works as a general terminal assistant too. The docs give "what's the latest file in ~/Downloads" as an example next to the security questions. More in our post on the Safeguard CLI as a security-aware coding assistant.

This demo shows a computer running the Safeguard CLI attached with a folder, a fix requested, the diff reviewed and the command approved before it runs. The demo notes that computer work from Search is available and expanding.

Click through it at your own pace, or open it full screen.

Approvals

Tools that change things ask before they act. /permissions sets how often: Ask prompts before every action, Auto approves actions it recognises and asks about anything new (the default), and Yolo approves everything. For a repository you care about, start with Ask.

Keep using Claude or ChatGPT through MCP

Connect Claude or ChatGPT to the Safeguard MCP server and ask about your findings from the chat you already use. This demo connects Claude with OAuth and chooses which tools Claude can use.

Click through it at your own pace, or open it full screen.

Scan what any agent changed

safeguard scan --dir .
safeguard scan --repo https://github.com/your-org/your-repo
safeguard scan --image your-image:latest
safeguard scan --sbom ./sbom.cdx.json

Each builds an SBOM and matches it against vulnerability databases, writing JSON files such as vuln.json and license.json under ./output. Scan before and after an agent session, and the difference is what the session did to your risk. safeguard validate checks CycloneDX, SPDX and VEX documents. When the local runner runs platform scan jobs, your source code never leaves the machine; only SBOMs and findings are uploaded. Policies and gates are evaluated in the platform, which also offers reachability analysis and autonomous remediation with fix PRs (off by default).

CI with safeguard exec

safeguard exec "summarise the critical findings in this repository" runs one non-interactive assistant turn. Put it after your agent's CI step.

One platform on every surface

Safeguard is not only a terminal tool. Start in the CLI, continue in the desktop app for Windows, macOS and Linux, where you ask your supply chain anything in plain English in a native window, and check findings on your phone with the iOS and Android apps. The IDE extension covers VS Code, JetBrains and Open VSX editors, and there is a browser extension for Chrome. With nothing to install, you can use the Cloud CLI on Safeguard's infrastructure, a cloud browser, or a cloud sandbox tenant against a seeded demo repo, free for seven days with no card.

Download Safeguard and start with /scan . on the repository you work in today.

FAQ

Is Claude Code free?

Claude's pricing page marks Claude Code as not included on the Free plan and says it is included in all paid plans: Pro, Max, Team and Enterprise. You can also use it through a Claude Console account billed via the API, Amazon Bedrock, Google Cloud's Agent Platform or Microsoft Foundry.

Which Claude Code alternatives are open source?

All eight in this guide publish source under an open-source licence: Codex CLI (Apache-2.0), Gemini CLI (Apache-2.0), OpenCode (MIT), Aider (Apache-2.0), Cline (Apache 2.0, except its JetBrains plugins), goose (Apache-2.0), Qwen Code (Apache-2.0) and Kilo Code (MIT).

Can I switch to Safeguard and keep my Claude, ChatGPT or Codex plan?

Yes. Bring the Claude, ChatGPT or Codex plan you already pay for and use it inside the Safeguard CLI. Safeguard adds no extra charge for that usage; your plan's own usage limits and terms still apply. You can also connect Claude or ChatGPT to the Safeguard MCP server and use Safeguard from that chat.

Can I use my Claude subscription in other coding agents?

Check Anthropic's terms first. OpenCode's providers page says Anthropic explicitly prohibits using Claude Pro or Max models through third-party plugins.

Can I use my ChatGPT plan for coding in the terminal?

Yes. Codex CLI signs in with a ChatGPT Plus, Pro, Business, Edu or Enterprise plan, and you can bring your ChatGPT plan to the Safeguard CLI.

Do these tools ask before running commands?

It depends on the tool and mode. Cline asks before every edit and command by default; goose runs autonomously by default. Codex combines a sandbox with approval policies, Claude Code has six permission modes, and the Safeguard CLI has Ask, Auto and Yolo.

Where does my code go?

Terminal agents work on files on your machine, and your model provider receives what the agent sends it. Claude Code on the web, Codex Web and Kilo's Cloud Agent run in the vendor's cloud. With the Safeguard local runner, source code stays on your machine and only SBOMs and findings are uploaded.

Try it yourself

This walkthrough sets up the runner on your own machine: pick the platform, start it, approve it with its device code, then use the same CLI to scan from the terminal.

Click through it at your own pace, or open it full screen.

Quick check

Which Claude Code permission mode do Anthropic's docs reserve for isolated containers and VMs?

bypassPermissions, which runs everything without asking. Treat Codex danger-full-access, Qwen Code YOLO and Safeguard Yolo the same way.

How do you find out what a coding agent session did to your dependency risk?

Run safeguard scan --dir . before the session and again after it, then compare the two vuln.json files under ./output. Anything new came from the session.

Sources

Last reviewed: 21 October 2026.

Never miss an update

Weekly insights on software supply chain security, delivered to your inbox.

Self-healing security runs on Safeguard.

Your first fix PR is minutes away.

No sales call required, even your agent can complete the purchase over MCP.