> For the complete documentation index, see [llms.txt](https://help.bots.business/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://help.bots.business/import-and-integrations/vscode.md).

# Edit bot commands in VS Code

Edit Bots.Business command files in VS Code and understand when saving changes the remote bot.

The official Bots.Business extension uploads linked command files when you save them. Use a test bot while setting up the workspace: saving is a remote change, not just a local draft.

{% stepper %}
{% step %}

### Connect a workspace

1. Install [Bots.Business from Visual Studio Marketplace](https://marketplace.visualstudio.com/items?itemName=bots-business.bots-business).
2. Open a dedicated folder in VS Code.
3. Run **Bots.Business: Login** from the Command Palette and authenticate with your [BB account's API access](/account-and-resources/profile.md#find-the-right-access-control).
4. Run **Bots.Business: Set Bot ID** and select the intended bot.
5. Use the extension's bot/file actions to populate the workspace, then inspect the selected bot ID before editing.

The current extension uses files under `commands/**/*.js` and stores remote command IDs in CMD metadata. Preserve those IDs when editing an existing command. Do not reuse a linked workspace for another bot by manually copying its IDs.
{% endstep %}

{% step %}

### Make one change

Open an existing command file, change one reply, save, and test that command in Telegram. Check the extension's output for API failures. A file saved on disk can still have failed to upload.

If the result is correct, commit the local change to Git. Choose one active editor for the same commands so an older mobile or desktop edit does not overwrite a newer version.
{% endstep %}
{% endstepper %}

## Import, deletion and unlinking

Use the extension's explicit create/delete/unlink actions and read their confirmation. File deletion and unlinking can affect command associations; test them on a disposable bot before reorganizing a working workspace.

This workflow is different from [whole-bot Git import](/import-and-integrations/git.md), which replaces the destination command and library set. Keep an export before changing workflows. See [repository format](/import-and-integrations/repository-format.md) for the ordinary Git import files.

If saving does nothing, check authentication, the linked bot ID, the file's location and its metadata. For version-specific commands, use the installed extension's Command Palette and the official listing rather than guessing an old `BB:*` command name.


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://help.bots.business/import-and-integrations/vscode.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
