Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/rosesecurity/atmos.nvim

🚀 A lightweight, user-friendly Neovim plugin for easily navigating and managing Atmos stacks and components.
https://github.com/rosesecurity/atmos.nvim

atmos cloud neovim neovim-plugin telescope telescope-extension terraform

Last synced: 11 days ago
JSON representation

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

Awesome Lists containing this project

README

        

# :rocket: atmos.nvim

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

---



## :question: 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.

## :exclamation: 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](https://github.com/nvim-telescope/telescope.nvim)
> - [Atmos](https://atmos.tools/install/) installed and configured in your system

## Installation

Using [packer.nvim](https://github.com/wbthomason/packer.nvim):

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

Using [vim-plug](https://github.com/junegunn/vim-plug):

```sh
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:

```lua
require("atmos").setup({
base_path = "",
config_path = ""
})
```

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:

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