All Projects → mhinz → spotlight-cli

mhinz / spotlight-cli

Licence: MIT license
 Command-line tool for Spotlight.

Programming Languages

shell
77523 projects

Projects that are alternatives of or similar to spotlight-cli

Enlighten
💡 An integrated spotlight-based onboarding and help library for macOS, written in Swift.
Stars: ✭ 44 (+62.96%)
Mutual labels:  osx, spotlight
libdigidocpp
Libdigidocpp library offers creating, signing and verification of digitally signed documents, according to XAdES and XML-DSIG standards. Documentation http://open-eid.github.io/libdigidocpp
Stars: ✭ 80 (+196.3%)
Mutual labels:  osx
Mute Me
App is replaced by the new version which called Mutify
Stars: ✭ 249 (+822.22%)
Mutual labels:  osx
sol
MacOS launcher & command palette
Stars: ✭ 1,335 (+4844.44%)
Mutual labels:  spotlight
security-slacker
Pokes users about outstanding security risks found by Crowdstrike Spotlight or vmware Workspace ONE so they secure their own endpoint.
Stars: ✭ 22 (-18.52%)
Mutual labels:  spotlight
pinpoint
Keystroke launcher and productivity tool. macOS Spotlight and Alfred for Windows. Alternative to Wox.
Stars: ✭ 105 (+288.89%)
Mutual labels:  spotlight
Iterm Fish Fisher Osx
Complete guide and Bash script to install Command Line Tools + Homebrew + iTerm2 + Fish Shell + Fisher + Plugins for development purposes
Stars: ✭ 249 (+822.22%)
Mutual labels:  osx
osx-callhistory-decryptor
macOS (incl big sur) call history decryptor/converter to CSV format.
Stars: ✭ 19 (-29.63%)
Mutual labels:  osx
Spotlight
Introductory walkthrough framework for iOS Apps
Stars: ✭ 45 (+66.67%)
Mutual labels:  spotlight
QuickWebKit
A great & strong plugin based WebViewController. 一款基于插件的 WebView 视图控制器,您可以基于它设计您的浏览器插件,然后像积木一样来组装它们。
Stars: ✭ 29 (+7.41%)
Mutual labels:  spotlight
NLP-and-Data-Science-Spotlights
Regular spotlights of underrated NLP and Data Science GitHub repositories
Stars: ✭ 34 (+25.93%)
Mutual labels:  spotlight
KatSearch
Fast, simple, powerful filesystem search for macOS, just like the good ol' days.
Stars: ✭ 86 (+218.52%)
Mutual labels:  spotlight
ManOpen
A macOS GUI application for viewing Unix manual pages.
Stars: ✭ 18 (-33.33%)
Mutual labels:  osx
spotlight-never-index
Exclude some folders from Spotlight.app
Stars: ✭ 21 (-22.22%)
Mutual labels:  spotlight
osx-statusbar-countdown
⏳📅 A utility to count down to a date from your macOS menubar, written in Swift
Stars: ✭ 40 (+48.15%)
Mutual labels:  osx
Mosaic
Mosaic, an openFrameworks based Visual Patching Creative-Coding Platform
Stars: ✭ 250 (+825.93%)
Mutual labels:  osx
react-native-spotlight-search
A React Native module for iOS that provides Spotlight search functionality.
Stars: ✭ 118 (+337.04%)
Mutual labels:  spotlight
zazu
🚀 A fully extensible and open source launcher for hackers, creators and dabblers.
Stars: ✭ 2,078 (+7596.3%)
Mutual labels:  spotlight
MacForensics
Scripts to process macOS forensic artifacts
Stars: ✭ 118 (+337.04%)
Mutual labels:  osx
osx-cli
A collection of command line shortcuts for common OS X operations.
Stars: ✭ 21 (-22.22%)
Mutual labels:  osx
$ spot
 Spotlight CLI.

If a command takes a [path], the results will be restricted to that directory.

apps                      Installed applications.
attr                      Attributes that can be used with "spot <query>".
author <query> [path]     Files from author.
ext <query> [path]        Any files with that extension.
                          $ spot ext pdf ~
file <query> [path]       Find files.
                          $ spot file vimrc ~/dotfiles
group <group|gid> [path]  All files from user.
                          $ spot group $GID /etc
size <rel> <size> [path]  Find all files of a certain size in bytes.
                          Or (k)ilobytes, (m)egabytes, (g)igabytes.
                          $ spot size '>=' 1g ~
text <query> [path]       Find files containing text.
                          $ spot text 'ascii porn' ~
user <user|uid> [path]    All files from user.
                          $ spot user $UID /var

<path>                    Get all attributes for that path.
                          $ spot ~/fancy.gif
<query> [path]            Generic query. Supports any attributes from "spot attr".
                          See link at the bottom for the syntax.
                          $ spot foo
                          $ spot 'kMDItemMusicalGenre == *Metal*' /data/music

The Spotlight query syntax explained:
https://developer.apple.com/library/mac/documentation/Carbon/Conceptual/SpotlightQuery/Concepts/QueryFormat.html

It's also fiendishly easy to add new commands to spot. For adding a command "music", simply add an executable shell script called "spot-music" to your $PATH:

#!/usr/bin/env bash

# The following line is optional and outputs a small reminder,
# if not enough arguments were given to the "music" command.
required $# '<genre>'

mdfind "kMDItemMusicalGenre == $1"

Using this, you can simply list all songs of a certain genre:

$ spot music Metal
$ spot music "Alpine folk music"

You could also change spot-music to take a second optional argument, to restrict the matches to a certain directory:

#!/usr/bin/env bash

required $# '<genre>'

genre=$1
dir=$2

mdfind "kMDItemMusicalGenre == $genre" ${dir:+ -onlyin "$dir"}

Now, you can also use it like this:

$ spot music Metal ~/music
Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].