Open-source alternatives to GitHub Copilot include Cline, Kilo Code, OpenCode, Aider, Tabby and the Codex CLI, and Claude Code is a commercial option. They differ in interface, model choice, where the agent runs and how it asks before acting. The Safeguard CLI and IDE extension add an assistant that also knows your vulnerabilities.
Switching to Safeguard does not mean giving up 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 have open.
What GitHub Copilot covers today
Copilot is no longer only a completion engine in one editor. GitHub's docs describe it as "an AI assistant that helps you write, understand, and ship software", and it runs in two modes: assistive, where it responds while you work, and agentic, where you describe a goal and it works through several steps.
Where it runs. GitHub's "where to use Copilot" page lists the GitHub website, the GitHub Copilot app, Copilot CLI, IDEs (Visual Studio Code, Visual Studio, JetBrains IDEs, Eclipse and Xcode), the Copilot SDK, GitHub Mobile and GitHub Desktop. In an IDE you get inline suggestions and an agent that can edit files. In VS Code, when the agent wants to run a tool, an approval prompt appears; you expand the details, check the inputs and select Allow.
Copilot CLI. You install it with npm install -g @github/copilot (Node.js 22 or later), Homebrew, WinGet or an install script, and sign in with /login or a fine-grained token. The first time it needs a tool that changes files or runs something, it offers three choices: allow this command once, allow the tool for the session, or deny. Flags such as --allow-all-tools, --allow-tool and --deny-tool change that, and the docs warn that with all tools allowed "Copilot has the same access as you do to files on your computer". It also offers an optional local sandbox with /sandbox enable, and you can point it at your own OpenAI-compatible, Azure OpenAI or Anthropic provider through environment variables.
Copilot cloud agent. You can assign work from an issue, a pull request or the agents panel, and the agent works "in an ephemeral cloud development environment, rather than your local IDE". It changes one repository and one branch per task, and each session has a 59-minute limit. GitHub's risk page lists the guardrails: internet access is restricted, only people with write access can start it, it pushes to a copilot/ branch, workflows do not run on its code until someone with write access approves them, and it opens draft pull requests it cannot approve or merge. It also checks its own changes with CodeQL, the GitHub Advisory Database and secret scanning.
Plans. GitHub lists Copilot Free, Student, Pro, Pro+ and Max for individuals, and Copilot Business and Copilot Enterprise for organisations. Usage is measured in GitHub AI Credits, Free and Student use automatic model selection only, and Copilot is not currently available for GitHub Enterprise Server.
So when people look for an alternative, they are usually after one of four things: a different interface, a wider choice of models, code that stays on their own machine or server, or different control over approvals. The table below is built around those four.
GitHub Copilot alternatives compared
Every open-source tool in this section has a licence we confirmed on its repository page. "Where code runs" means where the tool itself executes. Prompts and the files an agent reads still go to whichever model provider you configure, unless you run a local model.
| Tool | Interface | Licence | Models | Where code runs | Approvals we found |
|---|---|---|---|---|---|
| GitHub Copilot (reference) | IDEs, GitHub.com, CLI, app, mobile | Copilot plan, Free to Enterprise | Model selection varies by plan; CLI can use your own provider | Your machine for IDE and CLI; cloud agent in GitHub's environment | CLI asks per tool; cloud agent needs workflow approval and a human merge |
| Aider | Terminal, plus comments in any editor | Apache 2.0 | Most hosted LLMs and local models | Your machine | Commits each change to git automatically |
| Cline | VS Code, JetBrains, CLI, desktop app, SDK | Apache 2.0 (JetBrains plugin not open source) | Anthropic, OpenAI, Google, OpenRouter, Bedrock, Vertex, Ollama, LM Studio, OpenAI-compatible | Your machine | Extension asks per edit and command; CLI auto-approves by default |
| Codex CLI | Terminal, IDE extension, desktop app, Codex Web | Apache 2.0 (CLI) | OpenAI, via ChatGPT plan or API key | Your machine in a sandbox; Codex Web in the cloud | Auto preset: workspace writes, asks to go further, network off |
| Kilo Code | VS Code, JetBrains, CLI, Cloud Agent | MIT | 500+ models through Kilo, or your own keys | Your machine; Cloud Agent hosted | Allow, Ask or Deny per tool; --auto approves prompts |
| OpenCode | Terminal UI, beta desktop app | MIT | 75+ providers and local models | Your machine | Most permissions default to allow; .env reads denied |
| Tabby | Self-hosted server with VS Code, JetBrains and Vim plugins | Apache 2.0, except the ee/ directory | Open models you serve yourself | Your own server | Completion and chat; no agent approval model described |
| Claude Code (not open source) | Terminal, VS Code, JetBrains, desktop app, web | Claude plan or Console account | Claude; CLI also supports third-party providers | Your machine; web sessions in the cloud | auto mode by default from v2.1.283; Manual asks each time |
Aider
Aider describes itself as "AI pair programming in your terminal". You install it with pip, start it in a project folder with a model and an API key, and it works with most hosted LLMs and local models. It is licensed under Apache 2.0. Know before adopting: its README says it "automatically commits changes with sensible commit messages", so your git history becomes the undo button, and you can also ask for changes by writing comments in your editor.
Cline
Cline is "the open source coding agent in your IDE, terminal, & desktop", with a VS Code extension, a JetBrains plugin, a CLI, a desktop app for macOS and Windows, and an SDK. The repository is Apache 2.0, but its README says the JetBrains plugins are not open-sourced. In the extension's Act mode, "every file edit and terminal command requires your approval" unless you turn on auto-approve. Know before adopting: the CLI's --auto-approve flag defaults to true, so pass false when you want prompts.
Codex CLI
The Codex CLI is "a coding agent from OpenAI that runs locally on your computer", licensed under Apache 2.0. You sign in with a ChatGPT plan or an API key, and the same account reaches the IDE extension for VS Code, Cursor and Windsurf, a desktop app and Codex Web. Know before adopting: its default Auto preset pairs workspace writes with on-request approvals, keeps network access off, and keeps .git, .agents, .codex and .aws read-only even inside the writable folder.
Kilo Code
Kilo Code is an MIT-licensed agent with a VS Code extension, a JetBrains plugin, a CLI and a web Cloud Agent, and its README says the CLI is a fork of OpenCode. You can use models through Kilo or bring your own provider keys. In JetBrains you set each tool to Allow, Ask or Deny. Know before adopting: the right-click Auto-Approve toggle in JetBrains applies to every Kilo session in the IDE, and kilo run --auto approves permission prompts unless a rule denies the action.
OpenCode
OpenCode is "the open source AI coding agent", MIT licensed, with a terminal UI and a beta desktop app for macOS, Windows and Linux. Its provider docs list more than 75 providers, local models, a ChatGPT Plus or Pro sign-in and a GitHub Copilot sign-in. Know before adopting: its permission docs say most permissions default to allow, with .env files denied for reading. We cover it in depth in our OpenCode alternatives guide.
Tabby
Tabby is a "self-hosted AI coding assistant" and calls itself "an open-source and on-premises alternative to GitHub Copilot". It runs as a server you host, with no database or cloud service needed, and editor plugins for VS Code, JetBrains IDEs and Vim. Its LICENSE file puts the project under Apache 2.0 except the ee/ directory, which has its own licence. Know before adopting: the JetBrains plugin needs Node.js 18 or later, and the most recent server release on the README is v0.30.
If open source is not a requirement: Claude Code
Claude Code is Anthropic's "agentic coding tool that reads your codebase, edits files, runs commands, and integrates with your development tools", available in the terminal, VS Code, JetBrains, a desktop app and the web. Most surfaces need a Claude subscription or an Anthropic Console account. Its docs say that from v2.1.283, auto mode, where a classifier reviews actions instead of you, is the built-in starting mode for terminal and VS Code sessions, and that Manual mode asks before edits, shell commands and network access.
Two tools that have stopped
Older lists still mention Continue and Roo Code. Continue's repository now says it "is no longer actively maintained and is read-only for all users", after a final 2.0.0 release. Roo Code's repository was archived on 15 May 2026, and its disclaimer says the extension was shut down the same day. Both remain Apache 2.0, but plan for no further updates if you still run them.
Moving off Copilot, step by step
The steps below assume a Git repository and a team that wants to try one alternative on a branch before changing anything else. They work for any tool in the table.
Step 1: Decide what you are replacing. Inline completions, IDE chat, a terminal agent and an issue-to-pull-request agent are four different jobs. Tabby targets completion and chat on your own server. Aider, OpenCode and the Codex CLI live in the terminal. Cline and Kilo Code sit in VS Code and JetBrains. Copilot's cloud agent takes work from an issue and returns a pull request. If your team depends on that, check how a replacement would start work before you switch; in the table, Kilo's Cloud Agent and Codex Web are the hosted options.
Step 2: Write down your current approvals. If your team relies on the cloud agent's workflow approval or on its draft-only pull requests, note that down. Local agents do not inherit those rules, so you will set them up yourself in steps 4 and 6.
Step 3: Install the new tool with approvals on.
# Cline CLI, with prompts turned back on
npm i -g cline
cline --auto-approve false "add input validation to the signup handler"
# Codex CLI, then sign in with ChatGPT or an API key
npm install -g @openai/codex
codex
# Aider, with an Anthropic key
python -m pip install aider-install
aider-install
aider --model sonnet --api-key anthropic=YOUR_KEY
For OpenCode, run curl -fsSL https://opencode.ai/v2/install | bash, then /connect to pick a provider. For Kilo Code in VS Code or JetBrains, install it from the marketplace and set Allow, Ask or Deny per tool before your first task.
Step 4: Work on a branch and take a baseline.
git switch -c agent/signup-validation
curl -fsSL https://cli.safeguard.sh/install | bash
safeguard scan --dir .
The scan builds an SBOM and matches it against vulnerability databases. Results land as JSON files under ./output, including vuln.json and license.json, so you can compare before and after the agent's work.
Step 5: Run one real task and review the diff. Pick something small with tests, such as adding validation to one handler. Read every file the agent touched, run the tests yourself, and check whether it added or upgraded a dependency.
Step 6: Check the result before you merge.
git diff main --stat
safeguard scan --dir .
safeguard exec "summarise the critical findings in this repository"
The second scan tells you whether the agent's change brought in a known vulnerability. Our guide to checking coding agent changes goes further.
Step 7: Replace Copilot in CI, if you used it there. Each terminal tool has a headless form. Cline goes headless when you pipe input or pass --json, the Codex CLI has an exec mode, and Copilot CLI uses -p. Put a scan beside whichever you choose so the check does not depend on the agent:
git diff origin/main...HEAD | cline --json "review these changes"
safeguard scan --dir .
Common mistakes when switching
Assuming the new tool keeps Copilot's guardrails. The cloud agent's workflow approval, copilot/ branch and draft pull requests are GitHub features. A local agent on your laptop has none of them unless you set them up.
Leaving auto-approve on by accident. The Cline CLI auto-approves by default, OpenCode allows most actions, and Kilo's JetBrains toggle applies to every session. Set the mode before the first run, not after.
Running the agent from your home folder. Copilot CLI's docs say you should not normally launch it from your home directory, and the same habit is wise everywhere. Start agents in the project folder.
Picking a tool that has stopped. Continue and Roo Code are read-only now. Check the repository status before you roll a tool out to a team.
Forgetting where prompts go. "Runs on your machine" describes the tool, not the model. Unless you use a local model, the files the agent reads go to your provider.
Treating approval as review. An approved npm install can still pull in a package with a known CVE. Scan the change before it merges.
Do the work properly with the Safeguard CLI
Every tool above can write code. The Safeguard CLI writes code too, and it starts from your Safeguard data: the vulnerabilities in your dependencies and your scan results. It scans code, container images and SBOMs on your own machine, sends only the results to the platform, and includes an assistant that can fix what it finds. You can switch to it outright, or keep another agent and run it before every merge.
Keep the Claude, ChatGPT or Codex plan you 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. To connect a model, see the CLI docs or run /model in a session.
The other route runs the opposite way: connect ChatGPT or Claude to the Safeguard MCP server and ask about your findings from the chat you already use. This demo connects ChatGPT with OAuth and chooses which Safeguard tools it can use:
Click through it at your own pace, or open it full screen.
Install and first session
The CLI is a single static binary with no Node, Python or JVM needed. It runs on macOS, Linux and Windows, on x86_64 or arm64, with Windows on x86_64 only.
# macOS and Linux
curl -fsSL https://cli.safeguard.sh/install | bash
# Windows (PowerShell)
irm https://cli.safeguard.sh/install.ps1 | iex
Run safeguard with no arguments to open the interactive terminal. Type /login to sign in through your browser, then /scan . to scan the folder you are in. @ attaches a file from the folder you started in, and /resume picks up the last session in that folder.
Writing and fixing code on your machine
The assistant has tools for local files and for your Safeguard data, and it picks whichever the question needs. Ask it to "fix the lodash CVE in this repo" and it works from your actual findings, then writes files, edits code and runs commands, with your approval. Ask "how many critical vulns do we have" and it answers from the platform. The same tools make it a general terminal assistant: the docs give "what's the latest file in ~/Downloads" as an example.
This demo attaches a computer running the Safeguard CLI and a folder, asks for a fix, reviews the diff and approves the command 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 known actions and asks for anything new (the default), and Yolo approves everything. On a shared or sensitive repository, Ask is the cautious choice.
Scans and CI with safeguard exec
safeguard scan --dir .
safeguard scan --repo https://github.com/your-org/your-repo
safeguard scan --image your-image:tag
safeguard scan --sbom bom.json
safeguard exec "summarise the critical findings in this repository"
safeguard validate checks CycloneDX, SPDX and VEX documents, and safeguard exec runs one non-interactive assistant turn for pipelines. Policies and gates are evaluated in the Safeguard platform, not by the CLI. When the local runner handles platform scan jobs, your source code never leaves your machine; only SBOMs and findings are uploaded. The platform adds reachability analysis and autonomous remediation with fix pull requests, which is off by default.
In your editor, too
If Copilot lived in your editor, Safeguard can live there as well. The download page lists IDE extensions for VS Code, JetBrains IDEs and Open VSX editors such as Cursor and Windsurf, described as "inline security scanning, guardrail enforcement, and one-click remediation inside your editor".
One platform on every surface
Start in the terminal with the CLI, which also runs in CI/CD. Continue in the desktop app for Windows, macOS and Linux. Check findings on your phone with the iOS and Android apps, and add the browser extension in Chrome or Firefox. If you would rather install nothing, the Cloud CLI runs the CLI on Safeguard's infrastructure, and the cloud sandbox gives you an isolated tenant against a seeded demo repo, free for seven days with no card. For a deeper look at the assistant, read the Safeguard CLI as a security-aware coding assistant.
FAQ
What are the open-source alternatives to GitHub Copilot?
The ones we confirmed on their repository pages are Aider, Cline, the Codex CLI and Tabby under Apache 2.0, and Kilo Code and OpenCode under MIT. Note that Cline's JetBrains plugin is not open source and Tabby's ee/ directory has a separate licence.
Is there a self-hosted Copilot alternative?
Tabby is built for that: you host the server, choose the open models it serves, and connect VS Code, JetBrains or Vim plugins to it. Several terminal agents also accept local models through Ollama or LM Studio.
Does GitHub Copilot's cloud agent run on my machine?
No. GitHub's docs say it works in an ephemeral cloud development environment. Copilot in your IDE and Copilot CLI run locally, and the CLI can also start a cloud session in public preview.
If I switch to Safeguard, do I lose my Claude, ChatGPT or Codex plan?
No. 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.
Does the Safeguard CLI replace Copilot feature for feature?
No. It is not a feature-for-feature replacement for Copilot or any tool here. It writes and fixes code with an assistant that knows your findings, scans what any agent changed, and keeps source on your machine. Many teams run it alongside the agent they already use.
Which approval mode should I start with?
The narrowest one that lets you work. Cline's extension in Act mode, Kilo's Ask setting, Claude Code's Manual mode and the Safeguard CLI's Ask mode all prompt before actions. Loosen it once you trust the setup on a branch.
Does my source code leave my machine with these tools?
With any hosted model, prompts and the files the agent reads go to that provider. With Safeguard scans, results go to the platform, and when the local runner handles platform scan jobs 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.
Switch without giving anything up. Download Safeguard, connect the Claude, ChatGPT or Codex plan you already have, and read the CLI docs before your next merge. Comparing terminal agents more broadly? See AI coding agents compared.
Quick check
Can Copilot's cloud agent merge its own pull request?
No. GitHub's docs say it opens draft pull requests that it cannot approve or merge, and the person who asked for the work cannot approve that pull request either.
Which flag turns approval prompts back on in the Cline CLI?
Pass --auto-approve false. Cline's CLI docs list the default for that flag as true.
Sources
- GitHub Docs: What is GitHub Copilot
- GitHub Docs: Where to use GitHub Copilot
- GitHub Docs: Copilot plans
- GitHub Docs: About Copilot cloud agent
- GitHub Docs: Cloud agent risks and mitigations
- GitHub Docs: About Copilot CLI
- GitHub Docs: Install Copilot CLI
- VS Code docs: Agent tools
- Aider repository
- Cline repository
- Cline CLI docs
- OpenAI Codex repository
- Codex docs: IDE extension
- Codex docs: Agent approvals and security
- Kilo Code repository
- Kilo Code licence
- Kilo Code docs: JetBrains
- OpenCode repository
- OpenCode docs: Providers
- OpenCode docs: Permissions
- Tabby repository
- Tabby licence
- Tabby docs: IntelliJ plugin
- Claude Code docs: Overview
- Claude Code docs: Permission modes
- Continue repository
- Roo Code repository
- Safeguard download page
- Safeguard CLI docs
- Safeguard CLI docs: Interactive terminal
Last reviewed: 21 October 2026.