{"id":31658104,"url":"https://github.com/reybits/anvil.nvim","last_synced_at":"2026-05-17T15:37:58.609Z","repository":{"id":313658566,"uuid":"1052130961","full_name":"reybits/anvil.nvim","owner":"reybits","description":"Asynchronous Makefile rule runner for Neovim with support for terminal and tmux.","archived":false,"fork":false,"pushed_at":"2025-12-05T17:55:32.000Z","size":10,"stargazers_count":3,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-12-09T05:36:59.230Z","etag":null,"topics":["neovim","nvim","nvim-plugin","plugin"],"latest_commit_sha":null,"homepage":"","language":"Lua","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/reybits.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2025-09-07T13:21:45.000Z","updated_at":"2025-12-05T17:55:35.000Z","dependencies_parsed_at":"2025-09-07T17:49:06.284Z","dependency_job_id":null,"html_url":"https://github.com/reybits/anvil.nvim","commit_stats":null,"previous_names":["reybits/anvil.nvim"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/reybits/anvil.nvim","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/reybits%2Fanvil.nvim","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/reybits%2Fanvil.nvim/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/reybits%2Fanvil.nvim/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/reybits%2Fanvil.nvim/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/reybits","download_url":"https://codeload.github.com/reybits/anvil.nvim/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/reybits%2Fanvil.nvim/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":33143627,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-17T09:28:26.183Z","status":"ssl_error","status_checked_at":"2026-05-17T09:27:52.702Z","response_time":107,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.6:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["neovim","nvim","nvim-plugin","plugin"],"created_at":"2025-10-07T15:12:37.471Z","updated_at":"2026-05-17T15:37:58.604Z","avatar_url":"https://github.com/reybits.png","language":"Lua","funding_links":[],"categories":[],"sub_categories":[],"readme":"# anvil.nvim\n\nA Neovim plugin that runs external commands asynchronously.\nIt can execute builds either inside Neovim's integrated terminal or in an external tmux pane.\nThe plugin provides a smooth workflow for compiling, running, and monitoring build results without blocking the editor.\n\n## Features\n\n- Run commands asynchronously in Neovim's terminal or a tmux pane.\n- Automatic tmux detection (`mode = \"auto\"`).\n- Output captured to quickfix list with large output truncation.\n- Configurable terminal height and working directory.\n- Job cancellation via `:AnvilStop`.\n- Configurable timeout for long-running commands.\n- Custom exit callbacks with notification support.\n- Health check via `:checkhealth anvil`.\n\n## Requirements\n\n- Neovim \u003e= 0.10\n- (Optional) tmux for tmux mode.\n\n## Installation\n\n### [Lazy](https://github.com/folke/lazy.nvim)\n\n```lua\n{\n    \"reybits/anvil.nvim\",\n    keys = {\n        { \"\u003cleader\u003erb\", \"\u003ccmd\u003eAnvil make release\u003ccr\u003e\", desc = \"Build Release\" },\n        { \"\u003cleader\u003ers\", \"\u003ccmd\u003eAnvilStop\u003ccr\u003e\", desc = \"Stop Build\" },\n    },\n    cmd = {\n        \"Anvil\",\n        \"AnvilStop\",\n    },\n    opts = {},\n}\n```\n\n## Configuration\n\nThe default configuration options are listed below:\n\n```lua\nopts = {\n    mode = \"term\",              -- \"auto\" (tmux if available, else terminal) | \"term\" (always terminal)\n    log_to_qf = false,         -- Log output to quickfix list.\n    open_qf_on_success = false, -- Open quickfix window on success.\n    open_qf_on_error = false,  -- Open quickfix window on error.\n    close_on_success = false,  -- Close the terminal/tmux pane on successful completion.\n    close_on_error = false,    -- Close the terminal/tmux pane on error.\n    cwd = nil,                 -- Working directory for the command (nil = Neovim's cwd).\n    term_height = 0.3,         -- Terminal/tmux pane height as a ratio of editor height (0.0-1.0).\n    timeout = 0,               -- Timeout in seconds (0 = no timeout).\n    qf_max_lines = 10000,      -- Max lines to load into quickfix (0 = unlimited). Keeps the tail.\n    title = \"Command\",         -- Title used in notifications.\n    on_exit = function(code, o)\n        local title = o.title or \"Anvil\"\n        if code == 0 then\n            vim.notify(title .. \" completed successfully.\", vim.log.levels.INFO)\n            if o.open_qf_on_success then\n                vim.cmd(\"copen\")\n            end\n        else\n            vim.notify(title .. \" failed with exit code: \" .. code, vim.log.levels.ERROR)\n            if o.open_qf_on_error then\n                vim.cmd(\"copen\")\n            end\n        end\n    end,\n}\n```\n\n## Usage\n\n### Commands\n\n| Command | Description |\n|---|---|\n| `:Anvil` | Run `make` (default command). |\n| `:Anvil \u003ccmd\u003e` | Run an arbitrary shell command. |\n| `:AnvilStop` | Stop the currently running job. |\n\n### Lua API\n\n```lua\nlocal anvil = require(\"anvil\")\n\n-- Run default make\nanvil.run()\n\n-- Run a specific command\nanvil.run(\"make release\")\n\n-- Run with per-call options\nanvil.run(\"make test\", {\n    log_to_qf = true,\n    open_qf_on_error = true,\n    close_on_success = true,\n    title = \"Tests\",\n})\n\n-- Run in a specific directory\nanvil.run(\"make\", { cwd = \"~/projects/game\" })\n\n-- Run with a timeout (seconds)\nanvil.run(\"make heavy-build\", { timeout = 300 })\n\n-- Stop the running job\nanvil.stop()\n\n-- Check if a job is running\nif anvil.isRunning() then\n    vim.notify(\"Build in progress...\")\nend\n```\n\n### Keybinding Examples\n\n```lua\nkeys = {\n    { \"\u003cleader\u003erb\", function()\n        require(\"anvil\").run(\"make release\", {\n            log_to_qf = true,\n            open_qf_on_error = true,\n            close_on_success = true,\n            title = \"Release Build\",\n        })\n    end, desc = \"Build Release\" },\n\n    { \"\u003cleader\u003erB\", function()\n        require(\"anvil\").run(\"make debug\", {\n            log_to_qf = true,\n            open_qf_on_error = true,\n            title = \"Debug Build\",\n        })\n    end, desc = \"Build Debug\" },\n\n    { \"\u003cleader\u003ers\", function()\n        require(\"anvil\").stop()\n    end, desc = \"Stop Build\" },\n}\n```\n\n## Quickfix Truncation\n\nWhen `log_to_qf` is enabled and the build output exceeds `qf_max_lines`, only the tail of the log is loaded into the quickfix list (where build errors typically appear). A header line is added showing the total line count and the path to the full log file on disk for manual inspection.\n\n## Health Check\n\nRun `:checkhealth anvil` to verify the plugin configuration, tmux status, and job state.\n\n\u003e **Note:** The plugin must be loaded first (e.g. by running `:Anvil` or pressing a mapped key).\n\u003e Lazy-loaded plugins are not on the runtime path until triggered, so `:checkhealth` cannot discover the health module before that.\n\n## License\n\n[MIT License](LICENSE)\n\n## Contributing\n\nContributions are welcome! Feel free to open issues or submit pull requests.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Freybits%2Fanvil.nvim","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Freybits%2Fanvil.nvim","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Freybits%2Fanvil.nvim/lists"}