{"id":15167090,"url":"https://github.com/lkubb/salt-tool-mas-formula","last_synced_at":"2026-01-20T22:34:50.345Z","repository":{"id":134852608,"uuid":"484002280","full_name":"lkubb/salt-tool-mas-formula","owner":"lkubb","description":"Manage App Store apps with Salt and mas-cli.","archived":false,"fork":false,"pushed_at":"2024-11-20T19:46:50.000Z","size":111,"stargazers_count":0,"open_issues_count":0,"forks_count":1,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-04-09T03:29:40.087Z","etag":null,"topics":["devops","macos","salt-formula","saltstack"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/lkubb.png","metadata":{"files":{"readme":"docs/README.rst","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2022-04-21T10:14:13.000Z","updated_at":"2024-11-20T19:46:54.000Z","dependencies_parsed_at":null,"dependency_job_id":"4420f495-1ebf-4860-bdf1-28b7199c015a","html_url":"https://github.com/lkubb/salt-tool-mas-formula","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/lkubb/salt-tool-mas-formula","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lkubb%2Fsalt-tool-mas-formula","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lkubb%2Fsalt-tool-mas-formula/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lkubb%2Fsalt-tool-mas-formula/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lkubb%2Fsalt-tool-mas-formula/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/lkubb","download_url":"https://codeload.github.com/lkubb/salt-tool-mas-formula/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lkubb%2Fsalt-tool-mas-formula/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28616991,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-20T22:24:05.405Z","status":"ssl_error","status_checked_at":"2026-01-20T22:20:31.342Z","response_time":117,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["devops","macos","salt-formula","saltstack"],"created_at":"2024-09-27T05:24:33.956Z","updated_at":"2026-01-20T22:34:50.329Z","avatar_url":"https://github.com/lkubb.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":".. _readme:\n\nmas Formula\n===========\n\nManages mas in the user environment. Makes sure specified Mac App Store apps are installed and provides a custom execution module/state to manage mas inside salt.\n\n.. contents:: **Table of Contents**\n   :depth: 1\n\nUsage\n-----\nApplying ``tool_mas`` will make sure ``mas`` is configured as specified.\n\nExecution and state module\n~~~~~~~~~~~~~~~~~~~~~~~~~~\nThis formula provides a custom execution module and state to manage packages installed with mas. The `name` parameter can either be a name (which will result in a lucky style installation by installing the most relevant search result) or an ID (recommended to make sure the correct app is installed). The functions are self-explanatory, please see the source code or the rendered docs at :ref:`em_mas` and :ref:`sm_mas`.\n\nConfiguration\n-------------\n\nThis formula\n~~~~~~~~~~~~\nThe general configuration structure is in line with all other formulae from the `tool` suite, for details see :ref:`toolsuite`. An example pillar is provided, see :ref:`pillar.example`. Note that you do not need to specify everything by pillar. Often, it's much easier and less resource-heavy to use the ``parameters/\u003cgrain\u003e/\u003cvalue\u003e.yaml`` files for non-sensitive settings. The underlying logic is explained in :ref:`map.jinja`.\n\nUser-specific\n^^^^^^^^^^^^^\nThe following shows an example of ``tool_mas`` per-user configuration. If provided by pillar, namespace it to ``tool_global:users`` and/or ``tool_mas:users``. For the ``parameters`` YAML file variant, it needs to be nested under a ``values`` parent key. The YAML files are expected to be found in\n\n1. ``salt://tool_mas/parameters/\u003cgrain\u003e/\u003cvalue\u003e.yaml`` or\n2. ``salt://tool_global/parameters/\u003cgrain\u003e/\u003cvalue\u003e.yaml``.\n\n.. code-block:: yaml\n\n  user:\n\n      # Persist environment variables used by this formula for this\n      # user to this file (will be appended to a file relative to $HOME)\n    persistenv: '.config/zsh/zshenv'\n\n      # Add runcom hooks specific to this formula to this file\n      # for this user (will be appended to a file relative to $HOME)\n    rchook: '.config/zsh/zshrc'\n\n      # This user's configuration for this formula. Will be overridden by\n      # user-specific configuration in `tool_mas:users`.\n      # Set this to `false` to disable configuration for this user.\n    mas:\n          # make sure apps are installed/absent\n        apps:\n          absent:\n            - '1147396723'\n          wanted:\n              # Specifying by ID will make sure the correct app is installed.\n            - '747648890'\n              # Specifying by name will install lucky-style\n              # (most relevant search result).\n            - Telegram\n\nFormula-specific\n^^^^^^^^^^^^^^^^\n\n.. code-block:: yaml\n\n  tool_mas:\n\n      # Specify an explicit version (works on most Linux distributions) or\n      # keep the packages updated to their latest version on subsequent runs\n      # by leaving version empty or setting it to 'latest'\n      # (again for Linux, brew does that anyways).\n    version: latest\n\n      # Default formula configuration for all users.\n    defaults:\n      apps: default value for all users\n\n\nAvailable states\n----------------\n\nThe following states are found in this formula:\n\n.. contents::\n   :local:\n\n\n``tool_mas``\n~~~~~~~~~~~~\n*Meta-state*.\n\nPerforms all operations described in this formula according to the specified configuration.\n\n\n``tool_mas.package``\n~~~~~~~~~~~~~~~~~~~~\nInstalls the mas package only.\n\n\n``tool_mas.apps``\n~~~~~~~~~~~~~~~~~\n\n\n\n``tool_mas.clean``\n~~~~~~~~~~~~~~~~~~\n*Meta-state*.\n\nUndoes everything performed in the ``tool_mas`` meta-state\nin reverse order.\n\n\n``tool_mas.package.clean``\n~~~~~~~~~~~~~~~~~~~~~~~~~~\nRemoves the mas package.\n\n\n``tool_mas.apps.clean``\n~~~~~~~~~~~~~~~~~~~~~~~\n\n\n\n\nDevelopment\n-----------\n\nContributing to this repo\n~~~~~~~~~~~~~~~~~~~~~~~~~\n\nCommit messages\n^^^^^^^^^^^^^^^\n\nCommit message formatting is significant.\n\nPlease see `How to contribute \u003chttps://github.com/saltstack-formulas/.github/blob/master/CONTRIBUTING.rst\u003e`_ for more details.\n\npre-commit\n^^^^^^^^^^\n\n`pre-commit \u003chttps://pre-commit.com/\u003e`_ is configured for this formula, which you may optionally use to ease the steps involved in submitting your changes.\nFirst install  the ``pre-commit`` package manager using the appropriate `method \u003chttps://pre-commit.com/#installation\u003e`_, then run ``bin/install-hooks`` and\nnow ``pre-commit`` will run automatically on each ``git commit``.\n\n.. code-block:: console\n\n  $ bin/install-hooks\n  pre-commit installed at .git/hooks/pre-commit\n  pre-commit installed at .git/hooks/commit-msg\n\nState documentation\n~~~~~~~~~~~~~~~~~~~\nThere is a script that semi-autodocuments available states: ``bin/slsdoc``.\n\nIf a ``.sls`` file begins with a Jinja comment, it will dump that into the docs. It can be configured differently depending on the formula. See the script source code for details currently.\n\nThis means if you feel a state should be documented, make sure to write a comment explaining it.\n\nTodo\n----\n* fix ``mas.latest`` state (check if packages are up to date with `mas info` version vs `mas list` version) and don't run if not upgradeable (currently fails with ``something went wrong while calling mas``. also not sure if upgrading a single app is possible\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flkubb%2Fsalt-tool-mas-formula","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Flkubb%2Fsalt-tool-mas-formula","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flkubb%2Fsalt-tool-mas-formula/lists"}