- Notifications
You must be signed in to change notification settings - Fork673
-
The CLI is not in a good shape today, compared the rest of the library. Alternatives exist and seem to do a better job. @max-wittig and I don't use the CLI, and don't have much to improve it so we are considering removing it from the python-gitlab code. The decision is not made, and we hope to get some feedback from users in this issue. |
BetaWas this translation helpful?Give feedback.
All reactions
Replies: 14 comments 3 replies
-
I'd be a bit sad to see this go. We're just getting ready to launch aGitLab instance on our campus, and for my team, having quick CLI tools tohelp with some administrative work has the potential to be extremelyhelpful, as we've already seen with some of our other services like Googleand Box. If the CLI is to be removed, could anyone make a suggestion as toa good alternative? …On Fri, Feb 22, 2019 at 9:51 AM Gauvain Pocentek ***@***.***> wrote: The CLI is not in a good shape today, compared the rest of the library. Alternatives exist and seem to do a better job.@max-wittig <https://github.com/max-wittig> and I don't use the CLI, and don't have much to improve it so we are considering removing it from the python-gitlab code. The decision is not made, and we hope to get some feedback from users in this issue. — You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub <#708>, or mute the thread <https://github.com/notifications/unsubscribe-auth/AjpHj7QsBuDJTl4srbYf3E6oDvzFPsfIks5vQAP1gaJpZM4bJwDk> . -- *Rob Carleski*ITS Collaboration ServicesUniversity of Michigan734.764.2777 |
BetaWas this translation helpful?Give feedback.
All reactions
👍 1
-
Like mentioned above, we haven't made a final decision yet. Buthttps://github.com/michaellihs/golab seems to be pretty good. |
BetaWas this translation helpful?Give feedback.
All reactions
Uh oh!
There was an error while loading.Please reload this page.
Uh oh!
There was an error while loading.Please reload this page.
-
I was just about to fill a couple of bugs in the gitlab CLI. They can be fixed easily. What exactly is meant by "not in a good shape"? Does it mean that the code is so buggy that it is not worth fixing? Or that there are some bugs but no one to fix them? Or that the CLI API is incomplete? If the CLI is in relatively good shape but some functionalities are missing or do not work because of simple bugs, then I'd vote for fixing them and letting the CLI alive. I actually found your project a couple of days ago because I was searching for a command-line gitlab client. I like yours, especially because it is written in python which I know (in contrast to ruby or go). |
BetaWas this translation helpful?Give feedback.
All reactions
-
Thanks for your opinion on this. The thing about CLI programs is that they are language independent and we're just two people maintaining this library (and neither of use uses the CLI). It would be cool, if we would get more people to help here. |
BetaWas this translation helpful?Give feedback.
All reactions
-
I was shortly looking at golab docs, and I'm missing such basic functionality like listing groups hierarchy. However, I haven't installed golab yet, so maybe golab shows the group hierarchy in its console output. But the docs for command "golab group ls" do not suggest anything like that. |
BetaWas this translation helpful?Give feedback.
All reactions
-
@xarx00 here is a list of bugs if you want to look into fixing the CLI:https://github.com/python-gitlab/python-gitlab/issues?q=is%3Aissue+is%3Aopen+label%3Acli We can of course help if you have questions :) Thanks! |
BetaWas this translation helpful?Give feedback.
All reactions
-
I'm afraid I have no capacity to contribute, but I do use the CLI and I'd like to see the functionality preserved if possible. I'd much rather install a single library with a unified conceptual approach than have to install two packages which are based on different languages and, inevitably, different conceptual approaches to the CLI. |
BetaWas this translation helpful?Give feedback.
All reactions
-
Hi all, Not much progress on this in the last 3 months. Here is the status:
Today the CLI and lib are tightly linked (plenty of attributes defined in the python classes), and the CLI code uses lib introspection to handle argument parsing. It is painful, and doesn't work well. I think we should keep the lib simple since it works fine this way, and we should move the "complexities" (types, mandatory/option arguments, ...) to the CLI, where it makes more sense. |
BetaWas this translation helpful?Give feedback.
All reactions
-
Let's preserve the CLI, even though it might be worse than something likehttps://github.com/michaellihs/golab, but people still use the python-gitlab CLI a lot. |
BetaWas this translation helpful?Give feedback.
All reactions
-
I recently stumbled upon this project as I was looking for a tool to help me do some basic GitLab admin from the command line (most notably checking up on runners and seeing job failures). The fact that there were extensive docs to go hand-in-hand with the API docs gave me a warm feeling. I found the CLI easy to pick up largely because of the docs, although the help for the entire list of resources is a little unwieldy and I see a couple of issues already raised around that. Aside from that it's been pretty easy from using the docs to work out what My only real stumbling block with the CLI was the sparsity of the output in the default (legacy) mode. I was confused by the lack of properties on display and spent ages looking into the Once I had the JSON output it was just a hop, skip, and jump to add some While the library is nice to have as a fallback I do not really know Python and so the CLI is more useful to someone like myself coming from the I'm just one data point but I thought I'd add my vote for it's usefulness as it stands (#593 notwithstanding 🙂). Thanks again for all your hard work, whatever happens. Note: I was not even aware of |
BetaWas this translation helpful?Give feedback.
All reactions
Uh oh!
There was an error while loading.Please reload this page.
Uh oh!
There was an error while loading.Please reload this page.
-
If you are interested, you may look at my forkhttps://github.com/xarx00/python-gitlab. I fixed some bugs, improved the outputs and implemented various new functions there. The new functions are mainly related to the correspondence between the remote GitLab and its local copy. But I had to change the core slightly, so this fork is now incompatible with the original and cannot be merged easily. If there is enough interest, I can make it mergeable, but the behaviour of the CLI changed a little, which might be a problem for the python-gitlab maintainers. You should be aware, however, that I'm not going to maintain an official clone if this fork won't be merged in to the original python-gitlab. If you're going to test it anyway, you'll need to create a
The
Tested on Windows, only. |
BetaWas this translation helpful?Give feedback.
All reactions
-
@xarx00 Please contribute here if you have some fixes. |
BetaWas this translation helpful?Give feedback.
All reactions
Uh oh!
There was an error while loading.Please reload this page.
Uh oh!
There was an error while loading.Please reload this page.
-
I've already contributed several fixes. The other fixes would require more or less substantial changes in the core. I don't remember the details, as it is already several months since I made last changes. But that was why I forked, because I was unable to make the fixes and improvements backwards compatible. My aim was to add functionality related to local copy of the remote repository, hence the functionality that is not part of the GitLab REST API. I needed to "bend" some functionality in python-gitlab in order I was able to do that. And, along the way, I did also several fixes and improvements. |
BetaWas this translation helpful?Give feedback.
All reactions
-
I know of two active CLI tools out there: |
BetaWas this translation helpful?Give feedback.
All reactions
-
I think it probably doesn't make sense to abandon the CLI entirely, because it seems no other gitlab CLI client covers nearly as many endpoints, exceptgitbeaker (which might cover more, not sure). A comparison of core commands below (python-gitlab and gitbeaker also nest a lot more subcommands under the core commands, see alsohttps://python-gitlab.readthedocs.io/en/latest/cli-objects.html). *this table's not fair to gitbeaker, because it nests some commands under core ones and combines project/group resources of the same type.
However, we just got access tohttps://pypi.org/project/gitlab/ (seepypi/support#793 (comment)) for more details). Originally, the idea was this solves the confusion with people doing But I had the idea it could be used to split the project into a core API library (this project, which can then focus only on covering API endpoints) and a high-level wrapper providing a CLI and maybe other goodies that people request sometimes, likehttps://github.com/boto/botocore is a core API library used by aws-cli and boto3. Then all the custom command building and formatting in the CLI (which is quite painful to maintain for edge cases) can go away in favor of Any thoughts on this? Of course the naming of repos would be a question then :D Just throwing this out here since a lot of the CLI related issues have been open for a while, this might help resolve things. |
BetaWas this translation helpful?Give feedback.
All reactions
👀 1
-
The For instance, Since these commands are not available yet, you can set an aliases for each of them with the
You can then use it as:
You can have an alias to the
With this, you have two arguments with the first and second arguments taking
|
BetaWas this translation helpful?Give feedback.
All reactions
-
…and as of this writing, neither supports GitLab running on a subdirectory off the root. So the CLI from |
BetaWas this translation helpful?Give feedback.
All reactions
This discussion was converted from issue #708 on May 17, 2021 17:45.