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; the dedicated edit-name / edit-description commands only touch those two scoped fields.

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
--custom-headerstring``Custom header HTML
--custom-sidebarstring``Custom sidebar HTML
--custom-summarystring``Custom summary HTML
--custom-avatarstring``Custom avatar HTML
--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-mrql-resultstring``Pongo2 template for rendering notes of this type in MRQL results

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/Sidebar/Summary/Avatar/MRQLResult, CreatedAt, UpdatedAt

Exit Codes

0 on success; 1 on any error

See Also