Universal Ctags
$ ctags Community Low RiskUniversal Ctags (ctags) indexes classes, functions, types, and variables across 100+ languages in milliseconds. Passing -f - --output-format=json streams structured NDJSON symbol maps directly to stdout without writing a tags file on disk.
brew install universal-ctags Streaming ctags -f - --output-format=json indexes an entire repo locally in one command without maintaining an MCP symbol server.
Agent-Readiness Checklist
Local Probe EvidenceFCRS-1.0 6-Dimension Breakdown
Supports --output-format=json and --fields= customization when built with Jansson, though macOS ships an incompatible BSD ctags by default.
--output-format=jsonand-f -enable structured stdout streaming
Read-only when -f - is used; default invocation writes ./tags unless redirected to stdout.
- Zero network calls; file write avoided via
-f -
Easy via brew install universal-ctags and Linux packages, though PATH priority vs BSD ctags matters on macOS.
- Requires installing
universal-ctagsseparately from macOS systemctags
Rapidly builds a cross-language symbol outline for unfamiliar repositories in a single pass.
- Supports over 100 programming languages out of the box
Actively maintained community successor to Exuberant Ctags.
- Active
universal-ctags/ctagsrepository
Detailed Sphinx documentation at docs.ctags.io plus --list-languages / --list-fields introspection.
- Self-describing
--list-*flags and Sphinx manual
Security, Auth & Guardrails
None required; reads local source files only.
100% free, offline, and open-source (GPL-2.0).
# Universal Ctags Agent Rules - ALWAYS pass `-f -` when inspecting symbols so `ctags` does not pollute the repo with a `./tags` file. - Exclude `node_modules`, `dist`, and `.git` with `--exclude`, and verify `ctags --version` is Universal (not macOS BSD ctags).
Agent-Ready Command Recipes
Safe Read-Only Queries
ctags --output-format=json --fields=+nK -R -f - src/
Emits JSON symbol objects with line numbers (+n) and full kinds (+K) without creating a tags file.
Controlled Writes & Previews
tags index file for editors ctags -R --exclude=node_modules --exclude=.git -f tags src/
Generates a local tags file while excluding dependency and VCS directories.
Strengths for Agents
- + Indexes symbols across 100+ languages in milliseconds with
--output-format=json. - + Fine-grained
--fieldsand--kinds-<lang>filtering keeps output compact.
Caveats & Pitfalls
- ! Default invocation writes a
./tagsfile unless-f -is passed. - ! JSON output requires a Jansson-enabled Universal Ctags build (not macOS stock
/usr/bin/ctags).