creep

Crawls metadata in files and directories

creep

crawls metadata in files and directories.

$ creep "'microscopic' in tags or 'rainbows' in tags"  
a.md
b.js
# npm install -g creep 

add front matters to the files you want to be searchable:

a.md:

---
tags:
  - rainbows
  - earthworms
---
 
# there are rainbows
and earthworms

b.js:

// --- 
// tags: 
//   - microscopic 
//   - hummingbirds 
// --- 
 
console.log('and microscopic hummingbirds');

then just query the metadata:

$ creep "'microscopic' in tags or 'rainbows' in tags"  
a.md
b.js

creep uses coffeescript as the query language, but alternatives can be plugged in. lodash is available in queries as _.

creep looks for the first of the following metadata files in the directories it crawls, recursively merging the metadata into child directory and file metadata:

  • .creep.yml
  • .creep.yaml
  • creep.yml
  • creep.yaml
  • .creep.json
  • creep.json

creep's uses the config defaults given in creep.config, then merges these defaults with the first of these configs that it finds:

  • ./.creeprc.yml
  • ./.creeprc.yaml
  • ./.creeprc.json
  • $HOME/.creeprc.yml
  • $HOME/.creeprc.yaml
  • $HOME/.creeprc.json