Skip to content

Instantly share code, notes, and snippets.

@iSapozhnik
Created February 6, 2026 09:13
Show Gist options
  • Select an option

  • Save iSapozhnik/e7d2bb0599e0328e49c30bdd3eea27c3 to your computer and use it in GitHub Desktop.

Select an option

Save iSapozhnik/e7d2bb0599e0328e49c30bdd3eea27c3 to your computer and use it in GitHub Desktop.
Common CLI tools for Agentic Coding

Agent Guidelines

Token-efficient build output

  • Always pipe Xcode/Swift build logs through xcsift to keep transcripts small and structured.
  • Remember to redirect stderr to stdout (2>&1) so xcsift sees the full log stream.

Common commands

  • Basic build: xcodebuild -project <app_name>.xcodeproj -scheme <scheme_name> -configuration Debug build 2>&1 | xcsift
  • Run tests + coverage: xcodebuild test -enableCodeCoverage YES 2>&1 | xcsift --coverage
  • Show warnings explicitly: xcodebuild build 2>&1 | xcsift --print-warnings
  • Quiet success noise: xcodebuild build 2>&1 | xcsift --quiet
  • Swift Package Manager workflows: swift build 2>&1 | xcsift and swift test 2>&1 | xcsift

Use the flags above (e.g., --coverage-details, --coverage-path) as needed, but keep the default JSON output unless the user asks for more detail.

Fast file search

  • Use fd for locating files—it's a fast, user-friendly alternative to find.
  • Typical commands: fd src (search everywhere for "src"), fd -e ts foo (look for TypeScript files matching "foo").
  • Prefer fd for repo-wide file discovery unless the task explicitly requires another tool.

Code search

  • Use ripgrep (rg) for searching within files—it is much faster than grep/ack/ag, respects .gitignore, and has smart defaults.
  • Typical commands: rg "TODO" (find TODOs), rg -n --glob '!dist' pattern.swift (search with line numbers while excluding dist).

Git & GitHub

  • Prefer the GitHub CLI (gh) for git-related commands when possible (e.g., PRs, comparisons, release info, repo metadata).
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment