Skip to content

🚀 A lightweight, user-friendly Neovim plugin for easily navigating and managing Atmos stacks and components.

License

Notifications You must be signed in to change notification settings

RoseSecurity/atmos.nvim

Repository files navigation

🚀 atmos.nvim

A Neovim plugin that enables efficient navigation and management of Atmos stacks and components directly within your Neovim environment.


❓ What is Atmos?

Atmos is a powerful infrastructure-as-code (IaC) tool that simplifies the management of cloud resources across multiple environments. It introduces two key concepts:

  1. Stacks: Configuration blueprints that describe a cohesive collection of components. Stacks automate the deployment, management, and teardown of Terraform resources, ensuring uniform setups across different environments (e.g., development, staging, production).

  2. Components: The building blocks of your infrastructure. Components define the business logic for provisioning common pieces of infrastructure, such as ECR repositories or EKS clusters.

This plugin enhances your Atmos workflow by providing quick and easy navigation of your Atmos stacks and components within Neovim.

❗ Features

  • List and navigate Atmos stacks and components using Telescope
  • Validate Atmos stacks directly from Neovim
  • Quick access to stack and component definitions
  • Seamless integration with your existing Neovim setup

Requirements

Important

  • Neovim 0.8 or later
  • Telescope.nvim
  • Atmos 1.110.0 or later installed and configured in your system

Installation

Using packer.nvim:

use {
  'RoseSecurity/atmos.nvim',
  requires = {'nvim-telescope/telescope.nvim'}
}

Using vim-plug:

Plug 'nvim-telescope/telescope.nvim'
Plug 'RoseSecurity/atmos.nvim'

For other package managers, please refer to their respective documentation for adding plugins.

Setup

Add the following to your Neovim configuration:

require("atmos").setup({
  base_path = "<ATMOS_BASE_PATH>",
  config_path = "<ATMOS_CLI_CONFIG>"
})

These correspond to the ATMOS_CLI_CONFIG_PATH environment variable, which is where to find atmos.yaml. It's the path to a folder where atmos.yaml CLI config file is located. The ATMOS_BASE_PATH is the base path to components and stacks folders.

Usage

The plugin provides two main commands:

  1. :AtmosListStacks

    • Opens a Telescope picker listing all available Atmos stacks
  2. :AtmosListComponents

    • Opens a Telescope picker listing all available Atmos components
    • Selecting a component will navigate you to the component directory
  3. :AtmosListVariables

    • Opens a Telescope picker with all available stacks
    • After selecting the stack, a list of components for the stack will appear
    • Once the component for the stack is selected, the variables and values will be displayed
  4. :AtmosValidateStacks

    • Validate Atmos stack manifest configurations

You can map these commands to key bindings for quicker access. For example:

vim.api.nvim_set_keymap('n', '<leader>als', ':AtmosListStacks<CR>', { noremap = true, silent = true })
vim.api.nvim_set_keymap('n', '<leader>alc', ':AtmosListComponents<CR>', { noremap = true, silent = true })
vim.api.nvim_set_keymap('n', '<leader>alv', ':AtmosListVariables<CR>', { noremap = true, silent = true })
vim.api.nvim_set_keymap('n', '<leader>av', ':AtmosValidateStacks<CR>', { noremap = true, silent = true })

About

🚀 A lightweight, user-friendly Neovim plugin for easily navigating and managing Atmos stacks and components.

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published