# Terminal Integration

The terminal integration feature is instrumental in streamlining the connection between your local terminal environment and our server. It involves running a script that establishes a secure link, ensuring that all subsequent terminal commands are executed and stored efficiently in our database.

### Setting up Terminal Integration

* Click on the **Download Terminal Button** to download a bash script specific to the session that you are working on.&#x20;

<figure><img src="https://2457333171-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FcXmufA02PQ8JHgi2gLhg%2Fuploads%2FUflL36jjZQyYZ8N0b4rc%2Fimage.png?alt=media&#x26;token=d68639f3-8404-4521-915e-541b863e34b6" alt="" width="563"><figcaption></figcaption></figure>

* Once the script is downloaded, run it to download the PineWheel Python Shell Wrapper.
* Run the '**pinewheel\_terminal.py**' file to connect to your session.The python script automatically detects your default shell and creates a wrapper around it that sends the data to your PineWheel session.
* To select a shell manually, you can pass the path to the shell to the `--shell` options of the python script like so:&#x20;

{% hint style="info" %}
`python3 pinewheel_terminal.py --shell /path/to/shell`
{% endhint %}

* Currently, the PineWheel Shell Wrapper supports **bash, zsh, fish** and **sh**. ⁠

**Integration Confirmation**: Upon successful execution of the script, your terminal will be connected to our server. A confirmation message will be displayed, indicating the successful integration.

**Storing Terminal Commands**: From this point forward, all commands executed in your terminal will automatically stored  in our database for your convenience and future reference as also the generation of real-time AI based inferences.
