concierge-cli


Nameconcierge-cli JSON
Version 1.7.2 PyPI version JSON
download
home_pagehttps://github.com/vshn/concierge-cli
SummaryConcierge repository projects management CLI.
upload_time2023-02-01 16:46:38
maintainer
docs_urlNone
authorVSHN AG
requires_python>=3.6
licenseBSD-3-Clause
keywords cli gitlab maintenance
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            Concierge-cli |latest-version|
==============================

|checks-status| |tests-status| |health| |python-support| |license|

Companion CLI for `Concierge`_, the Configuration management & CI solution
for aligning your multitude of Git repositories.  Allows you to bulk-manage
properties of your Git repository projects.  Currently, GitLab is supported.

.. |latest-version| image:: https://img.shields.io/pypi/v/concierge-cli.svg
   :alt: Latest version on PyPI
   :target: https://pypi.org/project/concierge-cli
.. |checks-status| image:: https://img.shields.io/github/workflow/status/vshn/concierge-cli/Checks/master?label=Checks&logo=github
   :alt: GitHub Workflow Status
   :target: https://github.com/vshn/concierge-cli/actions?query=workflow%3AChecks
.. |tests-status| image:: https://img.shields.io/github/workflow/status/vshn/concierge-cli/Tests/master?label=Tests&logo=github
   :alt: GitHub Workflow Status
   :target: https://github.com/vshn/concierge-cli/actions?query=workflow%3ATests
.. |health| image:: https://img.shields.io/codacy/grade/363c38ca95b941438b442afb64591892/master.svg
   :target: https://www.codacy.com/app/VSHN/concierge-cli
   :alt: Code health
.. |python-support| image:: https://img.shields.io/pypi/pyversions/concierge-cli.svg
   :alt: Python versions
   :target: https://pypi.org/project/concierge-cli
.. |license| image:: https://img.shields.io/pypi/l/concierge-cli.svg
   :alt: Software license
   :target: https://github.com/vshn/concierge-cli/blob/master/LICENSE

.. _Concierge: https://hub.docker.com/r/vshn/concierge/

Why Should I Use This Tool?
---------------------------

Concierge-cli helps you analyze and bulk-update the repository projects you
manage (e.g. set topics on projects, generate project lists for ModuleSync).

Installation
------------

From PyPI:

.. code-block:: console

    $ pip install concierge-cli

**Note:** You need Python >= 3.6, otherwise your installation will not
succeed (`python-gitlab`_ v2.0.0 dropped support for older Pythons).
You can use Pipenv to work around this limitation:

.. code-block:: console

    $ pip install pipenv
    $ pipenv shell --three
    $ pip install concierge-cli

.. _python-gitlab: https://pypi.org/project/python-gitlab/

Preparation
-----------

You need an `access token`_ of a GitLab user to access resources through the
API. For groups and group membership this needs to be an administrator user.
You may also want to `disable notifications`_ of the user(s) you plan to
perform bulk updates on, to avoid sending out massive amounts of emails.

.. _access token: https://gitlab.com/profile/personal_access_tokens
.. _disable notifications: https://gitlab.com/profile/notifications

Set the GitLab URI and TOKEN as environment variables (if you want to avoid
using the ``--token`` and/or ``--uri`` options):

.. code-block:: console

    $ export CONCIERGE_GITLAB_URI=https://git.example.com/
    $ export CONCIERGE_GITLAB_TOKEN=<redacted>

Usage Patterns
--------------

#. Manage `project topics`_
#. List projects by topic
#. List (and merge) merge requests by project
#. Manage `group membership`_ and permissions

.. _project topics: https://docs.gitlab.com/ce/user/project/settings/
.. _group membership: https://docs.gitlab.com/ce/user/group/#add-users-to-a-group

Manage topics
^^^^^^^^^^^^^

List all projects (for a private GitLab) that have no topics yet:

.. code-block:: console

    $ concierge-cli gitlab --uri https://git.vs.hn topics --empty

List all projects "foo" or similar in group "bar" or similar: (on GitLab.com)

.. code-block:: console

    $ concierge-cli gitlab topics bar/foo --empty

Set topics on all those projects:

.. code-block:: console

    $ concierge-cli gitlab topics bar/foo --empty --set-topic Puppet --set-topic Ansible

List all projects *with* topics now: (double-check)

.. code-block:: console

    $ concierge-cli gitlab topics bar/foo

List projects
^^^^^^^^^^^^^

Print a YAML list of all projects matching a topic:

.. code-block:: console

    $ concierge-cli gitlab projects --topic Puppet

Update the list of modules Concierge manages with a specific configuration:

.. code-block:: console

    $ concierge-cli gitlab projects --topic Puppet > configs/foo-bar/managed_modules.yml
    $ git add -v configs/foo-bar/managed_modules.yml
    $ git status && git commit -m 'Added ...' && git push

Merge requests
^^^^^^^^^^^^^^

List of all merge requests of a project, optionally matching labels:

