Search the shelves
$ grim search payment
Before writing a module, check that nobody has. grim search looks through the modules and themes your GitHub account can see and returns the ones whose name or description contains your word. When you have no word in mind and want to browse, grim list:available shows the same catalogue whole.
Usage
$ grim search payment # modules and themes that mention it
$ grim search bank --type=module # modules only
$ grim search --type=theme-frontend # no word: every frontend theme
$ grim search bank --refresh # fetch the catalogue again firstIt runs from anywhere; no project is needed. You must be logged in with grim auth:login.
Arguments and options
Search grimoiry/grim-* modules and themes available on GitHub
Usage
grim search [-t|--type TYPE] [-r|--refresh] [--] [<query>]Arguments
| Argument | Description |
|---|---|
query |
Free-text query (matched against name and description) (optional) |
Options
| Option | Description |
|---|---|
-t, --type=TYPE |
Filter by type: module, theme-frontend, theme-admin |
-r, --refresh |
Force refresh of the local registry cache |
What it actually does
- Loads the catalogue. From
~/.grim/registry-cache.jsonwhen that file is less than 24 hours old. Otherwise it lists the repositories of thegrimoiryorganisation on GitHub, keeps those namedgrim-*that are packages, and writes the cache. - Filters. The query is matched as one piece of text, ignoring case, against the short name and the description.
--typenarrows tomodule,theme-frontendortheme-admin. - Prints a table: name, type, description cut to 60 characters, and the date of the last push. Below it, the number of matches and the path of the cache file.
The short name is what every other command takes. grim-cart-orders is the module cart-orders; grim-theme-monitor is the frontend theme monitor; grim-theme-admin-float is the admin theme float.
Pitfalls
The query is a phrase, not keywords
grim search "bank transfer" finds only descriptions that contain those two words next to each other. Search for the one word that matters.
A new package does not show for a day
The cache is not refreshed until it is 24 hours old. After a colleague publishes a module, or after you were given access to a private one, pass --refresh.
You are told to log in with a command that does not exist
Not authenticated with GitHub. Run `grim auth login` first. The command is spelled with a colon: grim auth:login.
After it finishes
Read the entry of what you found, then add it to the project.
$ grim module:info cart-orders
$ grim require cart-ordersgrim module:info and grim theme:info show the latest release and the README.
Related spells
grim list:available
Survey the whole catalogue
List every module and theme your account can install, grouped by kind, each with the command that adds it.
grim module:info
Read a module's entry
Show a module's description, latest release, last push and archived status straight from GitHub, with its README on request.
grim theme:info
Read a theme's entry
Show a frontend or admin theme's description, latest release, last push and archived status straight from GitHub, with its README on request.
grim require
Summon a module or theme
Add a module or theme to grim.json, install it with everything it depends on, and rewrite grim.lock, all inside the train the project is on.
grim auth:login
Log grim in to GitHub
Give grim a GitHub token, from your gh login or a personal access token, and hand the same token to Composer and Docker.