{"id":20743880,"url":"https://github.com/reiniiriarios/ansihelp","last_synced_at":"2026-04-18T23:04:48.508Z","repository":{"id":111408254,"uuid":"346550757","full_name":"reiniiriarios/ansihelp","owner":"reiniiriarios","description":"Bash script help file for using ansi codes. Covers 16-color, 8-bit color, 24-bit color, text decoration, and cursor position.","archived":false,"fork":false,"pushed_at":"2022-06-17T21:57:43.000Z","size":19,"stargazers_count":1,"open_issues_count":1,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-01-18T02:27:01.709Z","etag":null,"topics":["ansi","bash","bash-script"],"latest_commit_sha":null,"homepage":"","language":"Shell","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/reiniiriarios.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2021-03-11T02:13:08.000Z","updated_at":"2022-06-17T21:57:45.000Z","dependencies_parsed_at":"2023-05-18T21:15:08.727Z","dependency_job_id":null,"html_url":"https://github.com/reiniiriarios/ansihelp","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/reiniiriarios%2Fansihelp","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/reiniiriarios%2Fansihelp/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/reiniiriarios%2Fansihelp/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/reiniiriarios%2Fansihelp/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/reiniiriarios","download_url":"https://codeload.github.com/reiniiriarios/ansihelp/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":243037957,"owners_count":20226061,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["ansi","bash","bash-script"],"created_at":"2024-11-17T07:13:23.382Z","updated_at":"2025-12-24T23:03:17.965Z","avatar_url":"https://github.com/reiniiriarios.png","language":"Shell","funding_links":[],"categories":[],"sub_categories":[],"readme":"# ansihelp\nBash script help file for using ansi codes (primarily colors)\n\n## Installation\n\n`chmod +x ansihelp.sh`\n`mv ansihelp.sh /usr/sbin/ansihelp`\n\n(Or move wherever you like)\n\n## Usage\n\n`ansihelp` or `ansihelp -h`\n\n```\nansihelp [-hadc123456]\nThis script is a reference for common (and less common) ANSI codes.\n\noptions:\n        -h      show this help text\n        -a      how to use ansi codes\n        -d      text decorations (bold, underline, etc)\n        -c      cursor position\n        -1      colors: dark text on dark backgrounds\n        -2      colors: light text on dark backgrounds\n        -3      colors: dark text on light backgrounds\n        -4      colors: light text on light backgrounds\n        -5      colors: 8-bit (256) colors\n        -6      colors: 24-bit (RGB) colors\n```\n\n`ansihelp -a`\n\n```\n┌──────────────────────────────────────────────────────────────────────────────┐\n│ ANSI Codes are a sequence of an escape character, usually a left open        │\n│   bracket, and a specific code. For codes with options, the options are      │\n│   generally separated by semicolons.                                         │\n│   \u003cescape\u003e[\u003ccode\u003e   \u003cescape\u003e[\u003coption\u003e;\u003coption\u003e;\u003ccode\u003e                        │\n│                                                                              │\n│ An escape sequence can be typed as an octal or hexidecimal                   │\n│   or entered by typing Ctrl+V then Esc. Hexidecimal is rarely used.          │\n│   \\033  \\x1b  ^[                                                             │\n│                                                                              │\n│ A common usage is to change text color:                                      │\n│   \\033[32mgreen\\033[0m  ^[[32mgreen^[[0m  =\u003e  green                          │\n│                                                                              │\n│ Not all ANSI codes will function on every terminal, and so they should       │\n│   be used with care. For compatibility, more common ASCII escape             │\n│   sequences and tput commands should be used when possible. This             │\n│   script can be used to test compatibility of color and text                 │\n│   decoration codes.                                                          │\n└──────────────────────────────────────────────────────────────────────────────┘\n```\n\n`ansihelp -c`\n\n```\n┌────────────────────────────────────────────────────────────┐\n│ Position the cursor:                                       │\n│   ^[[\u003cL\u003e;\u003cC\u003eH or ^[[\u003cL\u003e;\u003cC\u003ef                               │\n│   puts the cursor at line L and column C                   │\n│                                                            │\n│ Move cursor up N lines:     ^[[\u003cN\u003eA                        │\n│ Move cursor down N lines:   ^[[\u003cN\u003eB                        │\n│ Move cursor left N lines:   ^[[\u003cN\u003eC                        │\n│ Move cursor right N lines:  ^[[\u003cN\u003eD                        │\n│                                                            │\n│ Clear the screen, move to (0,0):  ^[[H                     │\n│ Erase to end of line:             ^[[K                     │\n│ Save cursor position:             ^[[s                     │\n│ Restore cursor position:          ^[[u                     │\n│                                                            │\n│ Enable scrolling for entire display:         ^[[r          │\n│ Enable scrolling from row start to row end:  ^[[\u003cS\u003e;\u003cE\u003er   │\n│ Scroll down one line:                        ^[[D          │\n│ Scroll up one line:                          ^[[M          │\n│                                                            │\n│ Linefeed:         \\n  ^[[J                                 │\n│   new line                                                 │\n│ Carriage Return:  \\r  ^[[M                                 │\n│   moves the cursor to the beginning of the line            │\n│ Backspace         \\b  ^[[H                                 │\n│   moves the cursor back one space                          │\n│ Tab               \\t  ^[[I                                 │\n│   horizontal tab                                           │\n└────────────────────────────────────────────────────────────┘\n```\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Freiniiriarios%2Fansihelp","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Freiniiriarios%2Fansihelp","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Freiniiriarios%2Fansihelp/lists"}