# Using Stakpak

## Using Stakpak Interactively (Interactive Mode)

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

To run stakpak interactively, all you have to do is to open the terminal in the directory you want to work in and type: `stakpak`

## Using Stakpak in Async (Async Mode)

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

To run stakpak in async mode all you have to do is to open the terminal and type: `stakpak -a "your prompt"`&#x20;

You can set the max number of steps the agent can take by adding the `-m` flag

{% hint style="info" %}
The default number of steps in async mode is 50
{% endhint %}

## Using Stakpak on Remote Servers (SSH)

Stakpak’s file editing tools support SFTP, so you can create/edit/remove files on a remote host without installing anything on it.

all you have to do is to open stakpak on your local machine and then typing:

`command ssh username@<ip> -p <portnumber>`

Once connected, Stakpak can operate on the remote filesystem using the following commands:

* **create** – create new files on the remote host
* **str\_replace** – modify existing files by replacing content
* **view** – read and inspect remote files
* **run\_command** – execute commands on the remote server

or you can use [Shell Mode](/docs/how-it-works/shell-mode.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://stakpak.gitbook.io/docs/get-started/using-stakpak.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.
