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
- Getting Started with Infrahub VSCode Extension - Complete walkthrough from installation to first query
📋 How-to guides
Task-oriented - Practical steps for specific goals
- How to Configure Multiple Infrahub Servers - Set up dev, staging, and production environments
- How to Execute GraphQL Queries - Run queries with variables and branch selection
- How to Manage Branches - Create, delete, and work with branches
- How to use Infrahub Snippets - Insert and customize Infrahub YAML and automation snippets
💡 Topics
Understanding-oriented - Explanations and background
- Understanding the Extension Architecture - Deep dive into how the extension works
- Schema Validation and YAML Intelligence - How intelligent editing and validation work
📚 Reference
Information-oriented - Technical descriptions and specifications
- Extension Commands and Settings Reference - Complete list of commands, settings, and configuration options
Quick start
If you want to get up and running quickly:
- Install the extension from the VSCode Marketplace
- Configure a server in your VSCode settings
- Create a schema file in your project
- 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
- Infrahub Documentation: docs.infrahub.app
- Extension Repository: GitHub.com/opsmill/infrahub-vscode
- Issue Tracker: GitHub Issues
- Community Support: Infrahub Discord
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.