> For the complete documentation index, see [llms.txt](https://nelnabr.gitbook.io/auto-labs/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://nelnabr.gitbook.io/auto-labs/0g-auto/0g-eng.md).

# 0G (ENG)

## 📀 0G Guide

### ⚙️ Installation

#### Requirements

* Python version 3.11.6 or higher

#### Download

1. Clone the repository:

   ```sh
   git clone https://github.com/neLNABR/0g-Auto.git
   cd 0g-Auto
   ```
2. Create and activate a virtual environment (optional but recommended):

   ```sh
   python -m venv venv
   venv\Scripts\activate  # for Windows
   source venv/bin/activate  # for Linux/MacOS
   ```
3. Install dependencies:

   ```sh
   pip install -r requirements.txt
   ```
4. Launch (after configuration):

   ```sh
   python main.py
   ```

### 📁 Setup (data folder)

Here you can find all user data necessary for work:

* **`private_keys.txt`** — private keys from wallets. 1 line = 1 key.
* **`proxies.txt`** — proxy list. 1 line = 1 proxy. If there are fewer proxies than accounts, they will be repeated sequentially to match all accounts.
  * Proxy format: `user:pass@ip:port`
  * **ONLY** HTTP proxies are supported.

### 📝 Configuration (`config.yaml`)

This section details each function in the `config.yaml` file. Most variables are self-explanatory from their names and comments, so only key ones are described here.

#### Main parameters:

```yaml
SEND_TELEGRAM_LOGS: false  # Enable logs in Telegram
TELEGRAM_BOT_TOKEN: "12317283:lskjalsdfasdfasd-sdfadfasd"  # Telegram bot token (found in BotFather)
TELEGRAM_USERS_IDS: [235123432]  # TG account IDs to receive logs
```

#### Execution flow (`FLOW`):

```yaml
SKIP_FAILED_TASKS: false  # Whether to skip failed tasks
```

* `true` — the bot will skip a failed task and proceed with others.
* `false` — the bot will stop and retry this task next time.

#### Editing the config via web interface

The config can be modified through `config.yaml` or a web interface:

1. Start the bot with:

   ```sh
   python main.py
   ```
2. Select `[2] Edit config` in the menu.
3. The config editor will open at: `http://127.0.0.1:3456`.
4. By default, the bot will open this URL in your browser.
5. After making changes, click `Save Configuration` at the top right of the page.
6. To exit:

   * Close the console **or**
   * Press `CTRL + C` several times.

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

### ▶️ Usage

#### Task setup

Before launching the bot, open the `tasks.py` file in the main project folder and configure the execution order.

#### First run

1. Launch the bot:

   ```sh
   python main.py
   ```
2. Select `3` to open database settings.
3. For the first run, select `1` (**Create/Reset Database**) to generate a database in the `data` folder. Action routes will be created for each key.
4. This menu allows you to:
   * View remaining tasks,
   * Reset the database, etc.
5. Exit the menu with `6` and start the bot with `1`.


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## 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://nelnabr.gitbook.io/auto-labs/0g-auto/0g-eng.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.
