Hacker News new | past | comments | ask | show | jobs | submit login
Using Alfred to open your GitHub repositories in the browser (mmazzarolo.com)
81 points by mmazzarolo on Nov 8, 2020 | hide | past | favorite | 31 comments



Neat. Another workflow that you can use is https://github.com/lox/alfred-github-jump

Lets you search through all your GitHub stars (including own GitHub repos).

I have over 16,300 stars and even with that amount of repos, the search is instant due to SQLite db used. (https://github.com/nikitavoloboev/github-stars)

What's cool is that you can modify actions on a repo. So I made modification so that cmd+return would open issues, opt+return would clone repo to ~/clones & open it in VSCode, cmd+shift+return will do file search on repo instantly etc. (https://github.com/nikitavoloboev/small-workflows)


I just noticed this project is using a bit of code [1] I put up on GitHub over 4 years ago to create Alfred workflows in Go. I never realized people other than myself were actually using this, wonderful!

[1] https://github.com/pascalw/go-alfred


Been following you for a while. Thanks for this recap of stuff I forgot to start using!


Very cool, thanks for sharing.


I used to use Alfred for these kind of workflows, for years. For opening apps, URLs, for triggering Python or bash scripts, and for searching files of course. It’s a wonderful app.

Until I started using Emacs seriously. Now I use Emacs for opening URLs, for triggering Google searches (and saving my searches via org-capture), for saving URLs via org-protocol and org-capture, for taking notes, for journaling, for task management (previously OmniFocus, then Things3), and for all kinds of workflows. It is the ideal application framework, with one of the most versatile programming languages I can think of (Lisp); it made me stop using Python for my day-to-day scripting (love Python!).

Emacs (and Lisp) is a tool for the next decades of my life.


Everytime I read about some advanced emacs workflow, it just blows my mind. I mainly use Emacs (doom emacs actually) as a glorified note taking and task manager app with org-mode.


I think there is a big misconception about what Emacs is (or is not). Many see it as an editor with advanced capabilities, and then they start comparing it to IDEs or editors like VS Code and the like, and finally they think Emacs falls short in comparing to these tools.

The thing is: Emacs is so much more than editing. Just to give an example: I keep a list of meds for my retired parents in on org-table, and every few weeks I need to request a prescription from their doctor and order the meds from their pharmacist. I have a few lines of Elisp to select the meds that my parents need, generate a message for the pharmacist, generate a Fax document for the doctor, and a bunch of tasks (* TODO Send fax to Doctor, * TODO Waiting for prescription from Doctor, * TODO Send prescription to pharmacist, * TODO Waiting for meds from pharmacist, etc) in my org-agenda task list. Triggered with one key combo. By being able to start python or shell scripts from within Lisp code, I am able to automate everything that I run on my Mac, and pass data from one workflow to another.


That's amazing. What's special about emacs to do that vs any other scriptable editor? I don't think I've used an editor that's not scriptable since the late 80s. All the ones I've used could run script and those scripts could call out other programs. Is there anything emacs is doing here that they's other editors wouldn't do?


Short answer: Lisp! - I mean, been using "Sublime Text" some years ago, and "Sublime Text" is scriptable / extendable in Python, and although I am fairly familiar with Python, it never occured to me to extend "Sublime Text". - I can open a scratch buffer in Emacs, hack away commands, put them together in a Lisp function, put it in my `init.el` file , bind it to a shortcut very easily and keep extending my Emacs setup.

This wasn't easy in any editor I used. And none of these editors were meant to be used like that, because their main purpose was / is to edit files, not control Spotify with it, write emails, read rss feeds, and whatnot.

Yes, VS Code goes in that direction, but I don't know many laymans who extend VS Code. They are rather devs with a focus on JS.


Im also in group of people that moved to Emacs and never looked back.

After all, my workflow is to precious to put in any non-free ecosystem ;)


If you ever consider making a short demo video for this, I'd be eager to see this in action.


I use the gh client quite heavily and tend to have most of the repos I'm interested in already cloned.

Having said that, I had a quick go at making a one-liner for this from the terminal. Note, this is using HTTPie instead of cURL.

    xdg-open $(http get https://api.github.com/orgs/your-org/repos | jq -r '.[].html_url' | fzf)


GitHub's own gh tool is really useful for things like this, as its builtin api subcommand¹ performs authenticated requests. Using that you can also see private repos and GitHub Enterprise usage is pretty seamless. Just replace HTTPie, with `gh api <endpoint>`.

¹ https://cli.github.com/manual/gh_api


I've used gh daily for months and didn't even realise it had an api subcommand! Fantastic, thanks.


For Mac users, who's looking for deeper integration with GitHub, we've built an extension in Raycast [1] that allows you to see pull requests, issues, notifications, workflows, etc. Repository search is also something we're planning to add soon.

[1] https://raycast.com/extensions/github/


You can also just have Alfred index your bookmarks, and then bookmark whichever repos you want to make openable through Alfred. It doesn’t work with multiple browser profiles, but I think that could get confusing anyway


While it does involve installing another tool, I've found Command E [0] quite good for the use case you've described. As an Alfred lover myself, this implementation is quite cool. Thanks for sharing!

[0] https://getcommande.com


I’m always afraid of these sorts of apps dying off. Previously all the cloud aggregator apps died off (Grep, CloudMagic). I think Grep was even an HN company.

So moving from Alfred to Command E seems cool right now. But I don’t have faith it’ll keep up updates or keep up at all in 1-2 years.


I also use a very similar script. The one notable difference is that I utilize Alfred’s "match" field that I set to a tokenized version of the repository name:

https://github.com/temochka/macos-automation/blob/master/src...

This allows me to quickly look up similarly named repos while keeping typing to a minimum (e.g., "m c" finds "mysql_client").

I also incorporated the refresh script under a different keyword into the same workflow. This way I can quickly refresh if I don't see a repo that should be there.


Love it, using Alfred to launch bookmarked repos. I was so disappointed with chrome, it prioritizes search google over showing thé matching bookmarks. Didn’t mind opening chrome, but that was a dealbreaker for me.


I take this opportunity to share a workflow I created for searching on Salesforce: https://github.com/jereze/alfred-salesforce

It leverages Salesforce REST API and it runs entirely locally.


Just want to say, I love your style of writing. Very well made visually to help convey your content. Nice job


Thank you so much :)


I saw this today, it uses starship.rs and looks pretty decent https://twitter.com/malfaitrobin/status/1325076698182848514


For vscode users, I recently discovered you can right-click any line and select “copy remote uri.” The copied link takes you right to that line on github (useful for quickly pointing someone to a line of code over slack).


Same for Jetbrains IDEs - right clicking a line will show 'open on GitHub' provided your git remote is pointing to GitHub.com.


I would love it if anything that is not cross-platform, would just get a tag for what OS this is relevant to, so the rest of us don't need to bother.


interesting to see how this works!

i made a similar tool for the command line that keeps my downloads organized and knows how to search for them. it also has functionality for returning the repo url so i have an open alias that just opens the repo in github

https://github.com/r-medina/gito


Alfred looks like a useful tool. Does anyone know of any alternatives for Ubuntu?


Just found one called "Albert"

[1] https://github.com/albertlauncher/albert


Someone have the same things for Gitlab ?




Consider applying for YC's W25 batch! Applications are open till Nov 12.

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: