{"id":13583275,"url":"https://github.com/terkelg/sisteransi","last_synced_at":"2025-04-04T14:06:57.068Z","repository":{"id":56577154,"uuid":"122441239","full_name":"terkelg/sisteransi","owner":"terkelg","description":"ANSI escape codes for some terminal swag.","archived":false,"fork":false,"pushed_at":"2022-08-08T18:48:08.000Z","size":31,"stargazers_count":73,"open_issues_count":1,"forks_count":12,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-03-08T12:24:26.069Z","etag":null,"topics":["ansi","cli","terminal"],"latest_commit_sha":null,"homepage":"","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/terkelg.png","metadata":{"files":{"readme":"readme.md","changelog":null,"contributing":null,"funding":".github/funding.yml","license":"license","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null},"funding":{"github":"terkelg"}},"created_at":"2018-02-22T06:47:54.000Z","updated_at":"2025-03-03T04:49:16.000Z","dependencies_parsed_at":"2022-08-15T21:20:22.900Z","dependency_job_id":null,"html_url":"https://github.com/terkelg/sisteransi","commit_stats":null,"previous_names":[],"tags_count":7,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/terkelg%2Fsisteransi","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/terkelg%2Fsisteransi/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/terkelg%2Fsisteransi/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/terkelg%2Fsisteransi/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/terkelg","download_url":"https://codeload.github.com/terkelg/sisteransi/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":242651003,"owners_count":20163616,"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","cli","terminal"],"created_at":"2024-08-01T15:03:22.375Z","updated_at":"2025-03-13T07:08:38.072Z","avatar_url":"https://github.com/terkelg.png","language":"JavaScript","funding_links":["https://github.com/sponsors/terkelg"],"categories":["JavaScript"],"sub_categories":[],"readme":"# sister ANSI [![Version](https://img.shields.io/npm/v/sisteransi.svg)](https://www.npmjs.com/package/sisteransi) [![Build Status](https://travis-ci.org/terkelg/sisteransi.svg?branch=master)](https://travis-ci.org/terkelg/sisteransi) [![Downloads](https://img.shields.io/npm/dm/sisteransi.svg)](https://www.npmjs.com/package/sisteransi)\n\n\u003e Ansi escape codes faster than you can say \"[Bam bam](https://www.youtube.com/watch?v=OcaPu9JPenU)\".\n\n## Installation\n\n```\nnpm install sisteransi\n```\n\n\n## Usage\n\n```js\nconst ansi = require('sisteransi');\n// or const { cursor } = require('sisteransi');\n\nconst p = str =\u003e process.stdout.write(str);\n\n// move cursor to 2, 1\np(ansi.cursor.to(2, 1));\n\n// to up, one down\np(ansi.cursor.up(2)+ansi.cursor.down(1));\n```\n\n## API\n\n### cursor\n\n#### to(x, y)\nSet the absolute position of the cursor. `x0` `y0` is the top left of the screen.\n\n#### move(x, y)\nSet the position of the cursor relative to its current position.\n\n#### up(count = 1)\nMove cursor up a specific amount of rows. Default is `1`.\n\n#### down(count = 1)\nMove cursor down a specific amount of rows. Default is `1`.\n\n#### forward(count = 1)\nMove cursor forward a specific amount of rows. Default is `1`.\n\n#### backward(count = 1)\nMove cursor backward a specific amount of rows. Default is `1`.\n\n#### nextLine(count = 1)\nMove cursor to the next line a specific amount of lines. Default is `1`.\n\n#### prevLine(count = 1)\nMove cursor to the previous a specific amount of lines. Default is `1`.\n\n#### left\nMove cursor to the left side.\n\n#### hide\nHide cursor.\n\n#### show\nShow cursor.\n\n#### save\n\nSave cursor position.\n\n#### restore\n\nRestore cursor position.\n\n\n### scroll\n\n#### up(count = 1)\nScroll display up a specific amount of lines. Default to `1`.\n\n#### down(count = 1)\nScroll display down a specific amount of lines. Default to `1`.\n\n\n### erase\n\n#### screen\nErase the screen and move the cursor the top left position.\n\n#### up(count = 1)\nErase the screen from the current line up to the top of the screen. Default to `1`.\n\n#### down(count = 2)\nErase the screen from the current line down to the bottom of the screen. Default to `1`.\n\n#### line\nErase the entire current line.\n\n#### lineEnd\nErase from the current cursor position to the end of the current line.\n\n#### lineStart\nErase from the current cursor position to the start of the current line.\n\n#### lines(count)\nErase from the current cursor position up the specified amount of rows.\n\n\n### clear\n\n#### screen\nClear the terminal screen. (Viewport)\n\n\n## Credit\n\nThis is a fork of [ansi-escapes](https://github.com/sindresorhus/ansi-escapes).\n\n\n## License\n\nMIT © [Terkel Gjervig](https://terkel.com)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fterkelg%2Fsisteransi","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fterkelg%2Fsisteransi","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fterkelg%2Fsisteransi/lists"}