Overview

VHDL-Tool can be run as a standalone command line application without editor integration. This is useful if you want to syntax-check or lint your files from the command line. VHDL-Tool is a multi mode binary, like git. This means that command line invocations of vhdl-tool must be followed by a subcommand. The available modes are summarised by the --help command:

$ vhdl-tool --help 
VHDL-Tool
Usage: vhdl-tool-free (--version | [-c|--config FILE] COMMAND)
Available options:    -h,--help Show this help text
Available commands:    ctags Generate ctags file    lint Lint    server Server    lsp Language Server Protocol server    client Client    rpc RPC    check-config Check configuration file

VHDL-Tool has a client server architecture. This means that some of the subcommands, specifically client and rpc require a running server before they will function. The server is started with the vhdl-tool server command.

Each of the commands is covered below.

check-config

Checks your configuration file for common errors.

$ vhdl-tool check-config --help 
Usage: vhdl-tool check-config   Check configuration file Available options:   -h,--help Show this help text

ctags

Generates a ctags compatible tags file. This can be used for navigation, but is most useful in conjunction with plugins like TagBar for displaying an overview of the current file.

$ vhdl-tool ctags --help 
Usage: vhdl-tool-free ctags ((-R|--recurse) | INPUT) [-o|--output FILE] [-k|--kinds KINDS]    Generate ctags file
Available options:    -R,--recurse Recurse    -o,--output FILE Output file    -k,--kinds KINDS Kinds: default eapisPfrCctTb    -h,--help Show this help text

lint

Syntax checks the file given to it as the only argument.

$ vhdl-tool lint --help 
Usage: vhdl-tool-free lint [FILE] [-c|--compact]    Lint
Available options:    -c,--compact Render compact for easy parsing by tools like Syntastic    -h,--help Show this help text

server

This launches a VHDL-Tool IDE server. VHDL-Tool first reads your configuration file to determine which files make up your project. It then parses and indexes these for later queries. It provides a JSON RPC interface through a unix socket which can be queries using the rpc command.

$ vhdl-tool server --help 
Usage: vhdl-tool-free server [FILE] [--prof]    Server
Available options:    --prof Profile parsing times    -h,--help Show this help text

client

The client subcommand provides convenience wrappers around the RPC commands. For now, only the lint command is wrapped. In this case, the wrapping exists to provide an easier-to-parse alternative to JSON for lint warnings that can be consumed by, for example, Syntastic. In the free version, which only performs syntax checking, this produces the same output as the vhdl-tool lint command.
$ vhdl-tool client lint --help 
Usage: vhdl-tool-free client lint [-c|--compact] (FILE | --stdin (-f|--filename FILE))    Lint
Available options:    -c,--compact Render compact for easy parsing by tools like Syntastic    -h,--help Show this help text

rpc

Provides a command line interface to query the JSON-RPC server exposed by the server command. This interface is intended for internal use by editor plugins.

$ vhdl-tool rpc --help 
Usage: vhdl-tool-free rpc [-s|--socket FILE] COMMAND    RPC
Available options:    -s,--socket FILE The socket to connect via    -h,--help Show this help text
Available commands:    info Query server for info    kill Kill the server    lint Lint a file    references Get references    imprecise-defs Get imprecise definitions    definitions Get definitions    parse Parse a file and cache the results

For example, the definitions command takes a file name and position within the file. It also takes the file contents through stdin (since the file contents within the editor may differ from the contents on disk). It returns through stdout a JSON array of locations where the identifier at the specified position is defined.

$ vhdl-tool rpc definitions --help 
Usage: vhdl-tool-free rpc definitions (-f|--file FILE) (-l|--line LINE) (-c|--column COL)    Get definitions
Available options:    -f,--file FILE Filename    -l,--line LINE Line    -c,--column COL Column    -h,--help Show this help text

lsp

Provides a Language Server Protocol server over stdin/stdout.

$ vhdl-tool lsp --help 
Usage: vhdl-tool lsp    Language Server Protocol server Available options:    -h,--help Show this help text