cMeta open-source categories, artifacts and automations

[ Back to projects ]
[ Back ]

One category from internal.

← All categories

repo

Content repositories: pull, plug, create and list the repos that supply everything else.

Comes from
(internal)
License
Apache-2.0
UID
f4f792ab40c7498f
Tags
category repo
Copyright
2025-2026 Grigori Fursin and cTuning Labs. See the cMeta COPYRIGHT and LICENSE files for details.

Its own commands

CommandWhat it does
checkout
v1.py:903-928
Checkout cMeta Git repositories
signature

    def checkout(
        self,
        params,  # Input parameters dictionary.
    ):

        """
            Checkout cMeta Git repositories

            @self.get_

            Args:
                params: Input parameters dictionary.
            Returns:
                dict: Operation result.
            Raises:
                Exception: Propagated runtime errors, if any.
        """
clone
v1.py:931-948
Clone cMeta Git repositories
signature

    def clone(
        self,
        params,  # Input parameters dictionary.
    ):

        """
            Clone cMeta Git repositories

            @self.get_

            Args:
                params: Input parameters dictionary.
            Returns:
                dict: Operation result.
            Raises:
                Exception: Propagated runtime errors, if any.
        """
create (add)
v1.py:619-636
Create local cMeta repository
signature

    def create(
        self,
        params,  # Input parameters dictionary.
    ):

        """
            Create local cMeta repository

            @self.get_

            Args:
                params: Input parameters dictionary.
            Returns:
                dict: Operation result.
            Raises:
                Exception: Propagated runtime errors, if any.
        """
delete (rm|remove|del)
v1.py:688-768
Delete cMeta repositories
signature

    def delete(
        self,
        params,  # Input parameters dictionary.
    ):

        """
            Delete cMeta repositories

            @base.delete_

            Args:
                params (dict): Input parameters dictionary.
                (unplug) (bool): if True, only unregister repository but don't delete!

            Returns:
                dict: Operation result.
            Raises:
                Exception: Propagated runtime errors, if any.
        """
find (search)
v1.py:661-685
Find cMeta repositories
signature

    def find(
        self,
        params,  # Input parameters dictionary.
    ):

        """
            Find cMeta repositories

            @base.find_

            Args:
                params: Input parameters dictionary.
            Returns:
                dict: Operation result.
            Raises:
                Exception: Propagated runtime errors, if any.
        """
get
v1.py:44-588
Clone or pull CM repository.
signature

    def get_(
        self,
        ctx: dict,  # cMeta context.
        arg1: str = None,  # Repo alias or UID.
        url: str = None,  # Source URL for git or zip repositories.
        path: str = None,  # Target path for repository checkout.
        folder: str = None,  # Folder name under repos root when `path` is not set.
        subdir: str = None,  # Optional repository subdirectory to use.
        method: str = None,  # Retrieval method (`git`, `zip`, or `local`).
        local: bool = False,  # If True, force local method.
        meta: dict = None,  # Metadata to merge into repository cmeta.
        update: bool = False,  # If True, update existing repository.
        status: bool = False,  # If True, only query git status.
        checkout: str = None,  # Branch, tag, or commit to checkout.
        keep: bool = False,  # If True, keep existing repo metadata on reindex.
        pre: str = '',  # Command to run before repository retrieval.
        post: str = '',  # Command to run after repository retrieval.
        hide: bool = False,  # If True, hide sensitive command output.
        skip_parent_dir_in_zip: bool = False,  # If True, skip parent directory in zip extraction.
        zip_file: str = None,  # Path to a local zip file to import.
    ):

        """
            Clone or pull CM repository.

            Args:
                                ctx (dict): cMeta context.
                                arg1 (str): Repo alias or UID.
                                url (str): Source URL for git or zip repositories.
                                path (str): Target path for repository checkout.
                                folder (str): Folder name under repos root when `path` is not set.
                                subdir (str): Optional repository subdirectory to use.
                                method (str): Retrieval method (`git`, `zip`, or `local`).
                                local (bool): If True, force local method.
                                meta (dict): Metadata to merge into repository cmeta.
                                update (bool): If True, update existing repository.
                                status (bool): If True, only query git status.
                                checkout (str): Branch, tag, or commit to checkout.
                                keep (bool): If True, keep existing repo metadata on reindex.
                                pre (str): Command to run before repository retrieval.
                                post (str): Command to run after repository retrieval.
                                hide (bool): If True, hide sensitive command output.
                                skip_parent_dir_in_zip (bool): If True, skip parent directory in zip extraction.
                                zip_file (str): Path to a local zip file to import.

            Returns:
              (CM return dict):

              * return (int): return code == 0 if no error and >0 if error
              * (error) (str): error string if return>0

            Raises:
                Exception: Propagated runtime errors, if any.
        """
get_alias_from_url
v1.py:791-839
Get alias from URL
signature

    def get_alias_from_url_(
        self,
        ctx,  # Execution context dictionary with category, command, and control data.
        arg1,  # First positional argument from command input.
    ):

        """
            Get alias from URL

            Args:
                ctx: Execution context dictionary with category, command, and control data.
                arg1: First positional argument from command input.
            Returns:
                dict: Operation result.
            Raises:
                Exception: Propagated runtime errors, if any.
        """
init
v1.py:951-968
Init local cMeta repository
signature

    def init(
        self,
        params,  # Input parameters dictionary.
    ):

        """
            Init local cMeta repository

            @self.get_

            Args:
                params: Input parameters dictionary.
            Returns:
                dict: Operation result.
            Raises:
                Exception: Propagated runtime errors, if any.
        """
list (ls)
v1.py:592-616
List cMeta repositories
signature

    def list__(
        self,
        params,  # Input parameters dictionary.
    ):

        """
            List cMeta repositories

            @base.list_

            Args:
                params: Input parameters dictionary.
            Returns:
                dict: Operation result.
            Raises:
                Exception: Propagated runtime errors, if any.
        """
move (ren|rename|mv)
v1.py:772-787
Move cMeta repositories - not supported
signature

    def move(
        self,
        params,  # Input parameters dictionary.
    ):

        """
            Move cMeta repositories - not supported

            Args:
                params: Input parameters dictionary.
            Returns:
                dict: Operation result.
            Raises:
                Exception: Propagated runtime errors, if any.
        """
plug
v1.py:1228-1262
Plug local cMeta repository
signature

    def plug(
        self,
        params,  # Input parameters dictionary.
    ):

        """
            Plug local cMeta repository
            If arg1 is None, use current directory
            If arg1 is not None:
               If existing path -> use that path
               If path does't exist, use as alias


            @self.get_

            Args:
                params: Input parameters dictionary.
            Returns:
                dict: Operation result.
            Raises:
                Exception: Propagated runtime errors, if any.
        """
pull
v1.py:863-880
Pull cMeta Git repositories
signature

    def pull(
        self,
        params,  # Input parameters dictionary.
    ):

        """
            Pull cMeta Git repositories

            @self.get_

            Args:
                params: Input parameters dictionary.
            Returns:
                dict: Operation result.
            Raises:
                Exception: Propagated runtime errors, if any.
        """
space
v1.py:1307-1364
Get space of a give repo
signature

    def space(
        self,
        params,  # Input parameters dictionary.
    ):

        """
            Get space of a give repo
            @self.find

            Args:
                params: Input parameters dictionary.
            Returns:
                dict: Operation result.
            Raises:
                Exception: Propagated runtime errors, if any.
        """
status
v1.py:843-860
Update cMeta Git repositories
signature

    def status(
        self,
        params,  # Input parameters dictionary.
    ):

        """
            Update cMeta Git repositories

            @self.get_

            Args:
                params: Input parameters dictionary.
            Returns:
                dict: Operation result.
            Raises:
                Exception: Propagated runtime errors, if any.
        """
unplug
v1.py:1265-1304
UnPlug local cMeta repository
signature

    def unplug(
        self,
        params,  # Input parameters dictionary.
    ):

        """
            UnPlug local cMeta repository
            If arg1 is None, use current directory
            If arg1 is not None:
               If existing path -> use that path
               If path does't exist, use as alias

            @self.delete

            Args:
                params: Input parameters dictionary.
            Returns:
                dict: Operation result.
            Raises:
                Exception: Propagated runtime errors, if any.
        """
