Metadata-Version: 2.4
Name: gway
Version: 0.4.66
Summary: Software Project Infrastructure by https://www.gelectriic.com
Author-email: "Rafael J. Guillén-Osorio" <tecnologia@gelectriic.com>
License: MIT License
        ===
        
        Copyright (c) 2025 Rafael J. Guillén-Osorio (aka. Avon Ross)
        
        Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
        
        The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
        
        THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
        
Project-URL: Repository, https://github.com/arthexis/gway.git
Project-URL: Homepage, https://arthexis.com
Project-URL: Sponsor, https://www.gelectriic.com/
Classifier: Programming Language :: Python :: 3
Classifier: Operating System :: OS Independent
Requires-Python: >=3.10
Description-Content-Type: text/x-rst
License-File: LICENSE.md
Requires-Dist: httpx<1,>=0.27
Provides-Extra: dev
Requires-Dist: pytest; extra == "dev"
Requires-Dist: pytest-xdist; extra == "dev"
Requires-Dist: ruff; extra == "dev"
Requires-Dist: fastmcp<5,>=4; extra == "dev"
Requires-Dist: pydantic<3,>=2; extra == "dev"
Provides-Extra: validation
Requires-Dist: pydantic<3,>=2; extra == "validation"
Provides-Extra: github
Requires-Dist: PyNaCl<2,>=1.5; extra == "github"
Provides-Extra: toml
Requires-Dist: tomli>=2; python_version < "3.11" and extra == "toml"
Dynamic: license-file

GWAY
====

GWAY is a small Python command-dispatch and composition framework.

It exposes ordinary Python callables as command-line operations, binds CLI
arguments to their signatures, carries named context between operations, and
lets those operations be composed from the CLI, recipes, or Python.

GWAY provides reusable platform and orchestration behavior while applications
keep their own domain logic. A useful boundary is: **GWAY follows the platform;
applications follow the business.**

Quick start
-----------

For a one-line released installation, use the public bootstrap:

.. code-block:: bash

   curl -fsSL https://install.arthexis.com/gway | sh

On the first installation, the bootstrap asks ``uv`` to persist its configured
tool executable directory for future shells, but the already-open parent shell
cannot inherit that PATH change. With the default ``uv`` installer you can run
``source ~/.local/bin/env`` once; the configuration-independent form is
``export PATH="$(uv tool dir --bin):$PATH"``. Opening a new shell also applies
successful persisted PATH configuration.

Install GWAY with Python 3.13 or newer:

.. code-block:: bash

   python3.13 -m pip install gway

Python 3.10 needs the TOML compatibility extra:

.. code-block:: bash

   python3.10 -m pip install "gway[toml]"

Then run an operation:

.. code-block:: bash

   gway env PATH
   gway help copy

Operations can be composed. A standalone dash passes the previous raw result to
the next operation:

.. code-block:: text

   producer - consumer

Named values published by operations remain available as semantic context for
later operations.

Projects
--------

GWAY follows standard Python project metadata.

The nearest ``pyproject.toml`` identifies a project. ``[project].name`` gives
the project identity, and standard ``[project.scripts]`` entries can be exposed
as operations.

GWAY infers project behavior from standard metadata wherever possible.
GWAY-specific configuration should only be added when standard project metadata
cannot express the intent.

Managed installations keep their installation state separately from the source
checkout and disposable cache.

See `docs/PROJECTS.md <https://github.com/arthexis/gway/blob/main/docs/PROJECTS.md>`_
for the complete project-discovery contract and every project-level attribute
GWAY currently reads.

Recipes
-------

Recipes are small ``.rx`` files that compose ordinary GWAY operations:

.. code-block:: bash

   gway ./recipes/deploy.rx --site MTY

Recipes use the same dispatcher and context model as the CLI. They are intended
for readable orchestration rather than as a replacement for Python.

Advanced recipe behavior—including sigils, companion Python files, nested
recipes, checks, repeat, rollback journals, reload/process handoff, and execution boundaries—is
documented in `docs/RECIPES.md <https://github.com/arthexis/gway/blob/main/docs/RECIPES.md>`_.

Logging
-------

GWAY provides one logical logging surface across journald and portable rotating
files:

.. code-block:: bash

   gway log sources
   gway log read arthexis --since "10 minutes ago"
   gway log tail arthexis/web --limit 50
   gway log search "connection refused" arthexis
   gway log read --all --limit 100

Journald is used automatically when available. Otherwise GWAY uses structured
rotating files. With no source argument, reads remain limited to GWAY-managed
sources rather than the entire host journal. See
`docs/LOGGING.md <https://github.com/arthexis/gway/blob/main/docs/LOGGING.md>`_
for the source model, backend behavior, and portable query semantics.

Documentation
-------------

- `docs/PROJECTS.md <https://github.com/arthexis/gway/blob/main/docs/PROJECTS.md>`_ — project discovery, standard metadata, GWAY variables, and Sous Chef attributes.
- `docs/RECIPES.md <https://github.com/arthexis/gway/blob/main/docs/RECIPES.md>`_ — complete recipe language and execution semantics.
- `docs/PLATFORM.md <https://github.com/arthexis/gway/blob/main/docs/PLATFORM.md>`_ — GWAY's platform/application ownership boundary.
- `docs/LOGGING.md <https://github.com/arthexis/gway/blob/main/docs/LOGGING.md>`_ — unified logging sources, queries, and backend policy.
- `docs/MCP.md <https://github.com/arthexis/gway/blob/main/docs/MCP.md>`_ — MCP transport, authorization, token/scope, and deployment model.
- `docs/README.md <https://github.com/arthexis/gway/blob/main/docs/README.md>`_ — documentation index.
- `docs/GLOSSARY.md <https://github.com/arthexis/gway/blob/main/docs/GLOSSARY.md>`_ — canonical GWAY terminology.

Development
-----------

Install the active checkout with development tools.

With Python 3.13 or newer:

.. code-block:: bash

   python3.13 -m pip install -e ".[dev]"

With Python 3.10, include the TOML compatibility extra:

.. code-block:: bash

   python3.10 -m pip install -e ".[dev,toml]"

Run the test and quality suites:

.. code-block:: bash

   python -m pytest -q
   python -m ruff check gway tests

CI exercises the supported Python versions defined by the repository workflows.

License
-------

MIT License.
