AI Tech NewsYour portal to artificial intelligence
Home / Claude Code, Antigravity CLI (AGY), and Codex CLI: A Hands-On Guide to Three AI Coding CLIs

Claude Code, Antigravity CLI (AGY), and Codex CLI: A Hands-On Guide to Three AI Coding CLIs

From installation and sign-in to everyday commands, learn how to use Claude Code, Antigravity CLI (AGY), and Codex CLI in the terminal, and how to pair them with PM2 to keep services running on a VPS.

In this article
  1. The Short Version
  2. What Problem Do They Solve?
  3. Installation and Basic Usage
  4. Quick Comparison
  5. Pairing AI CLIs with PM2 on a Server
  6. Who Are They For?
  7. Who Might Not Be a Good Fit?
  8. Our Take
  9. Sources

The terminal is becoming AI's main stage. The three command-line coding agents developers are watching most closely are Anthropic's Claude Code, Google's Antigravity CLI (AGY), and OpenAI's Codex CLI. They share the same core idea: let AI read files, write code, and run commands directly inside your project folder. But they differ in how you install them, how you interact with them, and where they fit best.

Think of these three tools as three "on-site engineers": Claude Code is strong at long conversations and large refactors, AGY offers a visual collaboration interface, and Codex CLI shines at lightweight tasks and automation scripts.

The Short Version

All three are "AI coding agents that run in your terminal." Install one, run its command inside a project directory, and you're ready to go. The main differences are the interface (plain text vs. TUI), how far automation goes, and how each one fits into its ecosystem.

What Problem Do They Solve?

Getting AI help with code used to mean copying and pasting back and forth between browser tabs and your editor, and the AI never saw the full context of your project. These CLIs address that:

  1. Missing context: The AI reads local files and directory structure directly, so you don't paste code by hand.
  2. Broken workflow: The AI can edit files, run tests, and execute commands itself, so you don't relay every result step by step.
  3. Remote and automation needs: With no GUI overhead, CLIs work well on a VPS over SSH or inside CI/CD scripts.

Installation and Basic Usage

1. Claude Code

Install (pick one):

# Official install script
curl -fsSL https://claude.ai/install.sh | sh

# Or via npm
npm install -g @anthropic-ai/claude-code

Launch and sign in:

cd your-project
claude

On first launch, it walks you through signing in to your Anthropic account in the browser (or setting ANTHROPIC_API_KEY). After that, you can type requests in plain language, such as "Add input validation to this API."

Common commands:

/init          # Scan the project and generate a CLAUDE.md project guide
/model         # Switch models
/permissions   # Manage file access and command permissions
/clear         # Clear the conversation context
claude -p "Fix the build error"   # Non-interactive mode, good for scripts

2. Antigravity CLI (AGY)

Install:

curl -fsSL https://antigravity.google/cli/install.sh | bash

Launch:

cd your-project
agy

AGY opens a graphical terminal user interface (TUI) rather than plain text output. On first run, you grant "Workspace Trust" so the agent can read the whole directory and edit files or run tests. You can assign tasks directly in the conversation, such as "Migrate this project from Express to Hono." AGY breaks the work into steps, shows progress for each one, and waits for your confirmation before high-risk operations.

3. Codex CLI

Install and sign in:

npm install -g @openai/codex
codex login

Launch:

cd your-project
codex

In interactive mode you simply chat with it. To run a single task automatically in a script or CI pipeline, use the non-interactive exec mode:

codex exec "Add unit tests for this function"

Codex CLI offers different levels of autonomy, such as a suggest mode that only proposes changes, an auto-edit mode that edits files but doesn't run commands, and a full-auto mode that can run commands. You can loosen permissions gradually as trust grows, which makes it a good fit for a VPS or remote server over SSH.

Quick Comparison

Need Claude Code Antigravity CLI (AGY) Codex CLI
Plain-text terminal use Supported Mainly a graphical TUI Supported
Remote SSH / VPS use Well suited Better for local development Well suited
Scripts / CI integration -p non-interactive mode Mostly interactive tasks for now codex exec built for automation
Project context CLAUDE.md project guide Reads the whole workspace Reads the project directory and config files
Best for Large refactors, long task conversations Visual multi-file collaboration Lightweight single tasks, scripted workflows

Pairing AI CLIs with PM2 on a Server

These CLIs are interactive tools. They don't stay running like a web service. But if you install them on a VPS and use PM2 to manage the programs the AI produces, you can link "AI writes the code" and "the service stays up" into one workflow:

# After generating or editing code with Codex CLI's automation mode
codex exec "Add the new feature to src/index.ts and make sure the tests pass"

# Hand it to PM2 to keep it running
pm2 start ecosystem.config.cjs
pm2 save

In other words, the AI CLI does the writing and PM2 does the babysitting. The roles are clear and don't overlap.

Who Are They For?

  • Developers who live in the terminal and value speed: All three cut down on window switching.
  • Engineers who maintain a VPS or remote servers: Claude Code and Codex CLI work especially well over SSH.
  • Teams that want a more visual collaboration interface: AGY's TUI makes multi-file tasks easier to follow.

Who Might Not Be a Good Fit?

  • Beginners with no command-line experience: All three require basic terminal skills.
  • Environments that are very cautious about automated command execution: Start with suggest mode or read-only permissions, watch how the AI behaves, and loosen permissions step by step.

Our Take

The competition among these CLIs has shifted from "can it write code" to "how safely and efficiently can AI fit into existing workflows." In practice you don't have to pick just one. Many teams mix them by task: Claude Code for refactors that need long reasoning, AGY for multi-file work that benefits from visual review, and Codex CLI for turning repetitive tasks into scripts that run on a schedule through PM2 or CI. Knowing how they differ lets you pick the right tool for each situation instead of being locked into one.

Sources