> For the complete documentation index, see [llms.txt](https://metaverse-imagen.gitbook.io/ai-tools-research/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://metaverse-imagen.gitbook.io/ai-tools-research/ai-tools-main-categories/programming-and-code/code-generators/cursor-ide/command-k.md).

# Command K

## FEATURES

### Command K

Command K lets you edit and write code with the AI. To edit, try selecting some code, click "Edit," and describe how the code should be changed. To generate completely new code, just type Command K without selecting anything.

<figure><img src="https://1581258177-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F8ErV6i18O2fXwbB9tnf5%2Fuploads%2FWDzHUHOIeiq2Z8ErlNou%2Fimage.png?alt=media&amp;token=cbd95e6e-97d2-49de-81ef-be50abda0fb9" alt=""><figcaption></figcaption></figure>

**Tip:** Editing with Command K works best with selections between 1 and 50 lines. Edits also see the lint errors in your selection, so you can say "fix."