unzip
v1.py:971-1097
Install or update a cMeta repository from a local .zip archive.
signature

    def unzip(
        self,
        params,  # Input parameters dictionary.
    ):

        """
            Install or update a cMeta repository from a local .zip archive.

                cx repo unzip <file.zip>              # first time: extract + register (plug) + index
                cx repo unzip <file.zip>              # again later: extract over + reindex (an update)
                cx repo unzip <file.zip> --path=<dir> # extract to a specific folder

            The repository's own alias is read from the `_cmr.yaml` (or `_cmr.json`) inside the
            archive - at its root, or one directory down - so the destination is `<repos>/<alias>`
            whatever the zip file is called. If that repository is not registered yet, it is plugged
            (registered and indexed); if it already is, its index is refreshed. So one command both
            installs a repository the first time and updates it afterwards, with no separate plug or
            reindex step.

            Note: an update replaces the files carried in the archive; a file you added locally is
            kept, and a file deleted upstream is not removed (unplug + delete the folder + unzip for an
            exact copy). Use `cx repo zip <alias>` to produce a compatible archive.

            Args:
                params: Input parameters dictionary (arg1 = path to the .zip file; path = optional target).
            Returns:
                dict: Operation result.
            Raises:
                Exception: Propagated runtime errors, if any.
        """
update
v1.py:640-657
Update cMeta Git repositories
signature

    def update__(
        self,
        params,  # Input parameters dictionary.
    ):

        """
            Update cMeta Git repositories

            @self.get_

            Args:
                params: Input parameters dictionary.
            Returns:
                dict: Operation result.
            Raises:
                Exception: Propagated runtime errors, if any.
        """
zip
v1.py:1101-1225
Zip cMeta repository.
signature

    def zip_(
        self,
        ctx: dict,  # cMeta context
        arg1: str,  # repository name (alias and/or UID)
        skip_date: bool = False,  # if True, skip date and time from filename
        skip_dirs: list = None,  # directories to skip from zipping
        skip_files: list = None,  # files to skip from zipping
        output_path: str = None,  # output path for zip file
        zip_name: str = None,  # explicit output zip filename
        force: bool = False,  # if True, overwrite existing zip file
    ):

        """
            Zip cMeta repository.

            Args:
              ctx (dict): cMeta context
              arg1 (str): repository name (alias and/or UID)
              skip_date (bool): if True, skip date and time from filename
              skip_dirs (list): directories to skip from zipping
                            skip_files (list): files to skip from zipping
              output_path (str): output path for zip file
                            zip_name (str): explicit output zip filename
                            force (bool): if True, overwrite existing zip file

            Returns:
              (CM return dict):

              * return (int): return code == 0 if no error and >0 if error
              * (error) (str): error string if return>0
              * (zip_path) (str): path to created zip file

            Raises:
                Exception: Propagated runtime errors, if any.
        """

Common commands

Every category also inherits the commands below, so any artifact can be found, read, created, moved and tagged the same way.

CommandWhat it does
copy (cp)Copy artifact(s).
signature

    def copy__(
        self,
        params: dict,  # cMeta params.
    ):

        """
            Copy artifact(s).

            @base.move_(**params, copy=True)

            Args:
                params (dict): cMeta params.

            Returns:
                dict: A cMeta dictionary (see move_ for details).

            Raises:
                Exception: Propagated runtime errors, if any.
        """
create (add)Create and index an artifact.
signature

    def create_(
        self,
        ctx: dict,  # cMeta context.
        arg1: str = None,  # Artifact alias or UID.
        tags: str = None,  # Tags to add to the artifact.
        meta: dict = {},  # Initial metadata dictionary.
        yaml: bool = False,  # Save metadata as YAML instead of JSON.
        virtual: bool = False,  # Virtual artifact created only in index (such as repo).
        path: str = None,  # Use this path for artifact (useful for virtual artifacts such as repo).
        index: bool = False, # If true and path exists but not index, just add to index
                             # Useful when AI agents create cMeta entries while bypassing cMeta
    ):

        """
            Create and index an artifact.

            Args:
                ctx (dict): cMeta context.
                arg1 (str | None): Artifact alias or UID.
                tags (str | list | None): Tags to add to the artifact.
                meta (dict): Initial metadata dictionary.
                yaml (bool): Save metadata as YAML instead of JSON.
                virtual (bool): Virtual artifact created only in index (such as repo).
                path (str | None): Use this path for artifact (useful for virtual artifacts such as repo).
                index (bool): Index an artifact that already exists at `path` without creating it.

            Returns:
                dict: A cMeta dictionary with the following keys:
                    - **return** (int): 0 if success, >0 if error.
                    - **error** (str): Error message if `return > 0`.
                    - **path** (str): Path to the created artifact.
                    - **meta** (dict): Artifact metadata.

            Raises:
                Exception: Propagated runtime errors, if any.
        """
