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

# repos_get_content

> Read a file, or list a directory. Pass an empty `path` for the repository root. File contents come back decoded as text.

<div className="tool-route"><span className="tool-row-method" data-method="GET">GET</span><code>{"https://api.github.com/repos/{owner}/{repo}/contents/{path}"}</code></div>

```python github_repos_get_content.py theme={null}
from charter.packs import github

result = await github.repos_get_content.ainvoke({"owner": ..., "repo": ..., "path": ...})
```

<Note>
  Requires `repo`, `read:user`.
</Note>

## Path parameters

<div className="reference-table">
  | Field                                                         | Type     | Description                                                                                                     |
  | ------------------------------------------------------------- | -------- | --------------------------------------------------------------------------------------------------------------- |
  | `owner` <span className="required" title="required">\*</span> | `string` | The account owner of the repository. The name is not case sensitive.                                            |
  | `repo` <span className="required" title="required">\*</span>  | `string` | The name of the repository without the `.git` extension. The name is not case sensitive.                        |
  | `path` <span className="required" title="required">\*</span>  | `string` | The path of the file or directory, relative to the repository root. Use an empty string for the root directory. |
</div>

## Query parameters

<div className="reference-table">
  | Field | Type     | Description                                                                     |
  | ----- | -------- | ------------------------------------------------------------------------------- |
  | `ref` | `string` | The name of the commit/branch/tag. Defaults to the repository's default branch. |
</div>
