A Neovim plugin for interacting with Buildkite pipelines.
- Multi-organization support - Manage multiple Buildkite organizations with token precedence (env vars → keychain → config file)
- Pipeline linting - Validate pipeline YAML against the Buildkite schema using treesitter
- Build management - List recent builds, trigger new builds from Neovim
- Local step execution - Run pipeline steps locally using
buildkite-agent - Auto-detection - Automatically detects pipeline slug from git remote or directory name
- Neovim >= 0.9.0
- plenary.nvim
- Treesitter YAML parser (
:TSInstall yaml) - for linting - telescope.nvim (optional) - enhanced picker UI
buildkite-agent(optional) - for local step execution
{
"mcncl/buildkite.nvim",
dependencies = { "nvim-lua/plenary.nvim" },
config = function()
require("buildkite").setup()
end,
}use {
"mcncl/buildkite.nvim",
requires = { "nvim-lua/plenary.nvim" },
config = function()
require("buildkite").setup()
end,
}require("buildkite").setup({
-- Auto-lint pipeline files on save
lint_on_save = true,
-- Default organization (optional, can also be set via config file)
default_org = nil,
-- Path to config file
config_path = vim.fn.stdpath("config") .. "/buildkite.json",
-- Keymaps (set to false to disable)
keymaps = {
lint = "<leader>bl",
run_step = "<leader>br",
builds = "<leader>bb",
},
-- Notifications
notifications = {
enabled = true,
level = vim.log.levels.INFO,
},
})All commands follow the pattern :Buildkite <noun> <verb>:
| Command | Description |
|---|---|
:Buildkite org add <slug> |
Add an organization (prompts for API token) |
:Buildkite org switch |
Switch between configured organizations |
:Buildkite org list |
List all configured organizations |
:Buildkite org info |
Show current organization info |
| Command | Description |
|---|---|
:Buildkite pipeline lint |
Lint the current pipeline file |
:Buildkite pipeline set <slug> |
Override the auto-detected pipeline slug |
:Buildkite pipeline info |
Show detected pipeline info |
| Command | Description |
|---|---|
:Buildkite build list |
Show recent builds (opens picker) |
:Buildkite build trigger [branch] |
Trigger a new build |
| Command | Description |
|---|---|
:Buildkite step run |
Run the step under cursor locally |
:Buildkite step select |
Select a step to run locally |
API tokens are loaded with the following precedence:
-
Environment variables (highest priority)
BUILDKITE_TOKEN_<ORG_SLUG>(e.g.,BUILDKITE_TOKEN_MY_ORG)BUILDKITE_API_TOKEN(generic fallback)
-
macOS Keychain (if available)
- Stored via
:Buildkite org addwith keychain option
- Stored via
-
Config file (lowest priority)
~/.config/nvim/buildkite.jsonby default
The plugin auto-detects the pipeline slug in this order:
- Manual override via
:Buildkite pipeline set - Project-local
.buildkite.luafile withreturn { pipeline = "slug" } - Repository name from git remote
- Current directory name
Run :checkhealth buildkite to verify your setup.
MIT