delete (rm|remove|del)Delete and unindex artifact(s).
signature

    def delete_(
        self,
        ctx: dict,  # cMeta context.
        arg1: str = None,  # Artifact alias or UID.
        tags: str = None,  # Optional tag filter.
        sort: bool = True,  # Sort artifacts by alias and UID.
        force: bool = False,  # Force deletion without confirmation.
        f: bool = False,  # Shorthand for force.
        skip_uids: bool = False,  # Skip UIDs when using wildcards.
        ignore_errors: bool = False,  # Ignore errors when deleting multiple artifacts.
        print_time: bool = False,  # Print time per deletion.
        match: dict = None,  # Value for match.
        match_empty_version: bool = False,  # Value for match empty version.
        all_tags: str = None,  # Value for all tags.
    ):

        """
            Delete and unindex artifact(s).

            Args:
                ctx (dict): cMeta context.
                arg1 (str | None): Artifact alias or UID.
                tags (str | list | None): Optional tag filter.
                sort (bool): Sort artifacts by alias and UID.
                force (bool): Force deletion without confirmation.
                f (bool): Shorthand for force.
                skip_uids (bool): Skip UIDs when using wildcards.
                ignore_errors (bool): Ignore errors when deleting multiple artifacts.
                print_time (bool): Print time per deletion.
                match (dict | None): Match artifact metadata before deleting.
                match_empty_version (bool): Match artifacts with an empty version value.
                all_tags (str | None): Require all supplied tags when selecting artifacts.

            Returns:
                dict: A cMeta dictionary with the following keys:
                    - **return** (int): 0 if success, >0 if error.
                    - **error** (str): Error message if `return > 0`.
                    - **artifacts** (list): All matched artifacts.
                    - **deleted_artifacts** (list): Deleted artifacts.

            Raises:
                Exception: Propagated runtime errors, if any.
        """
find (search)Find artifacts.
signature

    def find_(
        self,
        ctx: dict,  # cMeta context.
        arg1: str = None,  # Artifact alias or UID.
        tags: str = None,  # Comma-separated string or iterable of tags to match.
        sort: bool = None,  # Sort by path (True by default).
        add_index_file: bool = False,  # Add index file information.
        skip_uids: bool = False,  # Skip UIDs when using wildcards.
        match: dict = None,  # Value for match.
        match_empty_version: bool = False,  # Value for match empty version.
        match_empty_values: bool = False,  # Match when queried values or keys are empty.
        all_tags: str = None,  # Value for all tags.
        load_files = [],  # Load files (omit extension to load either yaml or json)
    ):

        """
            Find artifacts.

            Args:
                ctx (dict): cMeta context.
                arg1 (str | None): Artifact alias or UID.
                tags (str | list | None): Comma-separated string or iterable of tags to match.
                sort (bool): Sort by path (True by default).
                add_index_file (bool): Add index file information.
                skip_uids (bool): Skip UIDs when using wildcards.
                match (dict): Value for match.
                match_empty_version (bool): Value for match empty version.
                match_empty_values (bool): Match artifacts whose queried values or keys are empty.
                all_tags (str): Value for all tags.
                load_files (list): Metadata file basenames to load from each matched artifact.
            Returns:
                dict: A cMeta dictionary with the following keys:
                    - **return** (int): 0 if success, >0 if error.
                    - **error** (str): Error message if `return > 0`.
                    - **artifacts** (list): List of matched artifacts.

            Raises:
                Exception: Propagated runtime errors, if any.                           \
        """
