Extension Commands and Settings Reference
This reference document provides comprehensive information about all available commands, settings, keyboard shortcuts, and configuration options in the Infrahub VSCode extension.
Commands
Available Commands
The extension registers the following commands that can be executed via the Command Palette (Ctrl+Shift+P
/ Cmd+Shift+P
):
Command ID | Title | Description | Context |
---|---|---|---|
infrahub.editInfrahubYaml | Edit file | Opens the selected YAML file at a specific location | Tree view item |
infrahub.editGqlQuery | Edit GraphQL Query | Opens the GraphQL query file for editing | Query tree item |
infrahub.executeGraphQLQuery | Execute GraphQL Query | Runs a GraphQL query against selected server/branch | Query tree item |
infrahub.newBranch | New Branch | Creates a new branch on the selected server | Server tree item |
infrahub.deleteBranch | Delete Branch | Deletes the selected branch | Branch tree item |
Command Execution
From Command Palette
- Press
Ctrl+Shift+P
(Windows/Linux) orCmd+Shift+P
(macOS) - Type "Infrahub" to filter commands
- Select the desired command
From Context Menus
Right-click on tree view items to access contextual commands:
- Server Items: New Branch
- Branch Items: Delete Branch
- Query Items: Execute Query, Edit Query
- YAML Items: Edit File
Programmatic Execution
Commands can be executed programmatically:
// Execute a command from another extension
vscode.commands.executeCommand('infrahub.executeGraphQLQuery', queryItem);
Extension Settings
Configuration Properties
All settings are prefixed with infrahub-vscode.
:
Setting | Type | Default | Description |
---|---|---|---|
servers | array | [] | List of Infrahub server configurations |
schemaDirectory | string | "schemas" | Path to directory containing schema files |
Server Configuration Schema
Each server in the servers
array follows this structure:
interface ServerConfig {
name: string; // Display name for the server
address: string; // Server URL (http/https)
api_token?: string; // Optional API token for authentication
}