# Command Line Interface

Zirkul Agent was initially designed as a command line tool for security automation, you can simply run zirkul from terminal for starting the interactive command line interface:

```bash
zirkul
```

<figure><img src="/files/sQnsZsS70gFThDFGx2iI" alt=""><figcaption></figcaption></figure>

You can also get more information related to parameters with:

```sh
zirkul --help
```

<figure><img src="/files/8DL4Va8BjHkHxo4RJfw8" alt=""><figcaption></figcaption></figure>

The command line interface support commands, options and plugins created for making a cross-platform terminal loaded with helpful cyber security functionalities available in OSX, Linux and Windows.

### Commands

Commands are used for running built-in functionalities and configuring system options:

```sh
echo "Hello world!"
```

See all the commands available sending the question" ? " character:

<figure><img src="/files/4nUwo7om23z6Yq1WBnPc" alt=""><figcaption></figcaption></figure>

### Plugins

Plugins are the main functionality of the Agent allowing the tool to integrate with almost any tool either from command line or trough REST APIs. Plugins are made as Python scripts making it very easy to create and extend.

Example, loading ZAP plugin:

```sh
load zap
```

There are different types of plugins for "functions", "exploits" or "integrations":

* **Functions**: Processing and/or returning values without interacting with external tools.\
  Example: \` echo date \` will return the current date in text format.
* **Exploits**: Testing known vulnerabilities (CVEs) receiving parameters and returning if the execution was successful or not.\
  Example: \` load ms15-034 \`
* **Integrations**: These plugins are used for interacting with external tools such as command line tools or remote services through Web APIs.\
  Example: Running scans and returning results from tools such as ZAP, Burp Suite, nmap, sqlmap, Metasploit, etc.

### Options

Options are used for configuring parameters sent to plugins, usually separated by colon ' : '

Example:

```sh
load zap
    url: "https://evil.com" # The option is 'url', note ':' is required.
```

### External Variables

Zirkul Agent can get external variables either from command line arguments or environment variables as follows.

#### Command line argument "--variables"

With the argument ' --variables ' you can send as many as the terminal allows, example:

```sh
zirkul --variables "var_name=123 another_var='Text with spaces'"
```

Every variable must be separated by spaces, any value including spaces must be enclosed with single quotes.

#### Environment variables

Environment variables are defined at system level in your computer, usually can be set with the command:

```sh
export MY_VAR="This is the value"
```

From Zirkul Agent, you can get the environment's variable value with the [env function](/zirkul-agent/command-reference/env.md):

```sh
echo env("MY_VAR")
=> This is the value
```

See more information in the [command reference](/zirkul-agent/command-reference.md).


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.zirkul.com/zirkul-agent/running-the-agent/command-line-interface.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
