---
title: Edit
description: >-
  Studios:         
  lit://&lt;owner&gt;/&lt;teamspace&gt;/studios/&lt;studio-name&gt;/&lt;path&gt;

  Teamspace drives: lit://&lt;owner&gt;/&lt;teamspace&gt;/uploads/&lt;path&gt;

  Current teamspace (relativ
canonical: 'https://lightning.ai/docs/cli/stable/command-details/edit'
---
# Edit {#edit}

Edit a Drive file in place with a local editor.

Downloads the file, opens it in your editor, and re-uploads it when you save and close, only if the contents changed.

URL formats:

Studios: lit://<owner>/<teamspace>/studios/<studio-name>/<path> Teamspace drives: lit://<owner>/<teamspace>/uploads/<path> Current teamspace (relative): lit:///<resource-root>/<path>

**Usage:**

```console
lightning edit [OPTIONS] PATH
```

## Arguments {#edit-arguments}

| Name | Type | Required | Description |
| --- | --- | --- | --- |
| `PATH` | `text` | yes | No description provided. |

## Options {#edit-options}

| Option | Type | Required | Default | Description |
| --- | --- | --- | --- | --- |
| `--editor` | `TEXT` | no | — | Editor command to launch. Defaults to the $EDITOR environment variable, or vi. |

## Examples {#edit-examples}

```console
lightning edit lit://<owner>/<my-teamspace>/studios/<my-studio>/notes.txt
lightning edit lit:///studios/<my-studio>/notes.txt
lightning edit lit://<owner>/<my-teamspace>/uploads/config.yaml --editor "code -w"
```

---

**Navigation**

- Parent: [Command details](/docs/cli/2026.11.20/command-details.md)
