| Internet-Draft | CLI Gclifixes | March 2026 |
| Fragkos | Expires 16 September 2026 | [Page] |
Command-line interface (CLI) tools frequently emit status, diagnostic, and progress messages that in some cases are prefixed with short ASCII tokens containing anything from any printable characters (e.g. !, i, +, etc.), abbreviations (e.g. DEL, INS, etc.), to short verbal descriptors (e.g. "INFO:", "DELETE", "ALERT", etc.). Despite their ubiquity, use, and convenience, no standard defines these tokens or their semantics. This document proposes a machine-parseable, human-readable vocabulary of 3-character ASCII prefixes -- collectively referred to as "gclifixes" -- enclosed in square brackets [ ] for events and curly braces { } for context metadata. The goal is to enable consistent interpretation across CLI tools, log aggregators, CI/CD pipelines, IDE integrations, and most importantly for any AI-generated code the adoption of this standard will streamline how these are used and provides additional meaning to any prompt message and log file without additional effort.¶
This Internet-Draft is submitted in full conformance with the provisions of BCP 78 and BCP 79.¶
Internet-Drafts are working documents of the Internet Engineering Task Force (IETF). Note that other groups may also distribute working documents as Internet-Drafts. The list of current Internet-Drafts is at https://datatracker.ietf.org/drafts/current/.¶
Internet-Drafts are draft documents valid for a maximum of six months and may be updated, replaced, or obsoleted by other documents at any time. It is inappropriate to use Internet-Drafts as reference material or to cite them other than as "work in progress."¶
This Internet-Draft will expire on 16 September 2026.¶
Copyright (c) 2026 IETF Trust and the persons identified as the document authors. All rights reserved.¶
This document is subject to BCP 78 and the IETF Trust's Legal Provisions Relating to IETF Documents (https://trustee.ietf.org/license-info) in effect on the date of publication of this document. Please review these documents carefully, as they describe your rights and restrictions with respect to this document. Code Components extracted from this document must include Revised BSD License text as described in Section 4.e of the Trust Legal Provisions and are provided without warranty as described in the Revised BSD License.¶
CLI tools across every operating system and programming ecosystem emit human-readable messages during execution. Developers, system administrators, and automated pipelines rely on these messages for monitoring, debugging, and auditing. A de facto convention has emerged whereby a short ASCII token in square brackets precedes the message text to indicate its category:¶
[+] User created successfully [!] Certificate expires in 3 days [x] FATAL: Cannot open database¶
Despite the widespread adoption of such pattern among other similar forms of visually contextualizing the displayed messages, no formal specification exists. The consequences include:¶
Inconsistent semantics: one tool uses [*] for errors while another uses it for progress. The same symbol carries different meanings across different tools, making log aggregation and automated parsing unreliable.¶
Parser fragility: log analysis tools, CI/CD dashboards, and IDE integrations must implement per-tool heuristics to interpret prefix meanings, leading to brittle integrations that break when tools update their output format.¶
AI code generation ambiguity: large language models generating CLI tool code have no authoritative reference for which prefix to use for which condition, resulting in inconsistent output conventions across generated code.¶
No straightforward human-readable log context: irrespective of the presence of logs, different messages can be interpreted in different ways. In larger implementations there are log entries that may have log IDs which are product specific and require significant effort to utilize. Such numeric log IDs can be extremely difficult to be read by humans or to parse fast for any context-related log messages. The use of 3-character standardized prefixes (gclifixes) provides the necessary context for each log entry, and enables extremely fast adoption.¶
Existing logging frameworks (syslog [RFC5424], Log4j, Python logging) define severity levels but not the broader vocabulary of operational semantics (data flow, process lifecycle, concurrency, security context) that CLI output routinely conveys. This specification fills that gap at the presentation layer, following the approach taken by [RFC9116] which similarly standardized a previously ad-hoc convention (security.txt) into a machine-parseable format.¶
This document defines a vocabulary of ASCII-based 3-character prefixes (gclifixes) for use in CLI output messages and structured log lines. It covers:¶
This specification does NOT define log transport protocols, structured logging wire formats (e.g., JSON, CBOR), or log storage schemas. It is a presentation-layer convention that can be adopted independently of the underlying infrastructure.¶
The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", "SHOULD", "SHOULD NOT", "RECOMMENDED", "NOT RECOMMENDED", "MAY", and "OPTIONAL" in this document are to be interpreted as described in BCP 14 [RFC2119] [RFC8174] when, and only when, they appear in all capitals, as shown here.¶
The following terms are used throughout this document:¶
A gclifix token is exactly 3 characters long and conforms to one of two patterns:¶
Event Prefix: "[" <char> "]"
Context Prefix: "{" <char> "}"
¶
Where <char> is a single ASCII character from the assigned registry (Sections 3 and 4). The character MUST be drawn from the printable ASCII range (0x21-0x7E) excluding the bracket characters themselves.¶
A gclifix token MUST be followed by at least one space (0x20) before the next token or the message body. A line MUST contain at most one event gclifix. The event gclifix MUST appear as the first (leftmost) prefix on the line. A line MAY contain zero or more context gclifixes, all of which MUST follow the event gclifix.¶
This specification defines two complementary layers of meaning:¶
Square Brackets [ ] -- Event Tier: Describes WHAT happened. Every prefixed output line SHOULD contain exactly one event gclifix. The event gclifix is the primary semantic marker and MUST appear at the start of the prefix sequence (leftmost position, character 0). This fixed position ensures that the event type is always visually aligned across all log lines regardless of how many context gclifixes follow.¶
Curly Braces { } -- Context Tier: Describes the CONDITIONS under which the event occurred (who, where, under what privilege, in what scope, at what time). Context gclifixes are OPTIONAL. When present, they MUST follow the event gclifix. Multiple context gclifixes MAY be chained.¶
This design ensures that a human scanning a log file always finds the event type at a fixed column position. The context tier is supplementary metadata that enriches the line without displacing the primary signal. Emitters can start with the simpler event-only form and progressively adopt context gclifixes as their needs grow, without affecting the visual alignment of existing output. In addition, the context tier minimizes the need for extended log entry descriptors while at the same time, parsers (especially AI-powered) can build a much clearer and precise understanding of the logs without having to necessarily cross-reference additional log sources to tell the full story of who did what, when, and how.¶
A fully composed prefixed line has the following structure:¶
line = event-prefix SP *( context-prefix SP )
message-body
event-prefix = "[" evt-char "]"
context-prefix = "{" ctx-char [ ":" qualifier ] "}"
qualifier = 1*( ALPHA / DIGIT / "-" / "_" / "." )
¶
The event gclifix MUST appear first. When multiple context gclifixes follow, they SHOULD be ordered from broadest scope to narrowest. The RECOMMENDED ordering is:¶
Severity > Timestamp > Identity > Environment > Namespace > Execution Mode > Network¶
Example of a fully composed line:¶
[~] {3} {t:2025-03-14T08:12:33Z} {$:worker-7}
{e:prod} {&} Failover to replica-3 OK
¶
Example comparison demonstrating the visual alignment benefit of event-first ordering:¶
[+] {e:prod} User created successfully
[x] {#} {e:prod} Database corruption detected
[i] Module loaded
[~] {@:ssh} Connection retry succeeded
[;] {t:08:12:33Z} {$:worker-7} {&} Job #412 done
¶
Note how the [ ] column remains aligned at position 0 regardless of whether context gclifixes are present or absent. This fixed-position design makes visual scanning, grep filtering, and column-based log parsing trivial.¶
This specification defines the initial gclifix registry. Additional prefix characters MAY be registered via the IANA process defined in Section 9. Any unrecognised gclifix character encountered by a consumer MUST be treated as informational and MUST NOT cause a parsing failure. In general, implementors should "be conservative in what you do, be liberal in what you accept from others" (Postel's Law, as per [RFC9293]).¶
This section defines all assigned event gclifix characters. Each entry specifies the character, its core meaning, and a brief description of its intended use.¶
The following lowercase letters are assigned as event gclifixes for specific operational verbs. All alphabetic gclifixes use lowercase to avoid collision with uppercase conventions in existing logging frameworks (e.g., "[E]" for ERROR). Letters "i", "o", "v", and "x" are assigned as symbol gclifixes (Section 3) and are NOT available as alphabetic gclifixes.¶
Numeric characters serve as context-dependent markers for priority levels, selection indices, or reference footnotes.¶
Context determines interpretation: in a severity context, [1] means critical (high priority) while [9] means least critical (lowest priority).¶
The following characters are explicitly RESERVED and MUST NOT be assigned semantic meaning:¶
[/] RESERVED -- The forward slash conflicts with Unix path separators, regex delimiters, URL path separators, and division operators. Causes parser ambiguity in JSON, shell, and regex contexts.¶
[\] RESERVED -- The backslash is the universal escape character in C, Python, Java, JSON, and shell. It is also the Windows path separator. Requires double-escaping ([\\]) in JSON, making it fragile and parser-hostile.¶
['] RESERVED -- The single quote (apostrophe) is a string delimiter in shell, SQL, YAML, and many programming languages. Log lines containing ['] that are embedded in single-quoted contexts (shell variables, heredocs, SQL queries) would require escaping, creating avoidable fragility.¶
["] RESERVED -- The double quote is a string delimiter in JSON, C, Python, Java, JavaScript, shell, and CSV. A log line containing ["] embedded in a JSON field requires the quote to be escaped as [\"], which then interacts with the backslash problem. In CSV exports, ["] requires double-escaping as [""]. High risk of escaping chain reactions across multiple formats.¶
[,] RESERVED -- The comma is the field delimiter in CSV, which is a common log export format. While [,] is safe in JSON and shell contexts, its presence in log lines would require additional quoting logic in any CSV-based pipeline, adding unnecessary complexity. The continuation semantics it might convey are already served by [+] (adding context to the current state).¶
Rationale: any semantic meaning these characters could convey is already served by other assigned gclifixes. The risk of parser corruption, double-escaping bugs, and cross-platform inconsistencies far outweighs any potential benefit. Implementations encountering these prefixes in input SHOULD treat them as unrecognised informational tokens.¶
Context gclifixes provide machine-parseable metadata about the conditions under which an event occurred. They are enclosed in curly braces to visually and syntactically distinguish them from event gclifixes. Context gclifixes always appear AFTER the event gclifix on a line.¶
Context gclifixes MAY include an inline qualifier separated by a colon:¶
context-prefix = "{" ctx-char [ ":" qualifier ] "}"
qualifier = 1*( ALPHA / DIGIT / "-" / "_" / "." / ":" )
¶
Examples:¶
{$:svc_backup} ; user identity
{e:production} ; environment name
{@:ssh} ; network protocol
{n:us-east-1} ; namespace/region
{t:2025-03-14T08:12:33Z} ; ISO 8601 timestamp
{t:+4.2s} ; relative elapsed time
¶
The following ABNF grammar (as per [RFC5234]) defines the syntax of a prefixed log line:¶
prefixed-line = event-prefix SP
*( context-prefix SP )
message
event-prefix = "[" evt-char "]"
context-prefix = "{" ctx-char [ ":" qualifier ] "}"
evt-char = ALPHA / DIGIT / "!" / "+" / "-" / "~" /
"<" / ">" / "^" / "#" / "$" / "&" / "*" /
"%" / "@" / "|" / "?" / ":" / ";" / "=" /
"." / "o" / "_"
ctx-char = ALPHA / DIGIT / "#" / "$" / "&" / "@" /
"_"
qualifier = 1*( ALPHA / DIGIT / "-" / "_" / "." / ":" )
message = *VCHAR
SP = %x20
¶
The characters "/" (0x2F), "\" (0x5C), "'" (0x27), '"' (0x22), and "," (0x2C) are explicitly excluded from both evt-char and ctx-char.¶
The simplest form uses only event gclifixes. This is RECOMMENDED as the minimum adoption level for any CLI tool:¶
[:] === Build started === [i] Using toolchain gcc 13.2.0 [<] Reading source from ./src/ [o] Scanning dependencies... [+] All dependencies resolved [*] Compiling 43 modules... [%] 22 of 43 modules compiled [~] Warning in util.c:87 - implicit cast [+] Compilation complete [>] Wrote binary to ./build/app [t] Total build time: 4m 12s [;] === Build finished === [.] Build tool exiting. Exit code: 0¶
Production-grade logging. Note that the [ ] event gclifix is always at position 0, providing consistent visual alignment:¶
[:] {t:2025-03-14T08:00:00Z} {e:prod} {$:deploy}
Deployment pipeline started
[u] {t:2025-03-14T08:00:03Z} {e:prod} {$:deploy} {#}
nginx 1.25.3 -> 1.26.0
[^] {t:2025-03-14T08:00:15Z} {e:prod} {@:ssh}
Uploading artefact to CDN
[~] {3} {t:2025-03-14T08:00:22Z} {e:prod}
Health check timeout - retrying
[h] {t:2025-03-14T08:00:28Z} {e:prod} {$:deploy}
Health: API ok | DB ok | Cache ok
[;] {t:2025-03-14T08:00:30Z} {e:prod} {$:deploy}
Deployment complete (30s)
¶
[i] Welcome to DataSync v3.2.0 [e] Profile loaded: production-us-east [?] Sync direction? [1] Push [2] Pull [3] Bidi [i] User selected: [1] Push [b] Snapshot: sync_pre_20250314_080000 [c] Encrypting payload with AES-256-GCM... [@] Connecting to sync.example.com:443 (TLS 1.3) [^] Uploading 2,847 records (14.2 MB)... [%] 67% complete (1,907 / 2,847 records) [_] Skipped field: SSN=***-**-**** (PII masked) [+] Sync complete: 2,847 pushed, 0 conflicts [s] Audit log saved to /var/log/datasync/audit.log [.] DataSync finished. Uptime: 0h 2m 14s¶
[:] {t:08:00:00} {j} Pipeline #3847 (main, a1b2c3d)
[<] {t:08:00:02} {j} Checking out repository...
[q] {t:08:00:05} {j} SELECT version -> v42
[m] {t:08:00:06} {j} Migration 0043_add_user_index
[+] {t:08:00:08} {j} Migration applied (1.8s)
[*] {t:08:01:30} {j} Running test suite (847 tests)
[~] {t:08:03:45} {j} flaky_network_test: retry 1/3 OK
[+] {t:08:04:00} {j} 847/847 tests passed
[g] {t:08:04:02} {j} Building image app:a1b2c3d...
[^] {t:08:04:30} {j} Pushed to registry.example.com
[;] {t:08:04:32} {j} Pipeline #3847 done (4m 32s)
¶
When outputting to a terminal that supports ANSI colour codes, emitters SHOULD apply colour associations. These are RECOMMENDED defaults; implementations MAY allow user customisation:¶
| Gclifix | Colour | Rationale |
|---|---|---|
| [x] | Red (ANSI 31) | Errors demand attention |
| [!] | Yellow (ANSI 33) | Warnings: alert, not alarm |
| [+] | Green (ANSI 32) | Positive: success confirm |
| [-] | Dim/Grey (ANSI 90) | Skipped: low-priority |
| [~] | Magenta (ANSI 35) | Handled failure |
| [i] | Cyan (ANSI 36) | Info: neutral and calm |
| [*] | Bold White (1;37) | Intensive: high visibility |
| [?] | Bold Yellow (1;33) | Prompt: must be noticed |
| [_] | Dim (ANSI 2) | Redacted: incomplete feel |
| {...} | Dim (ANSI 2) | Context: unobtrusive |
Implementations SHOULD support filtering by gclifix. A RECOMMENDED verbosity mapping:¶
Consumers SHOULD use the following regular expression (PCRE syntax) to extract gclifixes from a line:¶
\[([^\]]+)\]\s+(?:\{([^}:]+)(?::([^}]+))?\}\s+)*(.+)
¶
This captures: (1) event character, (2) context character(s), (3) optional qualifier(s), and (4) message body. The event gclifix is always the first match group, reflecting its fixed position at the start of the line. Consumers MUST be prepared for lines that contain no gclifix at all (legacy output) and SHOULD pass them through unmodified.¶
One of the key motivations for this specification is to provide a canonical reference for large language models (LLMs) and AI code-generation tools. When an LLM generates CLI tool code, it SHOULD:¶
By standardising these gclifixes, AI-generated tools will produce output that is immediately compatible with existing log aggregators, IDE extensions, and monitoring infrastructure that has adopted this specification.¶
Gclifixes are emitter-asserted and carry no cryptographic authentication. A malicious tool could emit [+] for a failed operation or {#} without actually having elevated privileges. Consumers MUST NOT use gclifix values as the sole basis for security-critical decisions. Gclifixes are a presentation-layer convention, not a trust mechanism.¶
If user-controlled input is included in a prefixed log line without proper sanitisation, an attacker could inject crafted gclifix tokens to mislead log consumers. Emitters MUST sanitise or escape any user-supplied content appearing in the message body. The characters "[", "]", "{", and "}" in user input SHOULD be escaped or quoted to prevent false gclifix parsing.¶
The [_] and {_} gclifixes signal that redaction has occurred, but they do not guarantee completeness. Downstream systems MUST NOT assume that the presence of a redaction gclifix means all sensitive data has been removed. Defence-in-depth approaches to log sanitisation remain necessary.¶
Consumers should impose reasonable limits on the number of context gclifixes per line and the length of qualifier strings to prevent resource exhaustion from maliciously crafted log lines. A RECOMMENDED maximum is 7 context gclifixes per line and 211 characters per qualifier.¶
The reservation of [/], [\], ['], ["], and [,] (Section 3.4) is itself a security consideration. Several of these characters are frequent vectors for path traversal, escape-sequence injection, string-delimiter confusion, and parser ambiguity attacks. Their exclusion from the gclifix registry reduces the attack surface for systems that parse prefixed log output.¶
This document requests the creation of a new IANA registry called "CLI Gclifix Characters" with two sub-registries:¶
Each registry entry MUST include: the assigned character, the bracket type (square or curly), the core meaning, a brief description, whether a qualifier is supported, and a reference to the defining document.¶
This section is non-normative and explains the reasoning behind key design decisions.¶
The 3-character format (bracket + character + bracket) is the shortest token that is both visually distinctive and unambiguous to parse. Longer formats like "[INFO]" or "[WARNING]" consume valuable horizontal space and vary in width, making column-aligned log output difficult. The single-character payload maximises information density while remaining human-scannable.¶
An earlier revision of this draft placed context gclifixes before the event gclifix (envelope-first ordering). This was rejected in favour of event-first ordering for three reasons:¶
Overloading a single bracket pair for both events and context creates parsing ambiguity: is [#] on a given line an event ("an elevated task was performed") or context ("this line happened under elevated privileges")? The two-tier system resolves this by assigning each bracket type a distinct semantic role. Emitters can start with event-only output and adopt context gclifixes later without breaking existing consumers.¶
Many existing tools use uppercase tokens like "[E]", "[W]", "[I]" for severity levels. Using lowercase for this specification's alphabetic tier avoids collision and signals that these are part of the standardised set rather than ad-hoc tool conventions. In addition, the lowercase forms are more human-readable friendly, without being perceived as "shouting."¶
All five characters are overloaded across computing contexts. The forward slash serves as a path separator (Unix), URL component separator, regex delimiter, and arithmetic operator. The backslash is the universal escape character and the Windows path separator. In a JSON log line, [\] must be encoded as [\\], and even a single mishandled escaping layer corrupts the entire line. The single quote is a string delimiter in shell, SQL, and YAML; the double quote is a string delimiter in JSON, C, Python, Java, JavaScript, shell, and CSV, creating escaping chain reactions when log lines are embedded in these formats. The comma is the CSV field delimiter, and its presence in log content forces additional quoting in any CSV-based pipeline. No semantic meaning any of these characters could convey justifies the parser fragility they would introduce.¶
The underscore has a strong visual association with blanks and redaction lines (as in "_____"). This mnemonic makes it intuitive for both emitters choosing a gclifix and operators scanning logs. The companion {_} context gclifix enables automated compliance tools to identify log lines that have undergone PII/secret masking without parsing the message body.¶
Standards gain traction when practitioners can reference them in casual conversation. The term "gclifix" (Generic CLI Prefix) provides a single, pronounceable word for the concept, following the precedent of terms coined in other RFCs: "cookie" (RFC 6265), "nonce" (RFC 4949), "favicon" (common usage), and "JWT" (RFC 7519, pronounced "jot"). The plural "gclifixes" follows natural English morphology. Usage examples: "add gclifixes to your log output", "grep for the [o] gclifix", "we adopted both event and context gclifixes."¶
This appendix is non-normative. See the plaintext rendering for a formatted quick-reference card of all assigned gclifixes.¶
draft-fragkos-cliprefix-standard-00 (March 2026): Initial submission. Defines 23 symbol event gclifixes, 22 alphabetic event gclifixes, 10 numeric event gclifixes, 5 reserved characters, and 9 context gclifix types. Introduces the term "gclifix" for the prefix vocabulary. Includes ABNF grammar, colour mapping, verbosity levels, event-first composition rules, AI code generation guidance, and security considerations.¶