cheat-sheets

Codex, Gemini and Copilot CLIs

Terminal coding agents from OpenAI, Google and GitHub, comparable to Claude Code. Each reads a project instruction file, edits files and runs commands with an approval model.

Documentation: Codex CLI · Gemini CLI · GitHub Copilot CLI

Verification: none of these CLIs is installed here and nothing was executed. Every row is from vendor docs as remembered and is (unverified). These tools change quickly: run TOOL --help before relying on any flag.

Codex CLI (OpenAI) (unverified) #

COMMANDDESCRIPTION
npm install -g @openai/codexInstall
codexInteractive session
codex "PROMPT"Start with a prompt
codex exec "PROMPT"Non-interactive run
codex loginSign in with ChatGPT account or an API key
~/.codex/config.tomlUser configuration
AGENTS.mdProject instructions it reads

Gemini CLI (Google) (unverified) #

COMMANDDESCRIPTION
npm install -g @google/gemini-cliInstall
geminiInteractive session
gemini -p "PROMPT"Non-interactive prompt
gemini -m MODELChoose a model
GEMINI_API_KEYEnvironment variable for API key auth
GEMINI.mdProject instructions it reads
~/.gemini/settings.jsonUser settings, including MCP servers

GitHub Copilot CLI (unverified) #

COMMANDDESCRIPTION
npm install -g @github/copilotInstall
copilotInteractive session
copilot -p "PROMPT"Non-interactive prompt
/loginSign in from within the session

Requires a Copilot subscription. The older gh copilot extension is a different, narrower tool (unverified).

Comparison #

TOOLPROJECT FILEMCP
Claude CodeCLAUDE.mdYes, see MCP
Codex CLIAGENTS.mdYes (unverified)
Gemini CLIGEMINI.mdYes (unverified)
Copilot CLI.github/copilot-instructions.md (unverified)Yes (unverified)

Safe Use #

  • Run agents in a repo or container you can discard; commit before a long run.
  • Keep permissions narrow and avoid any “skip all approvals” mode outside a sandbox.
  • Never put API keys in the project instruction file. See Secret Scanning.

See Also #

Search all sheets

Tip: / or Ctrl/Cmd+K to open, Esc to close.