Skip to main content

mr note-type edit

Edit a note type. --id is required; every other flag is optional and only fields explicitly passed are modified (server-side PATCH semantics). Use this command when you need to change the MetaSchema, SectionConfig, or any of the Custom* rendering fields -- there is a --custom-* flag for each template slot, listed with a one-line description of where it renders under mr note-type edit --help. The dedicated edit-name / edit-description commands only touch those two scoped fields. --custom-css is injected as a <style> block on detail and list pages. Use --custom-entity-picker-result and --custom-entity-picker-result-css to edit the picker result content and styles.

Because only explicitly-passed flags are sent, passing a --custom-* flag with an empty string is how a slot is cleared; omitting it leaves the stored value alone. --section-config "" is the exception: an empty section config is ignored rather than stored, so a section config cannot be cleared from the CLI.

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; an empty file clears the slot. Files are read before any HTTP request.

Usage​

mr note-type edit

Examples​

Swap the JSON Schema on note type 1

mr note-type edit --id 1 \
--meta-schema '{"type":"object","properties":{"priority":{"type":"string"}}}'

Update the custom summary template and confirm via list

mr note-type edit --id 1 --custom-summary "<div>{{ Note.Name }}</div>"
mr note-types list --json | jq '.[] | select(.ID == 1).CustomSummary'

Flags​

FlagTypeDefaultDescription
--iduint0Note type ID (required) (required)
--namestring``Note type name
--descriptionstring``Note type description
--meta-schemastring``JSON Schema defining the metadata structure for notes of this type
--section-configstring``JSON controlling which sections are visible on note detail pages
--custom-headerstring``Rendered at the top of the note detail page
--custom-header-cssstring``Global CSS for CustomHeader
--custom-detail-footerstring``Rendered at the bottom of the note detail page, below every built-in section
--custom-detail-footer-cssstring``Global CSS for CustomDetailFooter
--custom-sidebarstring``Rendered in the note detail page sidebar
--custom-sidebar-cssstring``Global CSS for CustomSidebar
--custom-summarystring``Rendered on note cards in list views, below the title
--custom-summary-cssstring``Global CSS for CustomSummary
--custom-avatarstring``Replaces the default avatar on note cards
--custom-avatar-cssstring``Global CSS for CustomAvatar
--custom-hover-cardstring``Rendered in the hover card for a note link; falls back to --custom-summary when unset
--custom-hover-card-cssstring``Global CSS for CustomHoverCard
--custom-panel-summarystring``Rendered on note cards inside another entity's detail page panels instead of --custom-summary; falls back to --custom-summary when unset
--custom-panel-summary-cssstring``Global CSS for CustomPanelSummary
--custom-list-headerstring``Rendered above note list pages filtered to exactly this note type, against the note type itself
--custom-list-header-cssstring``Global CSS for CustomListHeader
--custom-list-footerstring``Rendered below note list pages filtered to exactly this note type, against the note type itself
--custom-list-footer-cssstring``Global CSS for CustomListFooter
--custom-mrql-resultstring``Template for rendering notes of this note type in MRQL results
--custom-mrql-result-cssstring``Global CSS for CustomMRQLResult
--custom-entity-picker-resultstring``Template for note content inside an entity picker result
--custom-entity-picker-result-filestring``Read --custom-entity-picker-result from a UTF-8 file (mutually exclusive with the inline flag)
--custom-entity-picker-result-cssstring``Global CSS for CustomEntityPickerResult
--custom-entity-picker-result-css-filestring``Read --custom-entity-picker-result-css from a UTF-8 file (mutually exclusive with the inline flag)
--custom-cssstring``CSS injected as a <style> block on the note detail page and its list pages

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​

Updated NoteType with ID, Name, Description, MetaSchema, SectionConfig, CustomHeader/DetailFooter/Sidebar/Summary/Avatar/HoverCard/PanelSummary/ListHeader/ListFooter/MRQLResult/EntityPickerResult/EntityPickerResultCSS/CSS, ApplyTemplatesToShares, CreatedAt, UpdatedAt

Exit Codes​

0 on success; 1 on any error

See Also​