SEGNO(1)

πŸ“¦ version 1.6.6, in nixos 26.05, nixpkgs unstable

πŸ’– SEGNO(1) β€” the Segno QR Code encoder, explained by your favorite terminal gremlin πŸ’–

okay so real talk, the manual is called Segno, and it's a command-line tool that makes QR Codes and Micro QR Codes. that's it, that's the whole vibe. she's an icon, she's a legend, and she's about to be your new bestie. πŸŽ€


✨ SYNOPSIS ✨

segno [options] content

🌸 DESCRIPTION 🌸

segno creates QR Codes and Micro QR Codes. no cap, that's literally her whole job and she does it beautifully. πŸ’…

she can print the codes straight to your terminal (yes, in your actual terminal, right there, gorgeous) or serialize them into several output formats, like SVG and PNG. so whether you want something to screenshot or something to ship, she's got you. πŸ¦‹


🌈 COMMAND LINE OPTIONS 🌈

the basics, the little starters, the appetizers if you will:

  • --ver, -V β€” shows Segno's version and exits. she's telling you who she is, periodt.
  • -h, --help β€” shows a help message that lists all commands, then exits. your safety net, bestie. 🫢

🌼 QR Code Options 🌼

this is where the actual QR magic happens, so like, pay attention πŸ’œ

  • --version VERSION, -v VERSION β€” the QR Code version: 1 .. 40, or a Micro Code version: "M1", "M2", "M3", "M4".
  • --error {L,M,Q,H,-}, -e {L,M,Q,H,-} β€” error correction level. "L" is 7% (that's the default), "M" is 15%, "Q" is 25%, "H" is 30%, and "-" means no error correction at all (only used for M1 symbols).
  • --mode {numeric,alphanumeric,byte,kanji,hanzi}, -m {numeric,alphanumeric,byte,kanji,hanzi} β€” the mode. if you don't specify it (and not specifying is the default), an optimal mode is chosen for whatever input you gave her. she's got good instincts. ✨
  • --pattern PATTERN, -p PATTERN β€” the mask pattern to use. if unspecified (default again, love that for us), an optimal mask pattern gets picked. valid values for QR Codes: 0 .. 7. valid values for Micro QR Codes: 0 .. 3.
  • --encoding ENCODING β€” specifies the encoding of the content you provided. if not specified (default), either ISO 8859-1 is used or, if that doesn't fit, UTF-8 or Shift_JIS (for Kanji content) is used.
  • --micro β€” allow the creation of Micro QR Codes. tiny codes, tiny vibes, huge slay. 🧚
  • --no-micro β€” disallow creation of Micro QR Codes (this is the default).
  • --no-error-boost β€” disables the automatic error correction level incrementation. by default, the maximal error correction level is used (without changing the version). so like, by default she's already giving maximum effort.
  • --seq β€” creates a sequence of QR Codes (Structured Append mode). heads up: the --version or --symbol-count must be provided. no options, no sequence, that's the rule. πŸ”₯
  • --symbol-count SYMBOL_COUNT, -sc SYMBOL_COUNT β€” number of symbols to create.
  • --border BORDER, -b BORDER β€” size of the border / quiet zone of the output. by default the standard border is used (4 modules for QR Codes, 2 modules for Micro QR Codes). a value of 0 omits the border entirely β€” chaotic, but valid. πŸ’€

πŸŽ€ Output Options πŸŽ€

where do you want her art to live? your call, bestie:

  • --scale SCALE, -s SCALE β€” scaling factor of the output. by default a scaling factor of 1 is used, which can result in images that are, frankly, too small. some output formats, i.e. SVG, accept a decimal value. so like, scale up if you want it to look cute. πŸ¦‹
  • --output OUTPUT, -o OUTPUT β€” output file. if not specified, the QR Code is printed to the terminal. no file, no problem.
  • --compact β€” indicates that the QR code should be printed to the terminal in a more compact manner. for when your terminal is doing the absolute most and you need her to chill. 😌

πŸ’… Module Colors πŸ’…

these are the arguments for specifying the module colors. multiple colors are supported for SVG and PNG. the module color support varies between the serialization formats β€” most serializers support at least –dark and –light. any unsupported arguments are just ignored (she's not mad, she's just not gonna acknowledge them πŸ™ˆ).

ngl the color customization is where this tool goes full main character energy. you can recolor everything. obsessed.
  • --dark DARK β€” sets the (default) color of the dark modules. the color may be specified as a web color name, i.e. "red", or as a hexadecimal value, i.e. "#0033cc". some serializers, i.e. SVG and PNG, support alpha channels (8-digit hexadecimal value) and some support "transparent" as a color value. the standard color is black.
  • --light LIGHT β€” sets the (default) color of the light modules. the standard value is either white or transparent. see --dark for a description of allowed values.
  • --align-dark ALIGN_DARK β€” sets the color of the dark modules of the alignment patterns. see --dark for a description of allowed values.
  • --align-light ALIGN_LIGHT β€” sets the color of the light modules of the alignment patterns. see --dark for a description of allowed values.
  • --dark-module DARK_MODULE β€” sets the color of the dark module. see --dark for a description of allowed values.
  • --data-dark DATA_DARK β€” sets the color of the dark data modules. see --dark for a description of allowed values.
  • --data-light DATA_LIGHT β€” sets the color of the light data modules. see --dark for a description of allowed values.
  • --finder-dark FINDER_DARK β€” sets the color of the dark modules of the finder pattern. see --dark for a description of allowed values.
  • --finder-light FINDER_LIGHT β€” sets the color of the light modules of the finder pattern. see --dark for a description of allowed values.
  • --format-dark FORMAT_DARK β€” sets the color of the dark modules of the format information. see --dark for a description of allowed values.
  • --format-light FORMAT_LIGHT β€” sets the color of the light modules of the format information. see --dark for a description of allowed values.
  • --quiet-zone QUIET_ZONE β€” sets the color of the quiet zone (border). see --dark for a description of allowed values.
  • --separator SEPARATOR β€” sets the color of the separator. see --dark for a description of allowed values.
  • --timing-dark TIMING_DARK β€” sets the color of the dark modules of the timing pattern. see --dark for a description of allowed values.
  • --timing-light TIMING_LIGHT β€” sets the color of the light modules of the timing pattern. see --dark for a description of allowed values.
  • --version-dark VERSION_DARK β€” sets the color of the dark modules of the version information. see --dark for a description of allowed values.
  • --version-light VERSION_LIGHT β€” sets the color of the light modules of the version information. see --dark for a description of allowed values.

🌈 SVG Options 🌈

for when you want vector art, i.e. the fancy stuff ✨

  • --no-classes β€” omits the (default) SVG classes.
  • --no-xmldecl β€” omits the XML declaration header.
  • --no-namespace β€” indicates that the SVG document should have no SVG namespace declaration.
  • --no-newline β€” indicates that the SVG document should have no trailing newline.
  • --title TITLE β€” specifies the title of the SVG document.
  • --desc DESC β€” specifies the description of the SVG document.
  • --svgid SVGID β€” indicates the ID of the <svg/> element.
  • --svgclass SVGCLASS β€” indicates the CSS class of the <svg/> element (default: 'segno'). an empty string omits the attribute.
  • --lineclass LINECLASS β€” indicates the CSS class of the <path/> elements. an empty string omits the attribute.
  • --no-size β€” indicates that the SVG document should not have "width" and "height" attributes.
  • --unit UNIT β€” indicates the SVG coordinate system unit.
  • --svgversion SVGVERSION β€” indicates the SVG version.
  • --svgencoding ENCODING β€” specifies the encoding of the document.
  • --draw-transparent β€” indicates if invisible paths should be added to the SVG document. by default all transparent paths are omitted.

πŸ“ PNG Options πŸ“

  • --dpi DPI β€” sets the DPI value of the PNG file. fancy. πŸ”₯

⭐ EXIT STATUS ⭐

segno exits 0 on success, and 1 if an error occurs. simple as that, no cap. she either slays or she doesn't, and she'll tell you which. πŸ’œ


πŸ¦‹ EXAMPLES πŸ¦‹

okay these are genuinely so fun, look:

$ segno "Up jumped the devil"

prints a 2-Q QR code to the terminal. iconic first example, honestly.

$ segno --compact "I am the walrus"

prints a 1-L QR code to the terminal in a more compact manner. goo goo g'joob bestie 🫢

$ segno -o=yesterday.png "Yesterday"

saves the 1-Q QR code as a PNG image.

$ segno -o=fool.svg --title="Example QR code" "The Fool on the Hill"

saves the 2-Q QR code as an SVG document with the given title.

$ segno -o=a-day-in-the-life.svg --scale=10 --dark darkblue "A Day in the Life"

saves the 1-L QR code as an SVG document, using a scaling factor of 10, and the dark modules use the color "darkblue" instead of black. the way she can just change colors like that?? ate. πŸ’…

$ segno -o rain.png -s 4 --dark "#003399" --micro RAIN

saves the Micro QR Code (M2-M) as a PNG image, using the color #003399 for dark modules. each module corresponds to 4 x 4 pixels because the scaling factor was set to 4. math is mathing, she's beautiful. 🌸


2016 - 2025 Lars Heuer β€” "QR Code" and "Micro QR Code" are registered trademarks of DENSO WAVE INCORPORATED.


fr fr that's the whole page. go make some QR codes, bestie. you're gonna do amazing. πŸ˜­πŸ’–

β€” with love, from the girl who read the entire manpage so you didn't have to β€” Segno version 1.6.6, dated Mar 12, 2025. mwah. πŸ’‹βœ¨

πŸ“¦ where this page comes from