Metadata-Version: 2.1
Name: hmd-cli-build
Version: 0.1.77
Summary: Generic build tool.
Author: Jim Majure
Author-email: jim.majure@hmdlabs.io
License: Apache 2.0
Requires-Dist: acachecontrol==0.3.6
Requires-Dist: aenum==3.1.15
Requires-Dist: aiohappyeyeballs==2.4.3
Requires-Dist: aiohttp==3.10.10
Requires-Dist: aiosignal==1.3.1
Requires-Dist: alembic==1.13.3
Requires-Dist: asn1crypto==1.5.1
Requires-Dist: async-timeout==4.0.3
Requires-Dist: attrs==24.2.0
Requires-Dist: aws-requests-auth==0.4.3
Requires-Dist: aws-secretsmanager-caching==1.1.3
Requires-Dist: awscrt==0.27.1
Requires-Dist: backoff==2.2.1
Requires-Dist: boto3==1.36.22
Requires-Dist: botocore==1.36.23
Requires-Dist: cachetools==5.2.0
Requires-Dist: cement==3.0.6
Requires-Dist: certifi==2025.4.26
Requires-Dist: cffi==2.0.0
Requires-Dist: charset-normalizer==2.0.12
Requires-Dist: colorlog==6.6.0
Requires-Dist: cryptography==46.0.2
Requires-Dist: decorator==5.2.1
Requires-Dist: durationpy==0.10
Requires-Dist: ecdsa==0.19.1
Requires-Dist: frozenlist==1.3.3
Requires-Dist: google-auth==2.9.1
Requires-Dist: greenlet==3.3.2
Requires-Dist: gremlinpython==3.7.2
Requires-Dist: hmd-cli-app~=1.2.623
Requires-Dist: hmd-cli-tools~=1.2.244
Requires-Dist: hmd-entity-storage~=0.2.320
Requires-Dist: hmd-graphql-client~=0.1.171
Requires-Dist: hmd-lib-auth~=0.1.120
Requires-Dist: hmd-lib-librarian-client~=0.1.111
Requires-Dist: hmd-meta-types~=0.2.94
Requires-Dist: hmd-schema-loader~=0.2.35
Requires-Dist: idna==3.10
Requires-Dist: inquirerpy==0.3.4
Requires-Dist: isodate==0.6.1
Requires-Dist: jinja2==3.1.6
Requires-Dist: jmespath==0.10.0
Requires-Dist: jsonschema==4.23.0
Requires-Dist: jsonschema-specifications==2024.10.1
Requires-Dist: kubernetes==34.1.0
Requires-Dist: mako==1.3.6
Requires-Dist: markupsafe==3.0.2
Requires-Dist: multidict==6.4.3
Requires-Dist: nest-asyncio==1.6.0
Requires-Dist: oauthlib==3.3.1
Requires-Dist: okta-jwt-verifier==0.3.0
Requires-Dist: pfzy==0.3.4
Requires-Dist: pg8000==1.31.5
Requires-Dist: prompt-toolkit==3.0.38
Requires-Dist: psycopg2-binary==2.9.10
Requires-Dist: pyasn1==0.6.1
Requires-Dist: pyasn1-modules==0.4.2
Requires-Dist: pycparser==2.23
Requires-Dist: pyjwt==2.10.1
Requires-Dist: python-dateutil==2.8.2
Requires-Dist: python-dotenv==1.1.1
Requires-Dist: python-jose==3.5.0
Requires-Dist: pyyaml==6.0.1
Requires-Dist: referencing==0.35.1
Requires-Dist: requests==2.32.3
Requires-Dist: requests-oauthlib==1.3.1
Requires-Dist: retry2==0.9.5
Requires-Dist: rpds-py==0.20.0
Requires-Dist: rsa==4.8
Requires-Dist: s3transfer==0.11.2
Requires-Dist: scramp==1.4.8
Requires-Dist: six==1.16.0
Requires-Dist: sqlalchemy==2.0.36
Requires-Dist: typing-extensions==4.15.0
Requires-Dist: urllib3==2.3.0
Requires-Dist: wcwidth==0.2.6
Requires-Dist: websocket-client==1.3.3
Requires-Dist: yarl==1.12.0

.. HMD hmd-cli-build documentation master file

hmd-cli-build
===============================================================
Generic build tool for NeuronSphere compliant projects.

Declaring Build Steps
--------------------------

A NeuronSphere Project declares which HMD CLI commands are required to build it in the `./meta-data/manifest.json` file.
The package `hmd-cli-build` installs a general build command, `hmd build` that handles calling each required command in order.
The `hmd build` command reads the `./meta-data/manifest.json`, and attempts to run the HMD tools
listed in the `build.commands` section.
The tools listed must be installed separately (most are included in the `neuronsphere` package).

Example:

.. code-block:: json

    {
      "name": "example-project",
      "build": {
        "commands": [["mickey"], ["python"]]
      }
    }

In the above example, `hmd build` will first run `hmd mickey build` and then `hmd python build`.
If a build command errors or fails, the entire build will exit and fail.
All subsequent commands listed will not be called.
Build commands are run sequentially in the order listed.
It is not possible to run commands in parallel.

Build Secrets
+++++++++++++

The `./meta-data/manifest.json` file can also contain a `build.secrets` section.
This section is used to reference secrets that are required by the build commands.
The secrets must be stored in the Admin Environment Secrets Manager.
Valid types are `file` and `env`.
The `file` type will write the secret to a file in ``/tmp/secrets``, and the `env` type will set the secret as an environment variable.

Example:

.. code-block:: json

    {
      "name": "example-project",
      "build": {
        "commands": [["mickey"], ["python"]],
        "secrets": [
          {
            "name": "<aws-secret-name>",
            "type": "env",
            "env": "API_KEY",
            "key": "API_KEY"
          },
          {
            "name": "<aws-secret-name>",
            "type": "file",
          }
        ]
      }
    }

Strict Mode
------------------

By default, `hmd build` runs with `HMD_BUILD_STRICT_MODE=true`, or in **strict mode**.
While in **strict mode**, the build will error and fail if one of the listed build commands is not installed.
This behavior is desirable on a CI or build server, but not for local development.
You can turn off **strict mode** by setting `HMD_BUILD_STRICT_MODE=false`.
This will be set for you when you run `hmd configure` after installing the `neuronsphere` package.

When **strict mode** is disabled, `hmd build` will only warn about a missing command and continue on to the next command.

