---
title: "overlane code outline"
description: "List a file's symbols, one per line: line, kind, name"
---

> 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 outline

{/* 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 "line kind name" for each symbol the code index holds for the file (properties are left out unless --all). A file that changed since the index was built, or is not in it, gets a pattern-based outline and a one-line note. Output is plain text, one fact per line; --json prints the same facts as JSON. Exit 4 when nothing matches.

## Usage

```sh
overlane code outline path [--all]
```

## Arguments

| Argument | Required | Description |
| --- | --- | --- |
| `path` | yes | File path, relative to the repository root or the current directory |

## Flags

| Flag | Type | Required | Default | Description |
| --- | --- | --- | --- | --- |
| `--all` | boolean | no |  | Also list properties and fields |

## Examples

```sh
overlane code outline packages/cli/src/registry/run.ts
```

## 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 outline`.

## 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"
    },
    "path": {
      "type": "string"
    },
    "source": {
      "type": "string",
      "enum": [
        "index",
        "pattern"
      ]
    },
    "symbols": {
      "type": "array",
      "items": {
        "type": "object",
        "properties": {
          "line": {
            "type": "integer",
            "exclusiveMinimum": 0,
            "maximum": 9007199254740991
          },
          "kind": {
            "type": "string"
          },
          "name": {
            "type": "string"
          }
        },
        "required": [
          "line",
          "kind",
          "name"
        ],
        "additionalProperties": false
      }
    }
  },
  "required": [
    "indexedCommit",
    "requestedCommit",
    "coverage",
    "freshness",
    "incomplete",
    "path",
    "source",
    "symbols"
  ],
  "additionalProperties": {}
}
```

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

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