Skip to main content

VSCode Extension

Welcome to the comprehensive documentation for the Infrahub VSCode Extension. This extension transforms Visual Studio Code into a powerful development environment for working with Infrahub, the open-source infrastructure automation platform.

What is the Infrahub VSCode extension?

The Infrahub VSCode Extension provides intelligent tooling that connects directly to your Infrahub servers, enabling you to develop infrastructure schemas, execute GraphQL queries, and manage branch-based workflows without leaving your IDE. It brings the power of Infrahub's graph database and version control directly into your development workflow.

Documentation structure

This documentation is organized following the Diataxis framework to help you find exactly what you need:

🎓 Tutorials

Learning-oriented - Start here if you're new to the extension

📋 How-to guides

Task-oriented - Practical steps for specific goals

💡 Topics

Understanding-oriented - Explanations and background

📚 Reference

Information-oriented - Technical descriptions and specifications

Quick start

If you want to get up and running quickly:

  1. Install the extension from the VSCode Marketplace
  2. Configure a server in your VSCode settings
  3. Create a schema file in your project
  4. Execute a query to test your connection

For detailed instructions, see the Getting Started tutorial.

Key features at a glance

🔗 Multi-server management

Connect to multiple Infrahub instances simultaneously, perfect for working across development, staging, and production environments.

🌳 Visual tree views

Navigate your infrastructure configuration with intuitive tree views for servers, branches, and YAML structures.

📝 Intelligent Yaml editing

Get real-time validation, auto-completion, and go-to-definition support for your Infrahub schemas.

✂️ Snippets for automation and YAML objects

Quickly scaffold Infrahub transforms, scripts, generators, checks, and YAML objects using built-in VSCode snippets.

🚀 GraphQL integration

Execute queries directly from VSCode with variable support and formatted results display.

🔀 Branch management

Create and manage branches for version-controlled infrastructure changes.

📊 Real-time status

Monitor server connections with live status updates in the VSCode status bar.

Use cases

The extension is designed for several key workflows:

  • Schema Development: Design and validate infrastructure models with immediate feedback
  • Query Testing: Develop and test GraphQL queries against live data
  • Branch Workflows: Manage infrastructure changes across multiple branches
  • Multi-Environment Development: Work seamlessly across different Infrahub environments
  • Infrastructure Automation: Build automation workflows with validated schemas

Prerequisites

Before using the extension, ensure you have:

  • Visual Studio Code version 1.102.0 or higher
  • Access to at least one Infrahub server (local or remote)
  • Basic familiarity with YAML and GraphQL (helpful but not required)

Getting help

Within the extension

  • Problems Panel (Ctrl+Shift+M): View validation errors and warnings
  • Output Panel: Check extension logs for debugging
  • Command Palette (Ctrl+Shift+P): Search for Infrahub commands

External resources

Common tasks

First time setup

Start with the Getting Started tutorial for a complete walkthrough.

Working with multiple environments

See How to Configure Multiple Servers for setting up dev, staging, and production.

Testing queries

Learn query execution in How to Execute GraphQL Queries.

Understanding how it works

Explore Understanding the Extension Architecture for technical details.

Contributing

We welcome contributions to both the extension and its documentation! Visit our GitHub repository to:

  • Report bugs or request features
  • Submit pull requests
  • Improve documentation

Version information

  • Current Extension Version: 0.0.2
  • Minimum VSCode Version: 1.102.0
  • Recommended Infrahub Version: 0.15.0+

License

The Infrahub VSCode Extension is part of the Infrahub project. See the LICENSE file for details.


Built with ❤️ by the OpsMill team and the Infrahub community.