Skip to main content

aiogram CLI

Project description

aiogram-cli

Command line interface for developers

Works only with aiogram 3.0+ (Is under development)

Here is only bootstrap for CLI interface with extensions based on pkg_resources

Installation

From PyPi

pip install --extra-index-url https://dev-docs.aiogram.dev/simple --pre aiogram-cli

Poetry

Add this block to pyproject.toml file:

[[tool.poetry.source]]
name = "aiogram-dev"
url = "https://dev-docs.aiogram.dev/simple"
secondary = true

And then run: poetry add -D aiogram-cli

Extensions

  • aiogram_cli_generator (WIP) - Project files generator based on pre-defined cookiecutter templates
  • aiogram_cli_executor (WIP) - Executor for bots
  • ...

Usage

Just run in terminal aiogram-cli (Or alias - aiogram) and see what you can do with it.

Example

main interface

commands

Writing extensions

Any aiogram-cli extension package should provide an entry point like this:

[aiogram_cli.plugins]
my_extension = my_package.module:MyCommand

Or with poetry like this:

[tool.poetry.plugins."aiogram_cli.plugins"]
"builtin-about" = "aiogram_cli.commands.about:AboutCommand"
"builtin-plugins" = "aiogram_cli.commands.plugins:PluginsListCommand"

This application is based on cleo framework and that mean all plugins should be one of:

  1. subclass of cleo.Command
  2. instance of cleo.Command
  3. sequence of subclasses or instances of cleo.Command
  4. callable which accepts app: cleo.Application and returns any of 1-3 formats

Examples: aiogram_cli.commands.about aiogram_cli.commands.plugins

Project details


Download files

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

Source Distribution

aiogram-cli-0.0.1a3.tar.gz (4.0 kB view hashes)

Uploaded Source

Built Distribution

aiogram_cli-0.0.1a3-py3-none-any.whl (4.9 kB view hashes)

Uploaded Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page