mr tag create
Create a new tag. --name is required; --description is optional
free-form text. Creating with a name that already exists is idempotent:
it returns the existing tag rather than failing. A --description
passed with an existing name is ignored; use tag edit-description to
change it. On success prints a confirmation line with the ID; pass the
global --json flag to emit the full record for scripting (e.g.,
piping the ID into follow-up commands).
Usage
mr tag create
Examples
Create a tag with just a name
mr tag create --name "urgent"
Create with a description and capture the ID via jq
ID=$(mr tag create --name "archived" --description "archived items" --json | jq -r .ID)
Flags
| Flag | Type | Default | Description |
|---|---|---|---|
--name | string | `` | Tag name (required) (required) |
--description | string | `` | Tag description |
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 Tag object with ID (uint), Name (string), Description (string), CreatedAt, UpdatedAt
Exit Codes
0 on success; 1 on any error