.. code-block:: console

    $ concierge-cli gitlab mrs mygroup/myproject --label mylabel

Add ``--merge yes`` to trigger merging all found requests.

Group membership
^^^^^^^^^^^^^^^^

List all groups where user is not yet a member of:

.. code-block:: console

    $ concierge-cli gitlab groups --no-member my.user.name

Add user to all those groups:

.. code-block:: console

    $ concierge-cli gitlab groups --no-member my.user.name \
                           --set-permission maintainer

List a user's group memberships and permissions:

.. code-block:: console

    $ concierge-cli gitlab groups my.user.name

Remove a user from selected groups:

.. code-block:: console

    $ concierge-cli gitlab groups my.user.name \
                           --group-filter a-group-name \
                           --set-permission none

Found a bug? Need a new feature?
--------------------------------

Please see our `Contribution Guide`_ if you want to help out!

.. _Contribution Guide:
    https://github.com/vshn/concierge-cli/blob/master/CONTRIBUTING.md

            

Raw data

            {
    "_id": null,
    "home_page": "https://github.com/vshn/concierge-cli",
    "name": "concierge-cli",
    "maintainer": "",
    "docs_url": null,
    "requires_python": ">=3.6",
    "maintainer_email": "",
    "keywords": "cli,gitlab,maintenance",
    "author": "VSHN AG",
    "author_email": "tech@vshn.ch",
    "download_url": "https://files.pythonhosted.org/packages/ec/bf/a6f14ee89a00af52f8b52e89bbd9646a1980787482663fdd846c38e6a79c/concierge-cli-1.7.2.tar.gz",
    "platform": null,
    "description": "Concierge-cli |latest-version|\n==============================\n\n|checks-status| |tests-status| |health| |python-support| |license|\n\nCompanion CLI for `Concierge`_, the Configuration management & CI solution\nfor aligning your multitude of Git repositories.  Allows you to bulk-manage\nproperties of your Git repository projects.  Currently, GitLab is supported.\n\n.. |latest-version| image:: https://img.shields.io/pypi/v/concierge-cli.svg\n   :alt: Latest version on PyPI\n   :target: https://pypi.org/project/concierge-cli\n.. |checks-status| image:: https://img.shields.io/github/workflow/status/vshn/concierge-cli/Checks/master?label=Checks&logo=github\n   :alt: GitHub Workflow Status\n   :target: https://github.com/vshn/concierge-cli/actions?query=workflow%3AChecks\n.. |tests-status| image:: https://img.shields.io/github/workflow/status/vshn/concierge-cli/Tests/master?label=Tests&logo=github\n   :alt: GitHub Workflow Status\n   :target: https://github.com/vshn/concierge-cli/actions?query=workflow%3ATests\n.. |health| image:: https://img.shields.io/codacy/grade/363c38ca95b941438b442afb64591892/master.svg\n   :target: https://www.codacy.com/app/VSHN/concierge-cli\n   :alt: Code health\n.. |python-support| image:: https://img.shields.io/pypi/pyversions/concierge-cli.svg\n   :alt: Python versions\n   :target: https://pypi.org/project/concierge-cli\n.. |license| image:: https://img.shields.io/pypi/l/concierge-cli.svg\n   :alt: Software license\n   :target: https://github.com/vshn/concierge-cli/blob/master/LICENSE\n\n.. _Concierge: https://hub.docker.com/r/vshn/concierge/\n\nWhy Should I Use This Tool?\n---------------------------\n\nConcierge-cli helps you analyze and bulk-update the repository projects you\nmanage (e.g. set topics on projects, generate project lists for ModuleSync).\n\nInstallation\n------------\n\nFrom PyPI:\n\n.. code-block:: console\n\n    $ pip install concierge-cli\n\n**Note:** You need Python >= 3.6, otherwise your installation will not\nsucceed (`python-gitlab`_ v2.0.0 dropped support for older Pythons).\nYou can use Pipenv to work around this limitation:\n\n.. code-block:: console\n\n    $ pip install pipenv\n    $ pipenv shell --three\n    $ pip install concierge-cli\n\n.. _python-gitlab: https://pypi.org/project/python-gitlab/\n\nPreparation\n-----------\n\nYou need an `access token`_ of a GitLab user to access resources through the\nAPI. For groups and group membership this needs to be an administrator user.\nYou may also want to `disable notifications`_ of the user(s) you plan to\nperform bulk updates on, to avoid sending out massive amounts of emails.\n\n.. _access token: https://gitlab.com/profile/personal_access_tokens\n.. _disable notifications: https://gitlab.com/profile/notifications\n\nSet the GitLab URI and TOKEN as environment variables (if you want to avoid\nusing the ``--token`` and/or ``--uri`` options):\n\n.. code-block:: console\n\n    $ export CONCIERGE_GITLAB_URI=https://git.example.com/\n    $ export CONCIERGE_GITLAB_TOKEN=<redacted>\n\nUsage Patterns\n--------------\n\n#. Manage `project topics`_\n#. List projects by topic\n#. List (and merge) merge requests by project\n#. Manage `group membership`_ and permissions\n\n.. _project topics: https://docs.gitlab.com/ce/user/project/settings/\n.. _group membership: https://docs.gitlab.com/ce/user/group/#add-users-to-a-group\n\nManage topics\n^^^^^^^^^^^^^\n\nList all projects (for a private GitLab) that have no topics yet:\n\n.. code-block:: console\n\n    $ concierge-cli gitlab --uri https://git.vs.hn topics --empty\n\nList all projects \"foo\" or similar in group \"bar\" or similar: (on GitLab.com)\n\n.. code-block:: console\n\n    $ concierge-cli gitlab topics bar/foo --empty\n\nSet topics on all those projects:\n\n.. code-block:: console\n\n    $ concierge-cli gitlab topics bar/foo --empty --set-topic Puppet --set-topic Ansible\n\nList all projects *with* topics now: (double-check)\n\n.. code-block:: console\n\n    $ concierge-cli gitlab topics bar/foo\n\nList projects\n^^^^^^^^^^^^^\n\nPrint a YAML list of all projects matching a topic:\n\n.. code-block:: console\n\n    $ concierge-cli gitlab projects --topic Puppet\n\nUpdate the list of modules Concierge manages with a specific configuration:\n\n.. code-block:: console\n\n    $ concierge-cli gitlab projects --topic Puppet > configs/foo-bar/managed_modules.yml\n    $ git add -v configs/foo-bar/managed_modules.yml\n    $ git status && git commit -m 'Added ...' && git push\n\nMerge requests\n^^^^^^^^^^^^^^\n\nList of all merge requests of a project, optionally matching labels:\n\n.. code-block:: console\n\n    $ concierge-cli gitlab mrs mygroup/myproject --label mylabel\n\nAdd ``--merge yes`` to trigger merging all found requests.\n\nGroup membership\n^^^^^^^^^^^^^^^^\n\nList all groups where user is not yet a member of:\n\n.. code-block:: console\n\n    $ concierge-cli gitlab groups --no-member my.user.name\n\nAdd user to all those groups:\n\n.. code-block:: console\n\n    $ concierge-cli gitlab groups --no-member my.user.name \\\n                           --set-permission maintainer\n\nList a user's group memberships and permissions:\n\n.. code-block:: console\n\n    $ concierge-cli gitlab groups my.user.name\n\nRemove a user from selected groups:\n\n.. code-block:: console\n\n    $ concierge-cli gitlab groups my.user.name \\\n                           --group-filter a-group-name \\\n                           --set-permission none\n\nFound a bug? Need a new feature?\n--------------------------------\n\nPlease see our `Contribution Guide`_ if you want to help out!\n\n.. _Contribution Guide:\n    https://github.com/vshn/concierge-cli/blob/master/CONTRIBUTING.md\n",
    "bugtrack_url": null,
    "license": "BSD-3-Clause",
    "summary": "Concierge repository projects management CLI.",
    "version": "1.7.2",
    "split_keywords": [
        "cli",
        "gitlab",
        "maintenance"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "d00660cd9bb1868847a324c6c2e81bd55ffcce7470b8e0a582e7525d876c4957",
                "md5": "3dfdd5ebcea73c95b0d0195de4713947",
                "sha256": "ea945389c2784fac866c7e3dff5c26c7b2e69d835f5f8ddd14d7712cadf599ee"
            },
            "downloads": -1,
            "filename": "concierge_cli-1.7.2-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "3dfdd5ebcea73c95b0d0195de4713947",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.6",
            "size": 11353,
            "upload_time": "2023-02-01T16:46:36",
            "upload_time_iso_8601": "2023-02-01T16:46:36.487786Z",
            "url": "https://files.pythonhosted.org/packages/d0/06/60cd9bb1868847a324c6c2e81bd55ffcce7470b8e0a582e7525d876c4957/concierge_cli-1.7.2-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "ecbfa6f14ee89a00af52f8b52e89bbd9646a1980787482663fdd846c38e6a79c",
                "md5": "1bf425134c65f21c811ccbdb0354f5f1",
                "sha256": "2f854d542df501167abde94b8bba436be61bc11a27678f445f513ffc1837a94f"
            },
            "downloads": -1,
            "filename": "concierge-cli-1.7.2.tar.gz",
            "has_sig": false,
            "md5_digest": "1bf425134c65f21c811ccbdb0354f5f1",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.6",
            "size": 11934,
            "upload_time": "2023-02-01T16:46:38",
            "upload_time_iso_8601": "2023-02-01T16:46:38.246026Z",
            "url": "https://files.pythonhosted.org/packages/ec/bf/a6f14ee89a00af52f8b52e89bbd9646a1980787482663fdd846c38e6a79c/concierge-cli-1.7.2.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2023-02-01 16:46:38",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "github_user": "vshn",
    "github_project": "concierge-cli",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": true,
    "requirements": [],
    "tox": true,
    "lcname": "concierge-cli"
}
        
Elapsed time: 0.04011s