vulkro lsp
Runs Vulkro as a Language Server Protocol server, so any editor with an LSP client shows findings inline.
vulkro lsp
The command is the server: it speaks JSON-RPC 2.0 over stdin and stdout with standard Content-Length framing. There are no flags beyond --offline.
When it scans
- didOpen: the first open in a workspace runs a full project scan. Later opens reuse the cached result.
- didSave: re-analyses only the saved file, or the whole project when the file takes part in a cross-file finding.
- didChange: accepted, but does not scan (Vulkro reads from disk).
Each diagnostic has the finding's line, severity (Critical and High are errors, Medium is a warning), the finding id as code, and vulkro as source. Code actions: Suppress (inserts a vulkro:disable-next-line comment) and Explain. The server never edits your code on its own.
Without a licence the server starts but does not scan: it shows a visible "no licence" notice and never publishes empty diagnostics as if a file were clean.
Editor setup
Neovim (nvim-lspconfig):
local lspconfig = require('lspconfig')
local configs = require('lspconfig.configs')
if not configs.vulkro then
configs.vulkro = { default_config = {
cmd = { 'vulkro', 'lsp' },
filetypes = { 'python', 'javascript', 'typescript', 'go' },
root_dir = lspconfig.util.root_pattern('.git', 'package.json', 'pyproject.toml', 'go.mod'),
} }
end
lspconfig.vulkro.setup({})
Helix (languages.toml):
[language-server.vulkro]
command = "vulkro"
args = ["lsp"]
[[language]]
name = "python"
language-servers = ["pyright", "vulkro"]
Emacs eglot, Zed and Sublime LSP: register the command vulkro lsp. Run it next to your normal language server. For VS Code, Cursor and Windsurf use the VS Code extension.
Options
initializationOptions: minConfidence (high, medium default, low), saveScope (file default, project), watch.
| Variable | Effect |
|---|---|
VULKRO_LSP_LOG=1 | Trace lines on stderr. |
VULKRO_LSP_DEBOUNCE_MS=<N> | didChange debounce (default 300, range 50 to 5000). |
VULKRO_LSP_INCREMENTAL=0 | Rescan the whole project on every save. |
Other VULKRO_* scan variables apply too.
Exit codes
0 clean shutdown. 2 IO failure, malformed framing or a bad argument.
Command reference
Generated from vulkro lsp --help (vulkro 0.41.0). Run scripts/gen-docs.sh in the product repository to refresh it; do not edit this section by hand.
Run Vulkro as a language server so any editor can show findings inline.
vulkro lsp [OPTIONS]
Options
| Flag | Description |
|---|---|
--offline | Hard-disable every outbound network call for this run (sets VULKRO_OFFLINE=1). Blocks the CVE feed, the license heartbeat, the update check, webhooks, and any cloud AI endpoint; a loopback model (http://127.0.0.1, http://localhost) is still allowed. Equivalent to exporting VULKRO_OFFLINE=1, and the flag wins when both are set. |
-q, --quiet | Print only warnings and errors on stderr: no progress, tips or next-step hints. Results on stdout and exit codes are unchanged. |
--no-color | Turn off coloured output. Colour is also off when NO_COLOR is set to a non-empty value or TERM=dumb. |
-h, --help | Print help (see a summary with '-h') |
Full vulkro lsp --help
Run Vulkro as a language server so any editor can show findings inline.
Run Vulkro as a Language Server Protocol server. Stream diagnostics into any LSP client: Neovim (via `nvim-lspconfig`), Helix (`languages.toml`), Emacs (`eglot`), Zed, Sublime LSP, and JetBrains IDEs through the LSP4IJ plugin. The VS Code extension wraps this binary.
Transport: stdio only. The protocol is JSON-RPC 2.0 framed by `Content-Length: N\r\n\r\n` headers (the standard LSP framing). The subcommand IS the server: there is no `vulkro lsp serve`.
Methods supported in this release:
* `initialize` / `initialized` (capability handshake) * `textDocument/didOpen|didChange|didSave|didClose` * server-pushed `textDocument/publishDiagnostics` * `workspace/executeCommand` (`vulkro.explain` returns markdown) * `shutdown` + `exit` clean-shutdown contract
Diagnostics fire on `didOpen` (full project scan, cached per workspace root) and on `didSave` (re-scan). `didChange` is accepted but does not trigger a scan, because vulkro reads from disk: scanning an in-memory buffer would mis-report. Findings come in every language (no language is a tier). Without a licence the server still starts, but it does not scan: it shows one `window/showMessage` notice, sends a `vulkro/licenseRequired` notification, reports tier `none` with `entitled: false` and `reason: "license_required"` from `vulkro.licenseStatus`, and answers scan commands with error -32001. It never publishes empty diagnostics as if a file were clean.
Example Neovim config (`nvim-lspconfig` plus a manual server registration; LSP filetypes set to the languages Vulkro covers):
```lua local lspconfig = require('lspconfig') local configs = require('lspconfig.configs') if not configs.vulkro then configs.vulkro = { default_config = { cmd = { 'vulkro', 'lsp' }, filetypes = { 'python', 'javascript', 'typescript', 'go' }, root_dir = lspconfig.util.root_pattern( '.git', 'package.json', 'pyproject.toml', 'go.mod'), settings = {}, }, } end lspconfig.vulkro.setup({}) ```
Helix `~/.config/helix/languages.toml` snippet:
```toml [language-server.vulkro] command = "vulkro" args = ["lsp"]
[[language]] name = "python" language-servers = ["pyright", "vulkro"] ```
Emacs eglot (`init.el`):
```elisp (with-eval-after-load 'eglot (add-to-list 'eglot-server-programs '((python-mode python-ts-mode) . ("vulkro" "lsp")))) ```
Environment variables honoured by `lsp`: * `VULKRO_LSP_LOG=1` - emit per-message trace lines on stderr. Off by default so the stdio JSON-RPC channel stays clean. * `VULKRO_LSP_DEBOUNCE_MS=<N>` - override the 300ms `didChange` re-publish debounce window (clamped to [50, 5000]). * `VULKRO_LSP_INCREMENTAL=0` - opt out of incremental save. By default `didSave` re-analyses ONLY the saved file and reuses the cached whole-project findings for every other file, falling back to the full scan when the saved file is entangled in a cross-file finding (so cross-file findings are never dropped). `0` / `false` / `no` / `off` rescans the whole project on every save instead. The old opt-in value `1` is now the default and prints a note.
Editor options (`initializationOptions`): `minConfidence` (`high` | `medium` | `low`, default `medium`, the floor `vulkro scan` applies; at `low` the lower tier is published faded), `saveScope` (`file` default | `project`) and `watch`. Commands: `vulkro.triage.set` records a decision in `.vulkro/triage.toml`; `vulkro.rescan` runs a whole-project scan on demand. * `VULKRO_BRUTEFORCE_SINKS=1` - add the adversarial bruteforce sink-detection pass to live scans (slower). The editor exposes this as the `vulkro.depth.bruteforceSinks` setting / "Deep scan" command. * `VULKRO_PQ_AUDIT=1` - add the post-quantum crypto audit pass to live scans (capability `verified-tier`; slower). The editor exposes this as `vulkro.depth.pqAudit` / "Deep scan". * `VULKRO_OFFLINE=1` and the other `VULKRO_*` vars honoured by `scan` apply transparently to scans triggered through LSP.
Exit codes: `0` clean shutdown (client closed stdin or sent LSP `exit` after a prior `shutdown`). `2` operational error: transport-level IO failure, malformed framing, bad argument to `lsp`.
Usage: vulkro lsp [OPTIONS]
Options:
--offline
Hard-disable every outbound network call for this run (sets VULKRO_OFFLINE=1). Blocks the CVE feed, the license heartbeat, the update check, webhooks, and any cloud AI endpoint; a loopback model (http://127.0.0.1, http://localhost) is still allowed. Equivalent to exporting VULKRO_OFFLINE=1, and the flag wins when both are set
-q, --quiet
Print only warnings and errors on stderr: no progress, tips or next-step hints. Results on stdout and exit codes are unchanged
--no-color
Turn off coloured output. Colour is also off when NO_COLOR is set to a non-empty value or TERM=dumb
-h, --help
Print help (see a summary with '-h')