getGet artifact meta. Read if exists, create and read if doesn't exist.
signature

    def get_(
        self,
        ctx: dict,  # cMeta context.
        arg1: str = None,  # Artifact alias or UID.
        tags: str = None,  # Tags to add to the artifact (used during creation).
        skip_uids: bool = False,  # Skip UIDs when using wildcards.
        yaml: bool = False,  # Save/output metadata as YAML instead of JSON.
        meta: dict = {},  # Initial metadata dictionary (used during creation).
        virtual: bool = False,  # Virtual artifact created only in index (used during creation).
        path: str = None,  # Use this path for artifact (used during creation).
        show_path: bool = False,  # Print path instead of meta
        load_files = [],  # Value for load files.
    ):

        """
            Get artifact meta. Read if exists, create and read if doesn't exist.

            Args:
                ctx (dict): cMeta context.
                arg1 (str | None): Artifact alias or UID.
                tags (str | list | None): Tags to add to the artifact (used during creation).
                skip_uids (bool): Skip UIDs when using wildcards.
                yaml (bool): Save/output metadata as YAML instead of JSON.
                meta (dict): Initial metadata dictionary (used during creation).
                virtual (bool): Virtual artifact created only in index (used during creation).
                path (str | None): Use this path for artifact (used during creation).
                show_path (bool): Print path instead of meta
                load_files: Value for load files.

            Returns:
                dict: A cMeta dictionary with the following keys:
                    - **return** (int): 0 if success, >0 if error.
                    - **error** (str): Error message if `return > 0`.
                    - **artifact** (dict): Matched artifact.
                    - **cmeta** (dict): Artifact metadata.
                    - **created** (bool): True if artifact was created, False if it already existed.

            Raises:
                Exception: Propagated runtime errors, if any.
        """
indexIndex artifact(s).
signature

    def index(
        self,
        params: dict,  # cMeta params.
    ):

        """
            Index artifact(s).

            @base.create_(**params, index=True)

            Args:
                params (dict): cMeta params.

            Returns:
                dict: A cMeta dictionary (see move_ for details).

            Raises:
                Exception: Propagated runtime errors, if any.
        """
infoGet artifact info.
signature

    def info_(
        self,
        ctx: dict,  # cMeta context.
        arg1: str = None,  # Artifact alias or UID.
        clip: bool = True,  # If True, copy cRef to clipboard.
        url: bool = False,  # If True, copy URL with detected cRef to the clipboard.
        name: bool = False,  # If True, copy artifact name to the clipboard
    ):

        """
            Get artifact info.

            Args:
                ctx (dict): cMeta context.
                arg1 (str | None): Artifact alias or UID.
                clip (bool): If True, copy cRef to clipboard.
                url (bool): If True, copy URL with detected cRef to the clipboard.
                name (bool): If True, copy artifact name to the clipboard
            Returns:
                dict: A cMeta dictionary with the following keys:
                    - **return** (int): 0 if success, >0 if error.
                    - **error** (str): Error message if `return > 0`.
                    - **artifacts** (list): List of matched artifacts.

            Raises:
                Exception: Propagated runtime errors, if any.
        """
list (ls)List artifact names.
signature

    def list_(
        self,
        ctx: dict,  # cMeta context.
        arg1: str = None,  # Artifact alias or UID.
        tags: str = None,  # Optional tag filter.
        sort: bool = None,  # Sort by alias or UID.
        skip_uids: bool = False,  # Skip UIDs when using wildcards.
    ):

        """
            List artifact names.

            Args:
                ctx (dict): cMeta context.
                arg1 (str | None): Artifact alias or UID.
                tags (str | list | None): Optional tag filter.
                sort (bool): Sort by alias or UID.
                skip_uids (bool): Skip UIDs when using wildcards.
            Returns:
                dict: A cMeta dictionary with the following keys:
                    - **return** (int): 0 if success, >0 if error.
                    - **error** (str): Error message if `return > 0`.
                    - **artifacts** (list): List of matched artifacts.

            Raises:
                Exception: Propagated runtime errors, if any.
        """
