# CLI

We not only develop the platform but also the CLI version of Innocuous book!

Just follow the few simple steps, we will teach you how to install and utilize by command line.

## Let's start:soon:

1.Package all things related to running this program into an .exe executable file by PyInstaller

| Arguments | Description                                                                                             |
| --------- | ------------------------------------------------------------------------------------------------------- |
| -m        | run library module as a script (terminates option list)                                                 |
| -F        | package the program into a single executable file (suitable for simpler code or only a single .py file) |

```
python -m PyInstaller -F --add-data "/home/ubuntu/anaconda3/envs/pyinstall/lib/python3.8/site-packages/pyfiglet:./pyfiglet" innocuous.py
```

2\. Install into the system

```
sudo cp code/dist/innocuous /usr/bin/
```

3.Install auto-complete program

```
sudo cp code/innocuous.sh /etc/bash_completion.d/
```

## Usage commands

It has four commands for user to use, which are generate, trial, list and upload.

```
innocuous [generate trial list upload]
```

1\. Generate config template. (Default save path\[-o]: ./demo\_config.json)

```
innocuous generate [-o <save to file>]
innocuous generate -o ~/config_tmep.json
```

2\. Upload model, function, config, dataset and requirements

```
innocuous upload [-m --model <path of model>] [-f --function <path of function>] [-c --config <path of config>] [-d --dataset <path of dataset>] [-r --requirements <path of requirements>]
innocuous upload [-m --model <path of model>] 
innocuous upload [-f --function <path of function>]
innocuous upload [-c --config <path of config>]
innocuous upload [-d --dataset <path of dataset>] 
innocuous upload [-r --requirements <path of requirements>]
```

3\. Run trial (model/function)

```
innocuous trial [-m --model <path of model>] [-f --function <path of function>] [-c --config <path of config>] [-d --dataset <path of dataset>] [-r --requirements <path of requirements>]
innocuous trial [-f --function <path of function>] [-c --config <path of config>] [-d --dataset <path of dataset>] [-r --requirements <path of requirements>]
```

4\. list what already uploaded

```
innocuous list [model]
innocuous list [function]
innocuous list [dataset] 
innocuous list [model function dataset] 
```


---

# 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://innocuous-book.gitbook.io/innocuous-book/experiment-1/experiment/sdk.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.
