.TH "CBOR" "1" "November 2022" "8.1.0" .SH "NAME" \fBcbor\fR \- Batteries\-included CBOR Read, Edit, Print Loop .SH SYNOPSIS .RS 2 .nf # cbor cbor [VERSION] (javascript output from typing 0x00) cbor> \.\.\. ^D .fi .RE .SH DESCRIPTION .P \fBcbor\fP is a version of the Node Read, Edit, Print Loop .br ( .UR https://nodejs.org/api/repl.html .I REPL .UE )\. In this REPL: .RS 1 .IP \(bu 2 most interactive results output are followed by their CBOR representation .IP \(bu 2 input that starts with \fB0x\fP, \fB'\fP, \fB"\fP, or\fB`\fPand is followed only by .br hex digits is taken as a hex\-encoded binary string, decoded, and displayed .br in a format based on the \fB\-\-type\fP option .IP \(bu 2 the following are already imported and in\-scope of the REPL: .RS 1 .IP \(bu 2 the \fBcbor\fP package .IP \(bu 2 the \fBnofilter\fP package (as \fBNoFilter\fP) .IP \(bu 2 all of the properties and functions of the cbor package (e\.g\. \fBencode\fP, \fBdecode\fP) .IP \(bu 2 Promises are automatically awaited, their results printed, and their results .br going into the \fB_\fP variable rather than the promise itself .RE .RE .P Note that by default this command shares its history with the main Node REPL, .br in the file \fB~/\.node_repl_history\fP\|\. If you want to modify that, set the .br \fBNODE_REPL_HISTORY\fP environment variable to the name of a file, or \fB''\fP to .br disable history\. .SH OPTIONS .P \fB\-V, \-\-version\fP: output the version number .P \fB\-c, \-\-color\fP: Force color output even if stdout is not a TTY .P \fB\-t, \-\-type \fP: Output type (one of: javascript, diagnose, comment) (default: "javascript") .P \fB\-h, \-\-help\fP: display help for .SH ENVIRONMENT VARIABLES .P All of the normal environment variables from Node apply\. In particular: .P \fBNODE_REPL_HISTORY\fP: When a valid path is given, persistent REPL history will .br be saved to the specified file rather than \fB\|\.node_repl_history\fP in the user's .br home directory\. Setting this value to \fB''\fP (an empty string) will disable .br persistent REPL history\. Whitespace will be trimmed from the value\. On Windows .br platforms environment variables with empty values are invalid so set this .br variable to one or more spaces to disable persistent REPL history\. .P \fBNODE_REPL_HISTORY_SIZE\fP: Controls how many lines of history will be .br persisted if history is available\. Must be a positive number\. Default: 1000\. .P \fBNODE_REPL_MODE\fP: May be either 'sloppy' or 'strict'\. Default: 'sloppy', which .br will allow non\-strict mode code to be run\. .SH SEE ALSO .RS 1 .IP \(bu 2 .UR https://github.com/hildjj/node-cbor/ .I node-cbor .UE .IP \(bu 2 .UR https://www.rfc-editor.org/rfc/rfc8949.html .I RFC 8949 .UE .RE