https://github.com/growthbook/growthbook-vsce
Visual Studio Code extension for GrowthBook
https://github.com/growthbook/growthbook-vsce
extension vsce vscode
Last synced: 12 months ago
JSON representation
Visual Studio Code extension for GrowthBook
- Host: GitHub
- URL: https://github.com/growthbook/growthbook-vsce
- Owner: growthbook
- License: mit
- Created: 2022-10-05T23:36:31.000Z (almost 4 years ago)
- Default Branch: main
- Last Pushed: 2023-02-17T18:28:53.000Z (over 3 years ago)
- Last Synced: 2025-06-09T08:47:51.643Z (about 1 year ago)
- Topics: extension, vsce, vscode
- Language: TypeScript
- Homepage: https://marketplace.visualstudio.com/items?itemName=GrowthBook.growthbook
- Size: 188 KB
- Stars: 1
- Watchers: 4
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- Contributing: CONTRIBUTING.md
- License: LICENSE
Awesome Lists containing this project
README
# GrowthBook Visual Studio Code extension
- [About](#about)
- [Features List](#features-list)
- [Viewing feature details](#viewing-feature-details)
- [Copying a feature key](#copying-a-feature-key)
- [Editing a feature](#editing-a-feature)
- [Configuration](#configuration)
- [Commands](#commands)
- [Contributing](#contributing)
## About
The GrowthBook Visual Studio Code extension allows you to see your available feature definitions right in VS Code.
It can be configured to work with your project in under a minute and makes it easier for developers who use VS Code to work with the GrowthBook SDK by making features browsable and conveniently surfacing common actions.

### Features List
Once the GrowthBook extension is installed and configured, you will be able to see all of the features for your project in a view panel at the bottom left.

#### Viewing feature details
You should be able to see the value type of the feature inline beside the feature name. When you hover over the feature, you should see all of the criteria specified in order for this feature to evaluate. In the below example, hovering over `dark_mode` shows that it has a default value of false and will evaluate to true for 50% of logged in users.


#### Copying a feature key
When hovering over a feature item, some action icons will appear on the right. One of them will allow you to copy the feature key to the clipboard so you can easily copy and paste into your project.

Once it's been successfully copied, you should see a message pop up temporarily in the bottom right.

#### Editing a feature
When hovering over a feature item, some action icons will appear on the right. One of them will allow you to open the feature edit screen in your browser on the GrowthBook dashboard, allowing you to view additional details and edit your feature.


## Configuration
In order to use the extension, your project will need to have a `.growthbook.json` file.
You can create this configuration in one of the following ways:
- Use the `"Add Configuration"` button that shows up in the Features panel
- Use the command `GrowthBook: Create a .growthbook.json configuration file`.
- Manually create it by copy pasting the below code and including your own key after `/features/`
```json
{
"featuresEndpoint": "http://localhost:3100/api/features/key_dev_abc123xyz456",
"appHost": "http://localhost:3100"
}
```
- **`featuresEndpoint`**: This is available on the [Environments → SDK Endpoints](https://app.growthbook.io/environments) screen in GrowthBook
- **`appHost`**: This is the URL for the running application instance of GrowthBook. If you registered at growthbook.com, use the one that is generated for you, otherwise specify the URL of your self-hosted instance.
❗️ **Note**: We recommend that you omit this file from your project's version control and provide a sample `.growthbook.json.example` file that your team can copy locally, e.g. `cp .growthbook.json.example .growthbook.json`.
### Commands
Some commands have been surfaced to help with configuring GrowthBook. You can access these commands from the command palette (by pressing Command + Shift + P on macOS or Control + Shift + P on Windows and Linux) and typing `GrowthBook`.
- Refresh features
- Create GrowthBook config
## Contributing
See the [Contributing Guide](CONTRIBUTING.md) to help out with the project.