Skip to main content
Your companion for managing Telegram Mini Apps. This project simplifies the manipulation of your mini app distribution files. To start using the project, you need to obtain your deploy token, which is unique to each project. To get your token, go to @tma_mate_bot and press the Start button.

Next, press the Create a Project button and enter the name of your project, following the specified rules.

After this step, the bot will provide you with a Deploy Token, which you will use later to deploy the project.

Installing @telegram-apps/mate

To deploy your project, you need to install the @telegram-apps/mate CLI package.
Alternatively, you can install it globally:
Once installed, the package will be accessible via the mate CLI tool:
Not to install the package, you can also use the package using pnpm or npx:

Retrieving project deployment info

Before deploying the project, you might want to know the base URL. The base URL is the absolute URL that the project bundler will use to create links to all project assets. To retrieve the project deployment information, including the base URL, use the following command:
You will see an output similar to this:
The value https://35f105bd6b.tapps.global/latest is the base URL that you should use in your bundler.

Deploying

Before deploying the project assets, ensure that you have built your project and are not deploying source files. You should only deploy files that can be successfully opened by the user’s browser. Let’s assume you have a project with ID 48. Also, you have a dist directory with all the built files. To deploy this directory to the CDN, use the following command:
As a result, you will see a message like this in your console:
Important Note that your directory must include only the usual files and directories. All other types of files (symlinks, for example) are forbidden; the CLI tool will let you know about it.

Tagging

Mate allows you to use multiple tags in your project. A tag is simply a marker for your deployment version. Each tag corresponds to its own subdirectory, which is reflected in the final asset URL. By default, Mate uses the latest tag. To override this, use the --tag option:

Using Config

To enhance your experience, you can create a mate.yml file in your project root directory and include the following content:
Then, you can use the mate commands: