Skip to main content

tgbotspec

Go Report Card golangci-lint tests codecov version license

tgbotspec turns the official Telegram Bot API reference into an OpenAPI 3.0 specification. Use the generated file with SDK generators, API explorers, or your own tooling.

Features

  • Methods: all Telegram Bot API methods are included as OpenAPI paths with proper HTTP verbs and parameters.
  • Objects: all Bot API objects are generated as reusable component schemas.
  • Any‑of/one‑of types: union types from the docs are modeled with OpenAPI anyOf/oneOf (and refs) so generators can produce correct sum types.
  • Authorization: bearer token (TelegramBotToken) with server URL https://api.telegram.org/bot{botToken}.

Examples

Run in Docker

You can run the tool in a container and capture the generated OpenAPI to a file.

  • Using the published image from GHCR:
docker run --rm ghcr.io/metalagman/tgbotspec:latest > openapi.yaml

Run from binary

Download the latest release for your platform from GitHub Releases and run:

./tgbotspec -o openapi.yaml

Build and run locally

All commands require Go 1.26.4+ when building locally.

  • (Recommended) Add the CLI as a tool to your project and run it:
go get -tool github.com/metalagman/tgbotspec/cmd/tgbotspec@latest
go tool tgbotspec -o openapi.yaml
  • Install the CLI into your GOPATH/bin and run it:
go install github.com/metalagman/tgbotspec/cmd/tgbotspec@latest
tgbotspec -o openapi.yaml
  • Or build a local binary from this repo and run it:
go build -o tgbotspec ./cmd/tgbotspec
./tgbotspec -o openapi.yaml

Multi-platform Distribution (Omnidist)

This repository includes Omnidist configuration in .omnidist/omnidist.yaml and a generated GitHub Actions workflow at .github/workflows/omnidist-release.yml.

Local Omnidist commands (using npm package @omnidist/omnidist@latest):

task omnidist:build
task omnidist:stage
task omnidist:verify

One-time Omnidist bootstrap in this repo:

task omnidist:init
task omnidist:ci

For tag-based release publishing in GitHub Actions, set repository secrets: NPM_PUBLISH_TOKEN and UV_PUBLISH_TOKEN.

Links

License

This project is licensed under the MIT License. See the LICENSE file for details.

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distributions

No source distribution files available for this release.See tutorial on generating distribution archives.

Built Distributions

If you're not sure about the file name format, learn more about wheel file names.

tgbotspec-0.2.7-py3-none-win_amd64.whl (10.4 MB view details)

Uploaded Python 3Windows x86-64

tgbotspec-0.2.7-py3-none-manylinux2014_x86_64.whl (10.1 MB view details)

Uploaded Python 3

tgbotspec-0.2.7-py3-none-manylinux2014_aarch64.whl (9.4 MB view details)

Uploaded Python 3

tgbotspec-0.2.7-py3-none-macosx_11_0_arm64.whl (9.6 MB view details)

Uploaded Python 3macOS 11.0+ ARM64

tgbotspec-0.2.7-py3-none-macosx_10_13_x86_64.whl (10.3 MB view details)

Uploaded Python 3macOS 10.13+ x86-64

File details

Details for the file tgbotspec-0.2.7-py3-none-win_amd64.whl.

File metadata

  • Download URL: tgbotspec-0.2.7-py3-none-win_amd64.whl
  • Upload date:
  • Size: 10.4 MB
  • Tags: Python 3, Windows x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.11.28 {"installer":{"name":"uv","version":"0.11.28","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

File hashes

Hashes for tgbotspec-0.2.7-py3-none-win_amd64.whl
Algorithm Hash digest
SHA256 e36b9de8e18ccb5b3583911b29ffa6ff4fb5971631e3d401f70b3b86e208bfc2
MD5 87826710ce695cd96525b09d817688f1
BLAKE2b-256 22df5551f7a620fc7e0c4fbd69c3fc038b298aa34ba28d9e05e4e054b9c5893c

See more details on using hashes here.

File details

Details for the file tgbotspec-0.2.7-py3-none-manylinux2014_x86_64.whl.

File metadata

  • Download URL: tgbotspec-0.2.7-py3-none-manylinux2014_x86_64.whl
  • Upload date:
  • Size: 10.1 MB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.11.28 {"installer":{"name":"uv","version":"0.11.28","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

File hashes

Hashes for tgbotspec-0.2.7-py3-none-manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 523b2e484c584055bae79668ddb92e257288576147d6c52f2f66223914e6cb02
MD5 1a86344163854c9ea6c4c9c73ba291e5
BLAKE2b-256 31a52de97fc05adb34a24fd53ecd24dbba2be143192d65ec09ed80d6966708c8

See more details on using hashes here.

File details

Details for the file tgbotspec-0.2.7-py3-none-manylinux2014_aarch64.whl.

File metadata

  • Download URL: tgbotspec-0.2.7-py3-none-manylinux2014_aarch64.whl
  • Upload date:
  • Size: 9.4 MB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.11.28 {"installer":{"name":"uv","version":"0.11.28","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

File hashes

Hashes for tgbotspec-0.2.7-py3-none-manylinux2014_aarch64.whl
Algorithm Hash digest
SHA256 9dea24e1370c574fba9f26f17e50e891c7699302a022e792d798108c39391bf5
MD5 b3959a83aa6ebd7d7ac334b8e20ffb1c
BLAKE2b-256 59256b7fb186ce10224dd42d268ce4d409302e958ab584d7ecdb5cc977c67fbb

See more details on using hashes here.

File details

Details for the file tgbotspec-0.2.7-py3-none-macosx_11_0_arm64.whl.

File metadata

  • Download URL: tgbotspec-0.2.7-py3-none-macosx_11_0_arm64.whl
  • Upload date:
  • Size: 9.6 MB
  • Tags: Python 3, macOS 11.0+ ARM64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.11.28 {"installer":{"name":"uv","version":"0.11.28","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

File hashes

Hashes for tgbotspec-0.2.7-py3-none-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 ca81177937fb52ad170a546d3aa5a1b628b54f9b03847b1fcfb5098fe53884ac
MD5 05eb02d29d8bdc61ba26c19841203ba2
BLAKE2b-256 e0b93b6f19ceb14b174d132fbbf14abfb3b7ade263ff4e8d7949ac21eacd82fe

See more details on using hashes here.

File details

Details for the file tgbotspec-0.2.7-py3-none-macosx_10_13_x86_64.whl.

File metadata

  • Download URL: tgbotspec-0.2.7-py3-none-macosx_10_13_x86_64.whl
  • Upload date:
  • Size: 10.3 MB
  • Tags: Python 3, macOS 10.13+ x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.11.28 {"installer":{"name":"uv","version":"0.11.28","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

File hashes

Hashes for tgbotspec-0.2.7-py3-none-macosx_10_13_x86_64.whl
Algorithm Hash digest
SHA256 9869a6feef2b7949dd7f092b173dda89cebffd8dc947e395a6559a8c0785a103
MD5 1f3a01bdb47bdcae4be1c49a9fbd0590
BLAKE2b-256 685eb5cbad7115fb80a40424a3567d5cfc3e9060e6e6dcea90c96aec016c3c50

See more details on using hashes here.

Release history Release notifications | RSS feed

This release

0.2.7 This release

5 files

0.2.6

5 files

0.2.5

5 files

0.2.4

5 files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page