move (ren|rename|mv)Rename and/or move artifact(s).
signature

    def move_(
        self,
        ctx: dict,  # cMeta context.
        arg1: str,  # cMeta artifact(s) with wildcards to be renamed or moved.
        arg2: str,  # New cMeta artifact name and/or new repository.
        tags: str = None,  # Prune source artifacts by tags.
        sort: bool = True,  # Sort artifacts by alias and UID when updating in batch.
        skip_uids: bool = False,  # Skip UIDs when using wildcards.
        ignore_errors: bool = False,  # Ignore errors when updating multiple artifacts.
        copy: bool = False,  # If True, copy artifact instead of moving.
    ):

        """
            Rename and/or move artifact(s).

            Args:
                ctx (dict): cMeta context.
                arg1 (str): cMeta artifact(s) with wildcards to be renamed or moved.
                arg2 (str): New cMeta artifact name and/or new repository.
                tags (str | list | None): Prune source artifacts by tags.
                sort (bool): Sort artifacts by alias and UID when updating in batch.
                skip_uids (bool): Skip UIDs when using wildcards.
                ignore_errors (bool): Ignore errors when updating multiple artifacts.
                copy (bool): If True, copy artifact instead of moving.

            Returns:
                dict: A cMeta dictionary with the following keys:
                    - **return** (int): 0 if success, >0 if error.
                    - **error** (str): Error message if `return > 0`.
                    - **artifacts** (list): All matched artifacts.
                    - **updated_artifacts** (list): Updated artifacts.

            Raises:
                Exception: Propagated runtime errors, if any.
        """
read (load)Read artifact meta.
signature

    def read_(
        self,
        ctx: dict,  # cMeta context.
        arg1: str = None,  # Artifact alias or UID.
        tags: str = None,  # Optional tag filter.
        extra: bool = False,  # Show extra info.
        skip_uids: bool = False,  # Skip UIDs when using wildcards.
        yaml: bool = False,  # Output as YAML instead of JSON.
        load_files = [],  # Value for load files.
    ):

        """
            Read artifact meta.

            Args:
                ctx (dict): cMeta context.
                arg1 (str | None): Artifact alias or UID.
                tags (str | list | None): Optional tag filter.
                extra (bool): Show extra info.
                skip_uids (bool): Skip UIDs when using wildcards.
                yaml (bool): Output as YAML instead of JSON.
                load_files: Value for load files.

            Returns:
                dict: A cMeta dictionary with the following keys:
                    - **return** (int): 0 if success, >0 if error.
                    - **error** (str): Error message if `return > 0`.
                    - **artifact** (dict): Matched artifact.
                    - **cmeta** (dict): Artifact metadata.

            Raises:
                Exception: Propagated runtime errors, if any.
        """
setSet artifact meta. Update and read if exists, create and read if doesn't exist.
signature

    def set_(
        self,
        ctx: dict,  # cMeta context.
        arg1: str = None,  # Artifact alias or UID.
        tags: str = None,  # Tags to add to the artifact (used during creation).
        skip_uids: bool = False,  # Skip UIDs when using wildcards.
        yaml: bool = False,  # Save/output metadata as YAML instead of JSON.
        meta: dict = {},  # Initial metadata dictionary (used during creation).
        virtual: bool = False,  # Virtual artifact created only in index (used during creation).
        path: str = None,  # Use this path for artifact (used during creation).
        show_path: bool = False,  # Print path instead of meta
    ):

        """
            Set artifact meta. Update and read if exists, create and read if doesn't exist.

            Args:
                ctx (dict): cMeta context.
                arg1 (str | None): Artifact alias or UID.
                tags (str | list | None): Tags to add to the artifact (used during creation).
                skip_uids (bool): Skip UIDs when using wildcards.
                yaml (bool): Save/output metadata as YAML instead of JSON.
                meta (dict): Initial metadata dictionary (used during creation).
                virtual (bool): Virtual artifact created only in index (used during creation).
                path (str | None): Use this path for artifact (used during creation).
                show_path (bool): Print path instead of meta

            Returns:
                dict: A cMeta dictionary with the following keys:
                    - **return** (int): 0 if success, >0 if error.
                    - **error** (str): Error message if `return > 0`.
                    - **artifact** (dict): Matched artifact.
                    - **cmeta** (dict): Artifact metadata.
                    - **created** (bool): True if artifact was created, False if it already existed.

            Raises:
                Exception: Propagated runtime errors, if any.
        """
