AI coding assistants have become essential tools for developers, but many rely solely on IDE extensions like GitHub Copilot or Cursor. While these are valuable, AI CLI tools offer unique advantages that can significantly boost your productivity and code quality.
CLI-based AI tools provide a focused, distraction-free environment with full terminal context, making them ideal for complex tasks, debugging, and working with entire codebases.
Anecdotally, developers have noticed that CLI tools often produce higher-quality, more accurate results than their IDE counterparts - possibly due to better context handling and fewer UI constraints.
Video: You've Been Using AI the Hard Way (Use This Instead) (33 min)
Why use AI CLI tools?
✅ Benefits
Better context awareness - CLI tools can access your entire terminal history, file system, and git state, providing richer context for better suggestions
Higher quality output - SSW developers have observed that CLI tools consistently produce more accurate and contextually appropriate code than IDE extensions
Better for complex tasks - Debugging, refactoring, and multi-file operations often work better in the CLI
Universal workflow - Works across any editor or environment (Vim, VS Code, Notepad++, etc.)
Git integration - Natural integration with git commands and workflows
Batch operations - Easier to automate and script repetitive tasks
❌ Trade-offs
Learning curve - Requires comfort with command-line interfaces
No inline suggestions - Unlike IDE extensions, you won't get suggestions as you type
Context switching - Moving between your editor and terminal requires discipline (though most CLI tools now integrate with VS Code and JetBrains to show diffs in your editor)
Setup overhead - May require additional configuration compared to IDE plugins
Less visual - Reviewing large changes in a terminal is harder than in an editor
Popular AI CLI tools
1. ⭐ Claude Code (Recommended)
Claude Code is a fan favourite at SSW. It runs in the terminal, and the same agent is also available in VS Code, JetBrains, a desktop app, and the browser.
✅ Pros:
⭐️ Extensibility - Claude Code is the most configurable agent we've used. Custom subagents, skills, plugins, and MCP servers let you package your team's workflows, and hooks run scripts before and after tool calls. This is excellent for deterministic behaviour, allowing you to guarantee that certain scripts or commands will run (e.g. a linter after every edit)
Integration - Claude has integrations that aren't available with other tools OOTB, such as mentioning Claude in Slack to turn a bug report into a pull request
❌ Cons:
Flexibility - Claude Code only uses Claude models. You can run them through Amazon Bedrock, Google Vertex AI, or Microsoft Foundry, but you can't switch to another vendor's models (there are community workarounds, like https://claudish.com/)
Codex is OpenAI's open-source coding agent. It is included with ChatGPT paid plans, so many developers already have access without an extra subscription.
✅ Pros:
⭐️ Sandboxing - Codex runs commands in a sandbox by default and lets you choose how much it can do without asking (read-only, edit files, or full access). This makes it a safe choice for letting an agent work unattended
Local to cloud - Hand a task off to Codex cloud to run in the background, then apply the result to your local repository. The same agent is also available as an IDE extension and a desktop app
Open standards - Codex reads AGENTS.md for project instructions and supports MCP servers, so your setup is portable to other agents
❌ Cons:
Flexibility - Codex is built for OpenAI models. If you want to use models from other providers, OpenCode is a better fit
GitHub's official command-line tool for AI-assisted development. Unsurprisingly, Copilot CLI provides first-class integration with GitHub.
✅ Pros:
⭐️ Delegation - Prefix a prompt with & to hand the task (with context!) to the GitHub Copilot coding agent in the cloud, freeing your terminal for other work
Model choice - One Copilot subscription gives you models from Anthropic, OpenAI, and Google, and you can switch mid-session with /model
Custom agents - You can define custom agents via markdown files with options to define agents at user, repository, and org level within GitHub
❌ Cons:
Subscription - Copilot CLI requires a GitHub Copilot plan. If you're all in on Team GitHub, this is fine, but if you want to bring any model or provider you're better off with something like OpenCode
One of SSW's Solution Architects has created a sandboxed version of Copilot CLI, Copilot Here. If you're working
in a high-sec environment or just want added protection around what AI can and cannot access during sessions, we highly recommend checking this out. It spins up within Docker,
is wired to its own reverse-proxy, and provides external controls around the agent itself.
4. OpenCode
OpenCode is an open-source agent that gives you the most options when it comes to models, providers, and extensibility. While it does provide some free models
OOTB, you are expected to BYO model subscription.
✅ Pros:
⭐️ Flexibility - OpenCode allows you to select from almost any model, as well as select your own provider. This kind of agnosticism is a huge win for users,
especially with the AI landscape being as volatile as it is. Being able to learn one CLI, define your own custom agents within it, and then switch the models and providers
arbitrarily is a godsend
Custom agents - Custom agents are again defined by markdown files, and while they can be defined and used at a repository level, the general principle of OpenCode is for agents to be user-level definitions
Subagent usage - OpenCode is better at reasoning about subagent usage automatically, rather than needing to be explicitly directed to do so. On a long enough agent session, context compacting is a real problem and can degrade the quality of output, so having enthusiastic subagent usage is a big plus
❌ Cons:
Integration - Being an independent open-source agent, OOTB integration may not be as robust (or available as quickly) as proprietary tools like Copilot CLI.
IDE extensions for real-time suggestions while coding, and CLI tools for complex problem-solving, debugging, and refactoring tasks.
Getting started
Choose a tool - Start with the tool that matches a subscription you already have: Claude Code (Claude), Codex (ChatGPT), or GitHub Copilot CLI (Copilot). Try OpenCode if you want to bring your own model
Install and configure - Follow the installation instructions for your chosen tool
Start small - Begin with simple queries like explaining commands or generating shell scripts
Integrate into workflow - Gradually incorporate CLI AI into your debugging and refactoring workflows
Experiment - Try different tools to find what works best for your workflow
Best practices
Provide context - The more information you give (file paths, error messages, what you've tried), the better the results
Iterate - CLI tools work best in a conversational workflow - refine your prompts based on responses
Review output - Always review and understand generated code before using it
Combine with version control - Use git to track AI-generated changes and easily revert if needed
Use for learning - Ask CLI tools to explain their suggestions to deepen your understanding
Plan before you build - Use plan mode (or a Plan agent) to agree on the approach before the agent starts editing files
By incorporating AI CLI tools into your workflow alongside IDE extensions, you can leverage the strengths of both approaches for maximum productivity and code quality.