{"id":3456,"library":"diracx-cli","title":"DiracX Command-Line Interface","description":"diracx-cli is the command-line interface component of DiracX, the next-generation distributed computing platform. DiracX is a modern successor to the DIRAC framework, featuring a microservices architecture, token-based authentication, and a focus on usability and extensibility for managing scientific workflows and data. As part of a rapidly evolving project, diracx-cli provides command-line access to its functionalities, leveraging a modular Python package structure.","status":"active","version":"0.0.12","language":"en","source_language":"en","source_url":"https://github.com/DIRACGrid/diracx/tree/main/diracx-cli","tags":["CLI","distributed computing","scientific computing","workflow management","microservices","Typer"],"install":[{"cmd":"pip install diracx-cli","lang":"bash","label":"Install with pip"}],"dependencies":[{"reason":"Provides common code and core functionalities for DiracX namespace packages.","package":"diracx-core"},{"reason":"Used for building the command-line interface.","package":"typer","optional":false}],"imports":[{"note":"diracx-cli is part of the 'diracx' namespace package. Main CLI application object is typically named 'app'.","symbol":"app","correct":"from diracx.cli.main import app"}],"quickstart":{"code":"import typer\n\napp = typer.Typer()\n\n@app.command()\ndef hello(name: str = \"World\"):\n    \"Say hello to NAME.\"\n    print(f\"Hello {name}!\")\n\nif __name__ == \"__main__\":\n    # In a typical DiracX installation, 'dirac' is the entry point\n    # and would automatically discover and run commands. \n    # This snippet shows a runnable Typer app as a minimal example.\n    app()","lang":"python","description":"This quickstart demonstrates how a simple command-line application using Typer, similar to how diracx-cli commands are structured, can be defined and run. In a full DiracX environment, these commands would be integrated and executed via the main 'dirac' command-line entry point. This example simulates a basic 'hello' command."},"warnings":[{"fix":"Update calls from `read_config()` to `read()`.","message":"A recent refactor in diracx-cli renamed 'read_config()' to 'read()'. Code relying on the old method will break.","severity":"breaking","affected_versions":"Likely prior to 0.0.12, confirmed in recent development activity."},{"fix":"Refer frequently to the official GitHub repository and documentation for the latest changes and best practices.","message":"The DiracX project, including diracx-cli, is described as 'incomplete' and 'rapidly evolving'. This implies frequent changes, potentially including breaking ones, and evolving documentation.","severity":"gotcha","affected_versions":"All current versions (0.0.12 and earlier)."},{"fix":"Ensure all necessary 'diracx-*' packages are installed explicitly via pip based on the required functionality.","message":"diracx-cli is part of the 'diracx' namespace package. This means individual components like 'diracx-core', 'diracx-client', etc., are separate PyPI packages that must be installed independently if their functionality is required, rather than being included with a single 'diracx' installation.","severity":"gotcha","affected_versions":"All versions."}],"env_vars":null,"last_verified":"2026-04-11T00:00:00.000Z","next_check":"2026-07-10T00:00:00.000Z"}