Command-line Client (asp-cli)¶
asp-cli drives the Analysis Server Protocol from the shell. It reads
commands (one per line) and maintains a session: the active connection, the
selected workspace and the configured environment persist between commands, so
a full analysis is expressed as a short command script.
Commands¶
Command |
Description |
Usage |
|---|---|---|
|
Connect to a server |
|
|
Disconnect from a server |
|
|
List workspaces on the server |
|
|
Create a workspace |
|
|
Select the active workspace |
|
|
Add a file to the active workspace |
|
|
Destroy a workspace |
|
|
Configure the analysis environment |
|
|
Start an analysis |
|
|
Select the active analysis |
|
|
Wait for the analysis to finish |
|
|
Fetch and print the analysis result |
|
|
Stop a running analysis |
|
|
Suppress further informational output |
|
The connect address accepts the same forms as the C API: an nng URL
(tcp://host:port) or a plain host:port IP address. env configures
the compiler, language, CPU and target OS used for the workspace (mirroring
asp_env_set_compiler(), asp_env_set_language(), asp_env_set_cpu()
and asp_env_set_runtime_os()).
Example session¶
connect tcp://127.0.0.1:5500 workspace_create env compiler gcc env language c workspace_add_file analyzed.c analysis_start analysis_wait analysis_result disconnect
Each command maps onto the corresponding connection call documented in the Connection API section of the API reference.