Skip to main content

preview

Argenta is a simple and elegant framework for building modular CLI applications. It provides a clean and intuitive way to create context-aware command-line tools with isolated command scopes.

Argenta is the "Simplest", "Most Modular", and "Most Elegant" way to build interactive CLI applications in Python.

📖 Read the full documentation: argenta.readthedocs.io
🌍 Other languages: RU


preview

Argenta allows you to build interactive CLI applications incredibly easily. There's no need to manually parse complex command structures or manage state transitions — just use routers and commands!

✨ Installing Argenta

Argenta is available on PyPI:

$ python -m pip install argenta

or using uv:

$ uv add argenta

Argenta officially supports Python 3.12+.

🚀 Supported Features & Best Practices

Argenta is ready for the demands of building scalable, robust and maintainable CLI applications.

  • Interactive Sessions: Unlike traditional CLI tools, Argenta creates cyclic sessions, allowing users to execute commands sequentially without restarting the application.
  • Declarative Syntax: Commands and their handlers are declared using simple decorators, making the code intuitive and allowing you to focus on "what" you want to do, not "how".
  • Native DI: Thanks to integration with dishka, you can easily inject dependencies directly into command handlers, simplifying testing, avoiding mutable globals, and much more.
  • Automatic Validation and Parsing: The library handles command-line flags and arguments processing, including parsing, validation, and type conversion.
  • Flexible Configuration: You can easily customize system messages, output formatting, create custom handlers for non-standard behavior, and more.

Need something more? Create an issue, we're open to suggestions.

📝 Why did we create this?

Building complex CLI applications often requires managing different contexts and command scopes. For example, when creating a utility similar to the Metasploit Framework, users need to enter specific scopes (like selecting a scanning module) and then access commands specific only to that context.

Traditional CLI frameworks don't provide an elegant way to handle this kind of modular, context-aware architecture. Argenta was built to solve this problem by providing a simple and concise way to encapsulate CLI functionality in isolated, abstracted environments.

We believe that building CLI applications should be as pleasant as building web applications with modern frameworks. Argenta brings the router pattern and clean separation of concerns to the CLI world.

🚀 Quick Start

Here's a simple example to get you started:

# routers.py
from argenta import Router, Response
from argenta.command import Flag, Command

router = Router()

@router.command(Command("hello"))
def handler(response: Response):
    """A simple hello world command"""
    print("Hello, world!")

@router.command(Command("greet", flags=Flag('name')))
def greet_handler(response: Response):
    """Greet a user by name"""
    name_flag = response.input_flags.get_flag_by_name('name')
    if name_flag:
        print(f"Hello, {name_flag.input_value}!")
    else:
        print("Hello, Stranger!")
# main.py
from argenta import App, Orchestrator
from .routers import router

app = App()
orchestrator = Orchestrator()

def main() -> None:
    # Include your routers
    app.include_router(router)
    
    # Start the interactive CLI
    orchestrator.start_polling(app)

if __name__ == '__main__':
    main()

That's it! You now have a fully functional interactive CLI application.

📚 Documentation

Full documentation is available at argenta.readthedocs.io


MIT 2025 kolo | made by kolo

Release files for argenta 1.2.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for argenta 1.2.0
File Size Uploaded
argenta-1.2.0.tar.gz 20.2 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for argenta 1.2.0
File Interpreter ABI Platform
argenta-1.2.0-py3-none-any.whl Python 3 none any Details

Total release size: 54.0 kB

Release files / argenta-1.2.0.tar.gz

Download URL argenta-1.2.0.tar.gz
Size 20.2 kB
Tags Source
SHA-256 checksum
How to use checksums
9e567efcfdd993e7aceec1b8f1a45a4a7826708fcc4aa6daa6dd69a6813dbee2
BLAKE2b-256 checksum
How to use checksums
9d730f2ddde580e009cba8657f70607bba516059f965d27e2fea3b1679ae292f
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via uv/0.9.26 {"installer":{"name":"uv","version":"0.9.26","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":null,"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

Release files / argenta-1.2.0-py3-none-any.whl

Download URL argenta-1.2.0-py3-none-any.whl
Size 33.8 kB
Tags Python 3
SHA-256 checksum
How to use checksums
29c1a9332a40e9cff8b0d0cdc9730aa4b9b071ef2005da9f76b3fb1f0ee7db1c
BLAKE2b-256 checksum
How to use checksums
ae63623105280e77441779b8300388a56c86c9851624888854abf5da7524217a
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via uv/0.9.26 {"installer":{"name":"uv","version":"0.9.26","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":null,"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

Release history Release notifications | RSS feed

This release

1.2.0 This release

2 release files

1.1.2

2 release files

1.1.1

2 release files

1.0.7

2 release files

1.0.6

2 release files

1.0.5

2 release files

1.0.4

2 release files

1.0.3

2 release files

1.0.2

2 release files

1.0.1

2 release files

1.0.0

2 release files

0.5.0

2 release files

0.4.9

2 release files

0.4.8

2 release files

0.4.7

2 release files

0.4.6

2 release files

0.4.5

2 release files

0.4.1

2 release files

0.4.0

2 release files

0.3.9

2 release files

0.3.8

2 release files

0.3.7

2 release files

0.3.6

2 release files

0.3.5

2 release files

0.3.4

2 release files

0.3.3

2 release files

0.3.2

2 release files

0.3.1

2 release files

0.3.0

2 release files

0.2.2

2 release files

0.2.1

2 release files

0.2.0

2 release files

0.1.3

2 release files

0.1.2

2 release files

0.1.1

2 release files

0.1.0

2 release 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