Survey the whole catalogue
$ grim list:available --type=module
A new project and no idea yet what exists, or a new colleague asking what there is to build with. grim list:available prints the whole catalogue in one go. When you already have a word to look for, grim search is quicker.
Usage
$ grim list:available # everything, in three groups
$ grim list:available --type=module # modules only
$ grim list:available --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
List all grimoiry/grim-* modules and themes available on GitHub
Usage
grim list:available [-t|--type TYPE] [-r|--refresh] [--include-archived]Options
| Option | Description |
|---|---|
-t, --type=TYPE |
Filter by type: module, theme-frontend, theme-admin |
-r, --refresh |
Force refresh of the local registry cache |
--include-archived |
Include archived packages |
What it actually does
- Loads the catalogue, the same one
grim searchuses:~/.grim/registry-cache.jsonwhen it is less than 24 hours old, GitHub otherwise. - Groups it.
Modules,Frontend themesandAdmin themes, each heading with a count. - Prints a table per group: name, description cut to 60 characters, and the install command, for example
grim require cartorgrim require --frontend monitor. The last line gives the total and the path of the cache file.
Pitfalls
An empty list is about access, not about the catalogue
No packages found. comes with its likely causes. The usual one: your token is not a member of the organisation or a collaborator on its repositories, so GitHub shows it nothing. Ask a maintainer for access, then run it with --refresh. An empty result is never cached.
--include-archived adds nothing
Archived repositories are dropped when the catalogue is fetched, before it reaches the cache, so there is nothing left for the flag to include. To check one package you suspect is archived, grim module:info reads it from GitHub directly and says Archived: yes.
After it finishes
Copy the install command from the last column into a project. The list says what exists, not what fits your train: grim require picks the version, and skips a theme that has no release on the project's train.
Related spells
grim search
Search the shelves
Find modules and themes in the catalogue by a word in their name or description, before you build one again.
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.