mr category create
Create a new Category. --name is required; --description is optional
free-form text. A --custom-* flag exists for every category template
slot -- the detail page header, sidebar and footer, the list card summary,
the summary on cards inside other detail pages' panels, avatar and hover card, the list page header and footer, the Own Entities
section body, MRQL result cards, entity picker results, and the CSS that styles them.
--custom-entity-picker-result sets picker result content and
--custom-entity-picker-result-css sets its companion stylesheet; the host keeps
ownership of selection controls. Each takes
an HTML or template string applied to Groups in this category, except
--custom-css, which is injected as a <style> block on detail and list
pages. Run mr category create --help for the full list with a one-line
description of where each renders. --meta-schema and
--section-config take JSON strings
controlling structured metadata and which sections render on group
detail pages. On success prints a confirmation line with the new ID;
pass the global --json flag to emit the full record for scripting.
Use --custom-entity-picker-result-file and
--custom-entity-picker-result-css-file for UTF-8 file input. Each is mutually
exclusive with its corresponding inline flag. Use category edit --id to
update or clear slots later without changing the carrier's identity.
Usage
mr category create
Examples
Create a category with just a name
mr category create --name "Project"
Create with a description and capture the ID via jq
ID=$(mr category create --name "Location" --description "Places you know about" --json | jq -r .ID)
Flags
| Flag | Type | Default | Description |
|---|---|---|---|
--name | string | `` | Category name (required) (required) |
--description | string | `` | Category description |
--meta-schema | string | `` | Meta schema JSON |
--section-config | string | `` | JSON controlling which sections are visible on group detail pages for this category |
--custom-header | string | `` | Rendered at the top of the group detail page |
--custom-header-css | string | `` | Global CSS for CustomHeader |
--custom-detail-footer | string | `` | Rendered at the bottom of the group detail page, below every built-in section |
--custom-detail-footer-css | string | `` | Global CSS for CustomDetailFooter |
--custom-sidebar | string | `` | Rendered in the group detail page sidebar |
--custom-sidebar-css | string | `` | Global CSS for CustomSidebar |
--custom-summary | string | `` | Rendered on group cards in list views, below the title |
--custom-summary-css | string | `` | Global CSS for CustomSummary |
--custom-avatar | string | `` | Replaces the default avatar on group cards |
--custom-avatar-css | string | `` | Global CSS for CustomAvatar |
--custom-hover-card | string | `` | Rendered in the hover card for a group link; falls back to --custom-summary when unset |
--custom-hover-card-css | string | `` | Global CSS for CustomHoverCard |
--custom-panel-summary | string | `` | Rendered on group cards inside another entity's detail page panels instead of --custom-summary; falls back to --custom-summary when unset |
--custom-panel-summary-css | string | `` | Global CSS for CustomPanelSummary |
--custom-list-header | string | `` | Rendered above group list pages filtered to exactly this category, against the category itself |
--custom-list-header-css | string | `` | Global CSS for CustomListHeader |
--custom-list-footer | string | `` | Rendered below group list pages filtered to exactly this category, against the category itself |
--custom-list-footer-css | string | `` | Global CSS for CustomListFooter |
--custom-mrql-result | string | `` | Template for rendering groups of this category in MRQL results |
--custom-mrql-result-css | string | `` | Global CSS for CustomMRQLResult |
--custom-entity-picker-result | string | `` | Template for group content inside an entity picker result |
--custom-entity-picker-result-file | string | `` | Read --custom-entity-picker-result from a UTF-8 file (mutually exclusive with the inline flag) |
--custom-entity-picker-result-css | string | `` | Global CSS for CustomEntityPickerResult |
--custom-entity-picker-result-css-file | string | `` | Read --custom-entity-picker-result-css from a UTF-8 file (mutually exclusive with the inline flag) |
--custom-css | string | `` | CSS injected as a <style> block on the group detail page and its list pages |
--custom-own-entities | string | `` | Replaces the body of the group detail page's Own Entities section |
--custom-own-entities-css | string | `` | Global CSS for CustomOwnEntities |
Inherited global flags
| Flag | Type | Default | Description |
|---|---|---|---|
--json | bool | false | Output raw JSON |
--no-header | bool | false | Omit table headers |
--page | int | 1 | Page number for list commands (default page size: 50) |
--quiet | bool | false | Only output IDs |
--server | string | http://localhost:8181 | mahresources server URL (env: MAHRESOURCES_URL) |
Output
Created Category object with ID (uint), Name (string), Description (string), MetaSchema, sectionConfig, CustomHeader/DetailFooter/Sidebar/Summary/Avatar/HoverCard/PanelSummary/OwnEntities/ListHeader/ListFooter/MRQLResult/EntityPickerResult/EntityPickerResultCSS/CSS, CreatedAt, UpdatedAt
Exit Codes
0 on success; 1 on any error