jangelsb Posted November 3 Posted November 3 (edited) Hi all, I'm back with a much bigger workflow than my previous one. This one is definitely my most ambitious workflow yet. And I'm super excited to share it with you guys! Meet `git+` a fully customizable git interface for Alfred! It allows you to quickly filter your repos and do actions on them including ability to see the status of your branch ability to checkout branches ability to create branches ability to pull, fetch, push ability to stage and unstage files ability to commit ability to make your own commands with subcommands (all actions are defined in a yaml file!) and a lot more! If you enjoy this workflow, please consider buying my next cup of coffee ☕ Here is the link to the repo: https://github.com/jangelsb/git-x-alfred-workflow/ Enjoy & God bless! - josh https://jangelsb.github.io --------------------------------------------------------------------- Latest Build v2024.7 Tips & Tricks You can drag and drop the folders in the git repo list When you press enter on commands, they will be considered "triggered" in Alfred but will auto complete -- which means Alfred will apply smart sorting to them going forward You can always press → on the keyboard to see the command that will be run --------------------------------------------------------------------- Fully customizable All actions are defined here: https://github.com/jangelsb/git-plus-alfred-workflow/blob/main/actions.yaml For detailed documentation, see docs.md Supports multiple repos Switch branches Create new branches And so much more! --------------------------------------------------------------------- Change Log v2024.7 General Updates The workflow is now called `git+`, and the bundle ID has changed Created detailed documentation on how commands work: see docs here: https://github.com/jangelsb/git-plus-alfred-workflow/blob/main/docs.md Updated readmes both in the repository and within the workflow, along with new screenshots Added shiny new icons 😎 Command Enhancements Consolidated all commands into the `actions.yaml` so all commands are defined in one place Updated Alfred to stack the `[view in alfred]` command, allowing you to press escape and return to `git+` Added support for inline commands using `should_use_values_as_inline_commands` Introduced subtitle actions, enabling commands to display dynamic info Added support for subcommands, with examples included in the default configuration Added support for `[parent]` or `[parent~n]` dynamic placeholders to reference git+ commands in your bash commands -- useful for subcommands Enabled subtitle searching, you can now filter by title or subtitle! Introduced drag-and-drop support, repo folders are now treated as actual folders. This is great for dragging a Swift package into Xcode for example! Added the ability to reload the workflow with `[reload]` or `[reload~n]` commands Introduced preliminary support for Quick Look URLs with `quicklookurl` Git-Specific Features Created a brand new status command to display Staged, modified, and untraced files directly in Alfred Allowing you to interactively stage and unstage files in Alfred Added Git tag management, including: Viewing tags Copying diffs from tags Deleting local and remote tags Introduced new rebase and rebase --onto commands Replaced the ⌘+c shortcut for copying a branch name and replaced it with a dedicated command Bug Fixes Fixed issues with: Checkout and push commands when branch names were very long Modifiers not properly setting up their commands The `pop` command in default Resolved edge cases in tokenization logic to better handle complex commands Cleaned up YAML parsing to gracefully handle errors and reduce duplication Edited Saturday at 10:24 PM by jangelsb updated to the latest version: v2024.7 cands 1
jangelsb Posted November 3 Author Posted November 3 I have already updated it with a new version 😊 https://github.com/jangelsb/git-x-alfred-workflow/releases/tag/v2024.3 v2024.3 Add support for yaml based modifiers (you can now add custom modifiers when checking out a branch!) source the profile before running a command as well Add support for user custom actions based on a yaml file and give some examples Update default values, made the git status do a complex bash command to be more helpful
jangelsb Posted November 3 Author Posted November 3 (edited) Okay one more update for tonight 😁 https://github.com/jangelsb/git-x-alfred-workflow/releases/tag/v2024.4 v2024.4 Added icons for the different commands Updated workflow icon Updated screenshots Edited Saturday at 01:30 AM by jangelsb Removed missing photos
vitor Posted November 3 Posted November 3 Welcome @jangelsb, Thank you for sharing. I haven’t explored the workflow yet, but I can already make three suggestions (the last two also apply to your other submitted workflow): You might want to consider a different name, seeing as gitx is already the name of a Git client. Not a huge deal but you seem to take care into the names you choose, so worth mentioning. Having completely mono coloured icons won’t work great for people who use a theme which doesn’t contrast well with the chosen colour. An easy approach is to have a contrasting border colour on the icons. To take good looking screenshots, start by pressing ⌘⇧4, then press the space bar. That takes you into window screenshotting mode. Hover over Alfred window and click. You’ll get better screenshots, including the window’s shadow over a transparent background. jangelsb 1
Dellu Posted November 3 Posted November 3 (edited) Thank you for the workflow. It is working great. But, I have a newbie question. I am new to git. But, shouldn't we do a commit before you do a push? My changes were not getting reflected in GitHub when I chose "push" from the given commands. That is not mean: why don't you add "add" and "commit" commands? Edited November 3 by Dellu jangelsb 1
jangelsb Posted November 4 Author Posted November 4 On 11/3/2024 at 6:43 AM, vitor said: Welcome @jangelsb, Thank you for sharing. I haven’t explored the workflow yet, but I can already make three suggestions (the last two also apply to your other submitted workflow): You might want to consider a different name, seeing as gitx is already the name of a Git client. Not a huge deal but you seem to take care into the names you choose, so worth mentioning. Having completely mono coloured icons won’t work great for people who use a theme which doesn’t contrast well with the chosen colour. An easy approach is to have a contrasting border colour on the icons. To take good looking screenshots, start by pressing ⌘⇧4, then press the space bar. That takes you into window screenshotting mode. Hover over Alfred window and click. You’ll get better screenshots, including the window’s shadow over a transparent background. Hey @vitor thanks for the great feedback! I'll take some time to think of a different name. If I change the name, is it possible to update the OP and title? Or should I make a new thread? I don't seem to have the permission to edit the post anymore. For the icons, I'll take some time to clean up the icons. I was just using SF Symbols for now, do you know how to easily add borders? If not, I'll try to figure out a way. For the screenshots, I actually did use the ⌘⇧4 + space method but I went in and manually compressed the images and changed them to jpg to reduce the file size. I was trying to have screenshots in the workflow but not bloat the size too much. Any suggestions? I can definitely fix the "marketing" screenshots on the github repo and in this thread. Also do you have any suggestions on how to best store the workflow in git? Right now, I have an internal script that I copy to my git repo to keep it in version control. But it would be awesome if my git repo pointed to the internal script or if my workflow was a git repo so that all the content in the workflow (including the internal script) was version controlled. Thanks again for the welcome and the feedback. I'm excited to see how this workflow expands!
jangelsb Posted November 4 Author Posted November 4 On 11/3/2024 at 10:54 AM, Dellu said: Thank you for the workflow. It is working great. But, I have a newbie question. I am new to git. But, shouldn't we do a commit before you do a push? My changes were not getting reflected in GitHub when I chose "push" from the given commands. That is not mean: why don't you add "add" and "commit" commands? Hey @Dellu! Thanks for trying out my workflow 😊 And yes you are correct you need to commit before you can push. I'll definitely add the `add` and `commit` commands soon. I also plan on making most of this workflow defined by a yaml file where you can add your own commands like those. I have lots of ideas and I'm super excited to build it out and share it with you guys
odapg Posted November 5 Posted November 5 11 hours ago, jangelsb said: For the icons, I'll take some time to clean up the icons. I was just using SF Symbols for now, do you know how to easily add borders? If not, I'll try to figure out a way. Did you try: https://www.alfredforum.com/topic/19021-icon-generator-quickly-generate-icons-from-sf-symbols https://www.alfredforum.com/topic/22200-icon-maker-create-icons-using-sf-symbols ? Many thanks for the workflow by the way! jangelsb 1
vitor Posted November 5 Posted November 5 17 hours ago, jangelsb said: If I change the name, is it possible to update the OP and title? Sure. Ping me and we’ll sort it out. 17 hours ago, jangelsb said: I was just using SF Symbols for now, do you know how to easily add borders? There’s a workflow to help with that. 17 hours ago, jangelsb said: I was trying to have screenshots in the workflow but not bloat the size too much. Any suggestions? You can compress them. There’s a workflow for that too. 17 hours ago, jangelsb said: Right now, I have an internal script that I copy to my git repo to keep it in version control. But it would be awesome if my git repo pointed to the internal script or if my workflow was a git repo so that all the content in the workflow (including the internal script) was version controlled. Workflow folders inside Alfred Preferences can be symlinks. Just be sure to make the symlink to a folder inside your repo and not the repo itself, because you don’t want to package .git every time you export. jangelsb 1
jangelsb Posted November 6 Author Posted November 6 Hey all, I'm coming in with a much needed hotfix: v2024.5: https://github.com/jangelsb/git-x-alfred-workflow/releases/tag/v2024.5 * Fixed issues where you couldn't create a branch or fetch * Fixed an issue where you couldn't access bash functions that were in your profile, even though it is sourced * Added true yaml parsing * Laying the ground work for more robust and complicated config base (yaml) actions * Updated the default values to have better onboarding (may need install / reinstall to see) I also noticed that if your bash_profile is too heavy it will slow down the actions by quite a bit - I recommend keeping the profile you select lean with just the exports and functions you need and then it will be lightening fast 😎 example checkout mods: - title: ⌘ Open in Xcode after (example) mod: cmd command: git checkout [input]; git pull; xed . updated fetch command: git fetch -p Also * I am still planning on changing the name and the bundle id - but I'm still debating on the name. I'm thinking maybe `git+`? What do you guys think? * I am still planning on adding the ability to commit files * I am currently looking into how to make robust yaml based actions so you can do all the common actions in your repos you need Thanks for checking out my workflow and I hope you guys enjoy! -josh
FireFingers21 Posted November 7 Posted November 7 8 hours ago, jangelsb said: I'm thinking maybe `git+`? That could be a good option, there doesn't appear to be many other projects with the "git+" name. The few that I found have been unmaintained for at least 2 years, with one that hasn't been touched for almost a decade. jangelsb 1
jangelsb Posted November 7 Author Posted November 7 Hi all, I released another build, v2024.6: https://github.com/jangelsb/git-x-alfred-workflow/releases/tag/v2024.6 The main reason this is being released so quickly is because it fixes an issue I thought I fixed in the previous build. And I want you guys to have a good and stable build. I am also using this workflow daily, so as I see problems I want to jump on them and fix them right away. I also have lots of cool ideas for this workflow and am excited to build it and share it! v2024.6 Change Log Really fixed the issue where you couldn't access bash functions that were in your profile, even though it is sourced (the script needed to run as zsh and not bash) 😅 Continuing to lay the ground work for more complicated commands (you can now make an action that shows a list of values (predefined or dynamic) NOTE: these are still works in progress and the schema may change. Once they become more final - I'll make an example config showing all the cool stuff you can do Added a way to show the repo in Alfred (by passing `[view in alfred]` as the command for an action --- Here's an example of some cool commands you can do in this build: - title: selection command: echo [input] values: - one - two - three - title: find file command: st [input] values_command: find . -type f - title: View in Alfred command: [view in alfred]
jangelsb Posted November 27 Author Posted November 27 (edited) Hi all! I am back with a HUGE update. And I am really excited to share it with you all. This would be v2.0 if I went with that versioning 😄 I have renamed the project to `git+` and changed the bundle id. I have revamped the git repo and created detailed documentation on how to create commands and how they work, see docs. You can download v2024.7 here: https://github.com/jangelsb/git-plus-alfred-workflow/releases/tag/v2024.7 Thank you all for your comments, feedback, and for trying out my workflow — I hope you enjoy it!! God bless and happy Thanksgiving! - josh https://jangelsb.github.io git+ for Alfred Fully customizable Supports multiple repos Switch branches Create new branches And so much more! v2024.7 Change Log Tips & Tricks You can drag and drop the folders in the git repo list When press enter on commands, they will be considered "triggered" in Alfred but will auto complete -- which means Alfred will apply smart sorting to them going forward You can always press → on the keyboard to see the command that will be run General Updates The workflow is now called `git+`, and the bundle ID has changed Created detailed documentation on how commands work: see docs here: https://github.com/jangelsb/git-plus-alfred-workflow/blob/main/docs.md Updated readmes both in the repository and within the workflow, along with new screenshots Added shiny new icons 😎 Command Enhancements Consolidated all commands into the `actions.yaml` so all commands are defined in one place Updated Alfred to stack the `[view in alfred]` command, allowing you to press escape and return to `git+` Added support for inline commands using `should_use_values_as_inline_commands` Introduced subtitle actions, enabling commands to display dynamic info Added support for subcommands, with examples included in the default configuration Added support for `[parent]` or `[parent~n]` dynamic placeholders to reference git+ commands in your bash commands -- useful for subcommands Enabled subtitle searching, you can now filter by title or subtitle! Introduced drag-and-drop support, repo folders are now treated as actual folders. This is great for dragging a Swift package into Xcode for example! Added the ability to reload the workflow with `[reload]` or `[reload~n]` commands Introduced preliminary support for Quick Look URLs with `quicklookurl` Git-Specific Features Created a brand new status command to display Staged, modified, and untraced files directly in Alfred Allowing you to interactively stage and unstage files in Alfred Added Git tag management, including: Viewing tags Copying diffs from tags Deleting local and remote tags Introduced new rebase and rebase --onto commands Replaced the ⌘+c shortcut for copying a branch name and replaced it with a dedicated command Bug Fixes Fixed issues with: Checkout and push commands when branch names were very long Modifiers not properly setting up their commands The `pop` command in default Resolved edge cases in tokenization logic to better handle complex commands Cleaned up YAML parsing to gracefully handle errors and reduce duplication Edited November 27 by jangelsb Joshua Shew 1
jangelsb Posted Saturday at 01:44 AM Author Posted Saturday at 01:44 AM Hi all, I have officially changed the title of this thread and have updated the OP (first message in this thread). My plan is to post updates when I release an update and I will keep the OP up to date. I am working on some cool ideas and I can't wait to share them with you. In v2024.7 I added the ability to stage and unstage files. But I just figured out how to also show the different hunks inside Alfred 👀, so soon (after I do some stress testing) you'll be able to stage / unstage / discard hunks as well 😎 Also I would love it if you guys shared screenshots or config files - it would be awesome to see how others use this workflow! For example, I can see this being great for running commands in your build script in a repo with options that support auto complete. - Josh
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now