Jump to content

Search the Community

Showing results for tags 'terminal'.

More search options

  • Search By Tags

    Type tags separated by commas.
  • Search By Author

Content Type


  • Alfred 3
  • Make the Most of Alfred
    • Discussion & Help
    • Bug Reports
    • Alfred Feature Suggestions
    • Themes
  • Alfred Workflows
    • Share your Workflows
    • Workflow Help & Questions
  • Alfred v2 Themes
  • Alfred Remote for iOS
    • Alfred Remote Discussion & Help
    • Remote Connection Troubleshooting


  • Articles
    • Forum Integration
    • Frontpage
  • Pages
  • Miscellaneous
    • Databases
    • Templates
    • Media

Find results in...

Find results that contain...

Date Created

  • Start


Last Updated

  • Start


Filter by number of...


  • Start




Website URL




Found 78 results

  1. Hey all! Alfred 3.8, MacOS 10.14- the Alfred 3.8 update has killed my terminal integration. Whenever I >cmd my terminal no longer loads. I have verified that all the accessibility/security/automation settings are configured for Alfred, and I'm not sure how to troubleshoot this issue. Can you provide any guidance?
  2. Hey guys! Some of you out there (unfortunately, probably not that many) may have heard of the terminal emulator Kitty. It's cross platform, fast, and quite customizable. Long story short, I replaced Terminal.app with Kitty (iTerm never seemed to meet my needs). However, it took quite a lot of work to get Kitty to work when I entered a shell command (i.e. "> echo hello") into Alfred. At last, after much messing around, I finally got it working, and have come to share how I did that in case anyone else wants to do it too. Go to Features > Terminal / Shell and change Application to "Custom." Copy and paste this AppleScript into the box that shows up under the Application dropdown. That's all it takes! It took me about an hour and a half to make that work properly. I could easily get it to run a command, but not with the directory set to ~, the .bashrc file loaded, and then keep the window open after finishing the command. All of these things were important to me, so after much tinkering, I made it work. Note: this only works, of course, if you are using bash. If this is not the case, you can likely copy and modify my script and RTFM.
  3. itermocil seems like a great match for an alfred workflow, I'm wondering if anyone is working on putting together a workflow for it? Something like listing the different layouts and triggering them on enter.
  4. I'm trying to install this chrome history workflow (https://github.com/tupton/alfred-chrome-history), but I'm not versed in terminal or coding at all. Can anyone further dumb-down the FROM SOURCE section of this repo for me to understand? Much appreciated.
  5. Alfred - Terminal and iTerm2 Control Workflow Works with Alfred 3 Quick Start: Download Here (Alfred 2 users, the last compatible version was Terminal Control 2.2, still available here) An Alfred workflow for controlling aspects of Apple's Terminal Utility and iTerm2. Designed specifically for developers and admins who spend a lot of time in terminals at the command line. Particularly useful for those who manage multiple tabs and use varied Profiles (color themes) for Terminal/iTerm2 windows. New Terminals The keyword trigger term (or iterm) will bring up a list of Profiles (themes/skins) based on Terminal preferences. Continue typing to select one. Modifier keys: Shift: launch this Profile in a new tab Command: change the active Terminal tab to this Profile Merge and Split Terminal only: Keyword trigger term move will separate the current tab into its own window. Terminal only: Keyword trigger term merge will merge all open Terminal windows into one tabbed set. iTerm Only: Keyword trigger *iterm arrange* will call iTerm's "arrange all windows horizontally" window helper. Terminal to a Directory Keyword trigger term dir (or iterm dir), followed by a directory search phrase will launch the default Terminal profile, and automatically change to the selected directory. Why Do I Want This? I spend a lot of time connected to various processes, machines, networks, running screen/tmux sessions, etc. From my personal experience (read: typing the wrong command into an ssh session of a production machine and taking down large consumer web properties in the process), I've built a habit of always color-coding my terminal windows. White on black for local OSX terminal. Green on black for local virtual machines, green background for testing networks, and RED background for production machines (a constant reminder to be careful what I type). This alfred workflow allows me to launch terminal themes, and also change a terminal tab quickly to a new theme if I repurpose it for a new task. Install Notes Download the compiled workflow directly, or visit the repository for the full source code This is my very first workflow, so I'd appreciated feedback on the installation process. In theory, I've bundled all the necessary ruby gems in the workflow package proper, so it should be a simple double-click install. If you do need to install manually, please let me know. Hints are in the developer notes. You will need to allow accessibility support for Alfred. This should be prompted automatically. But since Mavericks, this happens in a new place, in the security and privacy system preferences area. Enable it as shown here if you get stuck: Thanks to Bryan McKelvey for the simple Alfredo Ruby Gem Thanks to phyllisstein for Alleyoop Thanks to Quentin Stafford-Fraser for inspiration and approach in his dedicated iTerm2 Profiles workflow Release Notes v1.0 (May 6, 2013) - Initial release v1.1 (May 10, 2013) - Support for Alleyoop workflow updater v2.0 (May 12, 2013) - Added control for popular alternative iTerm2 terminal emulator v2.1 (Nov 7, 2013) - Included bundled gems for ruby 2.0.0 for Mavericks OS X 10.9 Support v2.2 (Nov 21, 2014) - Improved UI scripting dialog to conform with 10.9+ privacy behaviors v2.3 (Jun 23, 2016) - Support for iTerm2 version 3.0.0+ to accommodate their new AppleScript dictionaries, dropped support for Alfred 2.x v2.4 (Oct 15, 2017) - Included bundled gems for ruby 2.3.0 for macOS High Sierra 10.13 Support v2.5 (Sep 29, 2018) - Support for macOS Mojave 10.14 Feedback Wanted: I'd love to hear feedback. Are you using this workflow? How? What improvements would you like?
  6. Hello, I am attempting to create a workflow that allows me to turn on the built in TFTP server in Mac OS, followed (or before) opening a particular finder window and the creating of a file. The commands need to be; To launch the daemon run the following commands: sudo launchctl load -F /System/Library/LaunchDaemons/tftp.plist sudo launchctl start com.apple.tftpd Be sure Read/Write/eXecute permissions are set on the tftpboot folder and any files you wish to transfer: sudo chmod 777 /private/tftpboot sudo chmod 777 /private/tftpboot/* If you’ll be transferring a file TO your TFTP server, the file will technically need to exist on the server beforehand so create it with touch. For example: sudo touch /private/tftpboot/running-config sudo chmod 777 /private/tftpboot/running-config I have created (along with the help of a friend) the following workflow. What I would like to do; 1. Is create it so it opens up the finder location first (I can then visibly see the file being created because atm I pre-open the finder window manually). I cannot get this piece to work. 2. Include all of the terminal commands into just on window, with a "sleep x" in between the command lines, and then it auto close that window (I found this, its a preference in terminal rather than a cmd). 3. Close terminal totally. i.e. The entire program. I can share the created workflow, but you will need to replace the "1" in the commands with your Mac PW. Just trying to workout how to do the upload of a workflow.... Many, many thanks for any help or advice you can offer.
  7. christian_alares

    Change default Terminal to Hyper.is ?

    Hi! I just discovered this terminal application: https://hyper.is/ I find it appealing and I would like to change the default Alfred behaviour to this app. For example when I browse för files in Alfred and press "Open Terminal Here". This seems to be editable in settings but I'm not sure what to write in the AppleScript section. See this little video to understand more what I want to achieve:
  8. Virgilius Haufniensis

    Vim+iTerm workflow

    Hey everybody! I am working on this workflow where I have a file filter with the most important text files (for me, at least) to open with vim in iTerm. Currently I have it configured so that I can choose to just run vim and get a new document or I can choose to run "v $SOMEFILE" in Alfred to make it open that way. It's super cool, I've used https://github.com/stuartcryan/custom-iterm-applescripts-for-alfred/ and Macvimtoolbox as inspiration for this. There is one bug, however. When the active iTerm window is not just showing a prompt but engaged, then the script doesn't open a new windows but just pastes the "nvim /path/to/file" into the window. I'd like to configure the Apple-script to just open a new window in that case. How do I do that? The code I'm using is here, btw: on alfred_script(q) my runIniTerm( "nvim " & q & "" ) end alfred_script -- This is v0.5 of the custom script for AlfredApp for iTerm 2.9+ -- Please see https://github.com/stuartcryan/custom-iterm-applescripts-for-alfred/ -- for the latest changes. on is_running(app_name) tell application "System Events" to (name of processes) contains app_name end is_running -- Please note, if you store the iTerm binary in any other location than the Applications Folder -- please ensure you update the two locations below (in the format of : rather than / for folder dividers) -- this gets around issues with AppleScript not handling things well if you have two iTerm binaries on your system... which can happen on runIniTerm(q) if is_running("iTerm2") or is_running("iTerm") then run script " on run {q} tell application \":Applications:iTerm.app\" activate try select first window set onlywindow to true on error create window with default profile select first window set onlywindow to true end try tell the first window if onlywindow is false then create tab with default profile end if tell current session to write text q end tell end tell end run " with parameters {q} else run script " on run {q} tell application \":Applications:iTerm.app\" activate try select first window on error create window with default profile select first window end try tell the first window tell current session to write text q end tell end tell end run " with parameters {q} end if end runIniTerm The workflow can be found here: https://transfer.sh/Ul5L3/Open-files-with-Vim.alfredworkflow
  9. This workflow will take the focused/front Finder window and create a temporary Python Server at that location, using `python -m SimpleHTTPServer`. Function will also open the default web server URL ( in the default browser when the python server has started. This is an extremely handy way to quickly test code in a server environment, especially when working with cross-domain functionality that will not work from localhost/local file server. Basically allowing you to create an ad-hoc/on-demand web server at any Finder location on your mac. Borrows some of the Terminal Finder functionality from Chris Yip's "Terminal Here" workflow: http://chrisyip.im/ Download: http://cloud.joshuarhoades.com/3O0c1h3P250l
  10. I'm looking to build a Workflow that effectively does a series of things in Terminal. My idea is to trigger the Script with a keyword which triggers action 1 in Terminal. Action 2 would run once Action 1 completes. I haven't been able to find any docs on whether or not that's possible. For example, let's say Action 1 is generating a .tar archive of everything in a directory and Action 2 is moving the .tar to a subdirectory (or something else). Can Alfred know when the first Action is done to kick off the second? (I know I can do the .tar generation and move in one command - that's not what I'm actually doing here, but is just an example of something that came to mind for having Alfred know the first thing's done before doing the second thing.) Hoping it's possible, but I don't think it is.
  11. How do I create a workflow that will pass multiple commands to the terminal with a pause in between? I am trying to simulate the following: Open terminal ssh nuc@ Insert password Press return to submit password I tried the following workflow: keywords to open a terminal and enter ssh nuc@ && sleep 2 && password && yes Alfred ends up entering everything as a single line
  12. I want to be able to launch some zsh/bash commands from the Alfred's bar. I sat the prefix to my likings, selected "Custom", modify the script accordingly. on alfred_script(q) tell application "iTerm" activate do script q end tell end alfred_script But it doesn't work.
  13. alfredstudent

    Modifying Workflow Script

    Hi, So I'm a newbie, but I've managed to install Google assistant using terminal and can access it there. I want to use this alfred workflow http://www.packal.org/workflow/google-assistant to launch Google Assistant in the background but can't get the workflow to talk to python. Currently I have to type " source env/bin/activate and then: python -m googlesamples.assistant.grpc.pushtotalk The way the workflow is originally does not correspond to the steps I take to launch Google Assistant using Terminal. Can someone help me modify the workflow script to allow me to use Alfred to trigger Google Assistant? Many Thanks, Stephan
  14. Hi, have a file action to convert gifs to mp4 using ffmpeg: ffmpeg -f gif -i {query} -pix_fmt yuv420p -c:v libx264 -movflags +faststart -filter:v crop='floor(in_w/2)*2:floor(in_h/2)*2' ~/Desktop/converted_file.mp4 This works perfectly with the terminal command but I want it to run it as a script so it doesn't opens a terminal window. Do I have to change anything? The way it it's not working. Thanks in advance for your help!
  15. Hello, I am trying to run a terminal command "terminus site:list" but keep getting error when trying to use the Run Script action. I've read in other articles it's because the terminal doesn't load the user profile but I can not figure out how to set the $PATH variable in the workflow to make this command accessible. I installed Terminus using composer so I created an alias in my .bash_profile that is "alias composer='php ~/composer.phar'" . I've also listed the rest of my .bash_profile below for reference. How do I get this to work with Run Script? How do I get terminal to load the $PATH variable? export PATH="/usr/local/mysql/bin:~/.composer/vendor/bin:$PATH" alias composer='php ~/composer.phar' Reference Articles: Thanks, Rich
  16. Hey there Alfred Community, Full disclaimer: I am a hopeless newbie when it comes to the topics I'm addressing here, so I apologize in advance for ambiguous vocabulary. Basically, I am trying to use a combination of "File Filter" and "Run Script" to open a server on a specific folder (for development's sake). In Terminal, I would do the following: cd ~/PathToRelevantFolder php -S localhost: (Port) How do I transform this into a workflow such that I can use a file filter to return my folder of interest and provide an additional argument that allows me to specify the port I wish to use for the local host (e.g. 8000, 9090, 3012...). It's the latter half (providing the port argument) that's giving me the most difficulty. My thanks in advance for any help anyone can give me! -Colin
  17. So here's a workflow to open the current Finder window in Terminal or iTerm, depending on what you like to stick with. Also the other way round is possible. ft: open current Finder directory in Terminal tf: open current Terminal directory in Finder fi: open current Finder directory in iTerm if: open current iTerm directory in Finder For Path Finder fans: pt: open current Path Finder directory in Terminal tp: open current Terminal directory in Path Finder pi: open current Path Finder directory in iTerm ip: open current iTerm directory in Path Finder GitHub. Direct Download.
  18. jeremycherfas

    Don't show Terminal

    With the help of answers here I managed to make a workflow that uses Terminal to call a PHP script to delete a file on a remote server, getting the file name from the most recent item in the clipboard. I don't actually need to see the Terminal after the script has completed, but I can't seem to find a way to just run it in the background, or quit Terminal when done. Any suggestions welcome. Thanks
  19. Secure SHell for Alfred 3 Open SSH/SFTP/mosh connections from Alfred with autosuggestions based on SSH config files, /etc/hosts and your history. Features Auto-suggest hostnames from ~/.ssh/* and /etc/hosts (sources can be individually disabled). Remembers usernames, so you don't have to type them in every time. (You can also remove connections from your history or disable it entirely.) Alternate actions: - Open connection with mosh instead of SSH. - Open SFTP connection instead of SSH. - Ping host. Data sources The workflow reads hosts from the following sources (in this order of priority): ~/.ssh/config History (i.e. username + host addresses previously entered by the user) ~/.ssh/known_hosts /etc/hosts /etc/ssh/ssh_config Installation Download from Packal or GitHub releases and double-click the file to install in Alfred. Source code is on GitHub. Usage Keyword is ssh: ssh [<query>] — View and filter known SSH connections. - ↩ or ⌘+<NUM> — Open the connection. - ⇥ — Expand query to selected connection's title. Useful for adding a port number. - ⌘+↩ — Open an SFTP connection instead. - ⌘+⌥ — Open a mosh connection instead. - ⇧+↩ — Ping host. - ^+↩ — Forget connection (if it's from history). Configuration There are several options available in the workflow's configuration sheet. Notably, you can turn off individual autosuggestion sources. Please see the GitHub README for details. Please note: The workflow generates an ssh:// (or sftp://) URL and asks Alfred to open it. Similarly, the ping and mosh features uses Alfred 3's Terminal Command feature. If it's not opening in the right app, it's not the workflow's fault. Licencing & thanks This workflow is released under the MIT Licence. It uses the following libraries and resources: The icon is based on Octicons by Github (SIL Licence). ssh_config (MIT Licence) to parse SSH config files. awgo (MIT Licence) for the workflowy stuff. This workflow started as a port of @isometry's Python SSH workflow to Go as a testbed for awgo. It has since gained some additional features. If you need Alfred 2 support, check out @isometry's workflow. Changelog v0.6.0 — 2016-11-09 - Add in-workflow updates v0.5.0 — 2016-10-31 - Add support for SSH configuration files (~/.ssh/config and /etc/ssh/ssh_config) - Alternate action: open connection with mosh v0.4.0 — 2016-05-27 - Add ability to turn sources of suggestions off #1 v0.3.0 — 2016-05-26 - Alternate action: Open SFTP connection - Alternate action: Ping host - Remember connections with usernames, so you don't have to type the username each time v0.2.0 — 2016-05-23 - First public release
  20. I want to update a directory on my Raspberry PI and I want to use scp for this. I've got a keyword which initiates a Run NSAppleScript action. This applescript launches Terminal and it should enter a command. But it won't open Terminal. on alfred_script(q) tell application "Terminal" do script "scp -r /path/to/folder pi@" activate end tell end alfred_script This Applescript action works flawlessly when used with a normal ssh command like "ssh user@server.com". But it does not work with scp. Any ideas?
  21. Provides both a File Action to run shell commands on selected files/directories and a Keyword to run them on the current directory. It will detect your default shell, and if it’s bash, zsh, tcsh, csh, or fish, it’ll load the appropriate startup files and your aliases. For the File Action, use Alfred to pick what you want to run a command on and choose Run command. Alfred’s main window will appear and you simply type the command you want. For the Keyword, type . followed by a command. A space between the period and the command is not necessary. This will run the command on the active Finder window (e.g. .touch this_file). You can also easily chain commands (.cd Desktop && rm that_file). For commands that would benefit from the files not being at the end (like cp and mv), you can use {} as a placeholder for the files. So if you select some files and want to copy them to ~/Desktop/ you’d type cp {} ~/Desktop/. To get the output of a command as Large Type, actioning it with ⌘↵ instead of ↵. Download | Source
  22. Hey All, Looking for a solution on a very minor annoyance, I usually run a lot of shell commands from Alfred using the > prefix, which is great! Love it! However, when it executes the command it pops open terminal and runs the command and leaves another lingering window around which I find annoying. Does anyone know of a way to force Alfred to close the window it opens after the command is executed? Very rarely do I need the returned command's output. It's usually for firing off quick things like docker pulls, file moves, git commits and such. If I need to do this through an AppleScript I'm open to that as well, just wanted to find some way around my terminal windows popping up everywhere like mushrooms. Thanks!
  23. I'm trying create a workflow to utilize the MacOS Say command. With this command, I'd like to queue up several paragraphs for it to speak and highlight the spoken paragraph. I'm close, but I'm running into issue with the clipboard management. It was my understanding that the /bin/bash scripts can queue commands up in sequence. In which case the below code should execute like this; 1. Copy the query (which in my workflow is the selected text). 2. Open find in Safari 3. Paste the clipboard contents. 4. Say the selected text. It looks like the LAST copied text ends up being pasted, instead of in sequence. The say command adheres to the sequence properly. The other commands do not, what am I missing? screenshot of the workflow is attached. pbcopy < "{query}" osascript -e 'tell application "System Events" to keystroke "f" using command down' osascript -e 'tell application "System Events" to keystroke "v" using command down' say "{query}" -r 250
  24. I love Packal, and I’ve grown to like awm, the CLI tool by Jonathan Wiesel. The response was not exactly overwhelming when Jonathan pushed awm out three years ago. But that was 2014, and since then CLI tools have gotten some traction, and today they are considered sexier than ever (I think). Anyway, I can’t stop dreaming of a version of awm that is ready for the year 2017. As a humble first step, I’ve just finished up three tiny PRs. They do absolutely nothing but remove the gunk from the `npm install` process. But hey, it’s a start! Regards, Claudia
  25. Dear community, I would like the terminal window to close after Alfred executed the terminal command. I tried this as follows: on alfred_script(q) do shell script & q end alfred_script and, on alfred_script(q) tell application "Terminal" activate do script q osascript -e 'tell application "Terminal" to quit' end tell end alfred_script But unfortunatley both ways are not working. Does somebody maybe know a solution, Thanks in advance, Greetings, Rick,