Skip to main content

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, avatar and hover card, the list page header and footer, the Own Entities section body, MRQL result cards, and the CSS that styles them. 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.

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

FlagTypeDefaultDescription
--namestring``Category name (required) (required)
--descriptionstring``Category description
--meta-schemastring``Meta schema JSON
--section-configstring``JSON controlling which sections are visible on group detail pages for this category
--custom-headerstring``Rendered at the top of the group detail page
--custom-detail-footerstring``Rendered at the bottom of the group detail page, below every built-in section
--custom-sidebarstring``Rendered in the group detail page sidebar
--custom-summarystring``Rendered on group cards in list views, below the title
--custom-avatarstring``Replaces the default avatar on group cards
--custom-hover-cardstring``Rendered in the hover card for a group link; falls back to --custom-summary when unset
--custom-list-headerstring``Rendered above group list pages filtered to exactly this category, against the category itself
--custom-list-footerstring``Rendered below group list pages filtered to exactly this category, against the category itself
--custom-mrql-resultstring``Template for rendering groups of this category in MRQL results
--custom-cssstring``CSS injected as a <style> block on the group detail page and its list pages
--custom-own-entitiesstring``Replaces the body of the group detail page's Own Entities section

Inherited global flags

FlagTypeDefaultDescription
--jsonboolfalseOutput raw JSON
--no-headerboolfalseOmit table headers
--pageint1Page number for list commands (default page size: 50)
--quietboolfalseOnly output IDs
--serverstringhttp://localhost:8181mahresources server URL (env: MAHRESOURCES_URL)

Output

Created Category object with ID (uint), Name (string), Description (string), MetaSchema, sectionConfig, CustomHeader/DetailFooter/Sidebar/Summary/Avatar/HoverCard/OwnEntities/ListHeader/ListFooter/MRQLResult/CSS, CreatedAt, UpdatedAt

Exit Codes

0 on success; 1 on any error

See Also