> For the complete documentation index, see [llms.txt](https://help.bots.business/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://help.bots.business/git/repository-structure.md).

# Repository structure

{% hint style="success" %}
You can make export for any free bot in the Store. Just install it.&#x20;

It is good for practice.
{% endhint %}

### bot.json file

Please see [this](https://help.bots.business/git/file-bot-json)

### Commands - in commands folder

File name - it is command name (But it can be rewritten in command description)

{% hint style="warning" %}
For commands with "/" (for example command "/start") file name is "\_start"
{% endhint %}

Command can have: `name`, `help`, `aliases` (second names), `answer`, `keyboard`, `scnarios` (for simple logic) and other options.

{% hint style="success" %}
If the command has a folder - it is located in a folder on the disk with the same name
{% endhint %}

#### Command description

It is optional file header:

```javascript
/*CMD
  command: /test
  help: this is help for ccommand
  need_reply: [ true or false here ]
  auto_retry_time: [ time in sec ]
  folder: MyFolder
  answer: it is example answer for /test command
  keyboard: button1, button2
  aliases: /test2, /test3
CMD*/
```

{% hint style="info" %}
Command description - it is optional block.
{% endhint %}

multiline also supported. For example for answer:

```javascript
/*CMD
    <<ANSWER
test answer
with several
lines
  ANSWER
CMD*/
```

{% hint style="info" %}
You can have only answer (or others) key in the command description. All keys - optional
{% endhint %}

See [more](https://help.bots.business/commands)

#### Command body

It is command code in JavaScript. Use Bot Java Script for logic in command.

For example:

`Bot.sendMessage(2+2);`

See [more](https://help.bots.business/scenarios-and-bjs)

### Libraries - in libs folder

You can store common code in the libs folder

See [more](https://help.bots.business/git/library)


---

# 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, and the optional `goal` query parameter:

```
GET https://help.bots.business/git/repository-structure.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

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.
