---
title: "overlane code refs"
description: "List callers and other uses of a symbol: path:line plus the trimmed line"
---

> Documentation Index
> Fetch the complete documentation index at: https://docs.overlane.app/llms.txt
> Use this file to discover all available pages before exploring further.

# overlane code refs

{/* Generated by apps/docs/scripts/generate.mjs (CLI pages from the command registry in packages/cli). Do not edit; run `pnpm --filter @overlane/docs gen`. */}

Prints the callers the index records for the name ("caller qualified path:line"), then the literal git grep -n -w matches that are not already listed, as "path:line text". Definitions and import lines are not repeated (import lines are counted). At most --limit lines (default 30). Output is plain text, one fact per line; --json prints the same facts as JSON. Exit 4 when nothing matches.

## Usage

```sh
overlane code refs name [--limit N]
```

## Arguments

| Argument | Required | Description |
| --- | --- | --- |
| `name` | yes | Symbol name |

## Flags

| Flag | Type | Required | Default | Description |
| --- | --- | --- | --- | --- |
| `--limit` | string | no | `30` | Most lines to print (default 30) |

## Examples

```sh
overlane code refs hashSecret
overlane code refs createRegistry --limit 10
```

## Behavior

- Effect: `read` (changes nothing).
- Needs credentials: no. Uses the network: no.
- Supports `--dry-run`: no. Accepts `--force`: no.
- Machine-readable description: `overlane schema code refs`.

## Result

With `--json` (the default when stdout is not a terminal) the command prints this JSON Schema's shape on stdout.

```json
{
  "type": "object",
  "properties": {
    "indexedCommit": {
      "type": [
        "string",
        "null"
      ]
    },
    "requestedCommit": {
      "type": [
        "string",
        "null"
      ]
    },
    "coverage": {
      "type": "object",
      "properties": {
        "files": {
          "type": "integer",
          "minimum": 0,
          "maximum": 9007199254740991
        },
        "symbols": {
          "type": "integer",
          "minimum": 0,
          "maximum": 9007199254740991
        },
        "uncovered": {
          "type": "integer",
          "minimum": 0,
          "maximum": 9007199254740991
        },
        "changedSinceIndex": {
          "type": "integer",
          "minimum": 0,
          "maximum": 9007199254740991
        }
      },
      "required": [
        "files",
        "symbols",
        "uncovered",
        "changedSinceIndex"
      ],
      "additionalProperties": false
    },
    "freshness": {
      "type": "string",
      "enum": [
        "fresh",
        "partial",
        "stale",
        "unavailable"
      ]
    },
    "incomplete": {
      "type": "boolean"
    },
    "notice": {
      "type": "string"
    },
    "overlay": {
      "type": "string"
    },
    "name": {
      "type": "string"
    },
    "source": {
      "type": "string",
      "enum": [
        "index",
        "search"
      ]
    },
    "callers": {
      "type": "array",
      "items": {
        "type": "object",
        "properties": {
          "kind": {
            "type": "string"
          },
          "qualified": {
            "type": "string"
          },
          "path": {
            "type": "string"
          },
          "line": {
            "type": "integer",
            "exclusiveMinimum": 0,
            "maximum": 9007199254740991
          },
          "endLine": {
            "type": "integer",
            "exclusiveMinimum": 0,
            "maximum": 9007199254740991
          }
        },
        "required": [
          "kind",
          "qualified",
          "path",
          "line"
        ],
        "additionalProperties": false
      }
    },
    "matches": {
      "type": "array",
      "items": {
        "type": "object",
        "properties": {
          "path": {
            "type": "string"
          },
          "line": {
            "type": "integer",
            "exclusiveMinimum": 0,
            "maximum": 9007199254740991
          },
          "text": {
            "type": "string"
          }
        },
        "required": [
          "path",
          "line",
          "text"
        ],
        "additionalProperties": false
      }
    },
    "skippedImports": {
      "type": "integer",
      "minimum": 0,
      "maximum": 9007199254740991
    },
    "more": {
      "type": "integer",
      "minimum": 0,
      "maximum": 9007199254740991
    },
    "linkedUses": {
      "type": "array",
      "items": {
        "type": "object",
        "properties": {
          "project": {
            "type": "string"
          },
          "repository": {
            "type": "string"
          },
          "package": {
            "type": "string"
          },
          "path": {
            "type": "string"
          },
          "line": {
            "type": "integer",
            "exclusiveMinimum": 0,
            "maximum": 9007199254740991
          },
          "text": {
            "type": "string"
          }
        },
        "required": [
          "project",
          "repository",
          "package",
          "path",
          "line",
          "text"
        ],
        "additionalProperties": false
      }
    }
  },
  "required": [
    "indexedCommit",
    "requestedCommit",
    "coverage",
    "freshness",
    "incomplete",
    "name",
    "source",
    "callers",
    "matches",
    "skippedImports",
    "more"
  ],
  "additionalProperties": {}
}
```

See [exit codes](/cli/#exit-codes) for the status the process returns.

Source: https://docs.overlane.app/cli/code-refs/index.mdx