tagsFind unique tags in artifacts.
signature

    def tags_(
        self,
        ctx: dict,  # cMeta context.
        arg1: str = None,  # Artifact alias or UID.
        tags: str = None,  # Comma-separated string or iterable of tags to match.
        sort: bool = False,  # Value for sort.
    ):

        """
            Find unique tags in artifacts.

            Args:
                ctx (dict): cMeta context.
                arg1 (str | None): Artifact alias or UID.
                tags (str | list | None): Comma-separated string or iterable of tags to match.
                sort (bool): Value for sort.
            Returns:
                dict: A cMeta dictionary with the following keys:
                    - **return** (int): 0 if success, >0 if error.
                    - **error** (str): Error message if `return > 0`.
                    - **artifacts** (list): List of matched artifacts.

            Raises:
                Exception: Propagated runtime errors, if any.
        """
testTest category.
signature

    def test(
        self,
        params: dict,  # Parameters dictionary.
    ):

        """
            Test category.

            Args:
                params (dict): Parameters dictionary.
            Returns:
                dict: A cMeta dictionary with the following keys:
                    - **return** (int): 0 if success, >0 if error.

            Raises:
                Exception: Propagated runtime errors, if any.
        """
updateUpdate artifact(s).
signature

    def update_(
        self,
        ctx: dict,  # Execution context dictionary with category, command, and control data.
        arg1: str = None,  # First positional argument from command input.
        tags: str = None,  # Value for tags.
        sort: bool = True,  # Value for sort.
        skip_uids: bool = False,  # If True, skip UID validation in wildcard lookups.
        meta: dict = {},  # Metadata dictionary to persist.
        new_tags: str = None,  # Value for new tags.
        replace_lists: bool = False,  # Value for replace lists.
        replace: bool = False,  # Value for replace.
        ignore_errors: bool = False,  # Value for ignore errors.
        create: bool = False,  # Value for create.
        create_params: dict = {},  # Value for create params.
        update_category: bool = False,  # Value for update category.
        match: dict = None,  # Value for match.
        match_empty_version: bool = False,  # Value for match empty version.
        all_tags: str = None,  # Value for all tags.
    ):

        """
            Update artifact(s).

            Args:
                ctx (dict): cMeta context.
                arg1 (str | None): cMeta artifact(s) with wildcards.
                tags (str | list | None): Prune artifacts by tags.
                sort (bool): Sort artifacts by alias and UID when updating in batch.
                skip_uids (bool): Skip UIDs when using wildcards.
                meta (dict): Meta dictionary to merge recursively with existing artifact.
                new_tags (str | list | None): Add more tags.
                replace_lists (bool): Replace lists during merging.
                replace (bool): Replace existing meta dictionary entirely.
                ignore_errors (bool): Ignore errors when updating multiple artifacts.
                create (bool): If artifact doesn't exist attempt to create.
                create_params (dict): Pass params to create function.
                update_category (bool): Allow category update in meta.
                match (dict | None): Match artifact metadata before updating.
                match_empty_version (bool): Match artifacts with an empty version value.
                all_tags (str | None): Require all supplied tags when selecting artifacts.

            Returns:
                dict: A cMeta dictionary with the following keys:
                    - **return** (int): 0 if success, >0 if error.
                    - **error** (str): Error message if `return > 0`.
                    - **artifacts** (list): All matched artifacts.
                    - **updated_artifacts** (list): Updated artifacts.

            Raises:
                Exception: Propagated runtime errors, if any.
        """

How to use it

cx repo checkout
cx repo                     # list every command with its help
from cmeta import CMeta
cm = CMeta()
r = cm.access({'category': 'repo,f4f792ab40c7498f', 'command': 'checkout'})

Artifacts

The open-source repositories ship no repo artifacts - this category holds what you and your runs create.

cx repo list

Depends on

Uses categories: config

Source: repo on GitHub · its API

Read live from the cMeta index of this server - the same data cx category list shows you locally.