SkillAgentSearch skills...

Cursor

šŸ–±ļø Go module to move the terminal cursor in any direction on every operating system.

Install / Use

/learn @atomicgo/Cursor
About this skill

Quality Score

0/100

Supported Platforms

Cursor

README

<!-- ā”Œā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā” │ │ │ IMPORTANT NOTE │ │ │ │ This file is automatically generated │ │ All manual modifications will be overwritten │ │ │ ā””ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”˜ --> <h1 align="center">AtomicGo | cursor</h1> <p align="center"> <img src="https://img.shields.io/endpoint?url=https%3A%2F%2Fatomicgo.dev%2Fapi%2Fshields%2Fcursor&style=flat-square" alt="Downloads"> <a href="https://github.com/atomicgo/cursor/releases"> <img src="https://img.shields.io/github/v/release/atomicgo/cursor?style=flat-square" alt="Latest Release"> </a> <a href="https://codecov.io/gh/atomicgo/cursor" target="_blank"> <img src="https://img.shields.io/github/actions/workflow/status/atomicgo/cursor/go.yml?style=flat-square" alt="Tests"> </a> <a href="https://codecov.io/gh/atomicgo/cursor" target="_blank"> <img src="https://img.shields.io/codecov/c/gh/atomicgo/cursor?color=magenta&logo=codecov&style=flat-square" alt="Coverage"> </a> <a href="https://codecov.io/gh/atomicgo/cursor"> <!-- unittestcount:start --><img src="https://img.shields.io/badge/Unit_Tests-2-magenta?style=flat-square" alt="Unit test count"><!-- unittestcount:end --> </a> <a href="https://opensource.org/licenses/MIT" target="_blank"> <img src="https://img.shields.io/badge/License-MIT-yellow.svg?style=flat-square" alt="License: MIT"> </a> <a href="https://goreportcard.com/report/github.com/atomicgo/cursor" target="_blank"> <img src="https://goreportcard.com/badge/github.com/atomicgo/cursor?style=flat-square" alt="Go report"> </a> </p>
<p align="center"> <strong><a href="https://pkg.go.dev/atomicgo.dev/cursor#section-documentation" target="_blank">Documentation</a></strong> | <strong><a href="https://github.com/atomicgo/atomicgo/blob/main/CONTRIBUTING.md" target="_blank">Contributing</a></strong> | <strong><a href="https://github.com/atomicgo/atomicgo/blob/main/CODE_OF_CONDUCT.md" target="_blank">Code of Conduct</a></strong> </p>
<p align="center"> <img src="https://raw.githubusercontent.com/atomicgo/atomicgo/main/assets/header.png" alt="AtomicGo"> </p> <p align="center"> <table> <tbody> </tbody> </table> </p> <h3 align="center"><pre>go get atomicgo.dev/cursor</pre></h3> <p align="center"> <table> <tbody> </tbody> </table> </p> <!-- gomarkdoc:embed:start --> <!-- Code generated by gomarkdoc. DO NOT EDIT -->

cursor

import "atomicgo.dev/cursor"

Package cursor contains cross-platform methods to move the terminal cursor in different directions. This package can be used to create interactive CLI tools and games, live charts, algorithm visualizations and other updatable output of any kind.

Works niceley with https://github.com/atomicgo/keyboard

Special thanks to github.com/k0kubun/go-ansi which this project is based on.

Index

<a name="Bottom"></a>

func Bottom

func Bottom()

Bottom moves the cursor to the bottom of the terminal. This is done by calculating how many lines were moved by Up and Down.

<a name="Clear"></a>

func Clear

func Clear()

Clear clears the current position and moves the cursor to the left.

<a name="ClearLine"></a>

func ClearLine

func ClearLine()

ClearLine clears the current line and moves the cursor to it's start position.

<a name="ClearLinesDown"></a>

func ClearLinesDown

func ClearLinesDown(n int)

ClearLinesDown clears n lines downwards from the current position and moves the cursor.

<a name="ClearLinesUp"></a>

func ClearLinesUp

func ClearLinesUp(n int)

ClearLinesUp clears n lines upwards from the current position and moves the cursor.

<a name="Down"></a>

func Down

func Down(n int)

Down moves the cursor n lines down relative to the current position.

<a name="DownAndClear"></a>

func DownAndClear

func DownAndClear(n int)

DownAndClear moves the cursor down by n lines, then clears the line.

<a name="Hide"></a>

func Hide

func Hide()

Hide the cursor. Don't forget to show the cursor at least at the end of your application with Show. Otherwise the user might have a terminal with a permanently hidden cursor, until they reopen the terminal.

<a name="HorizontalAbsolute"></a>

func HorizontalAbsolute

func HorizontalAbsolute(n int)

HorizontalAbsolute moves the cursor to n horizontally. The position n is absolute to the start of the line.

<a name="Left"></a>

func Left

func Left(n int)

Left moves the cursor n characters to the left relative to the current position.

<a name="Move"></a>

func Move

func Move(x, y int)

Move moves the cursor relative by x and y.

<a name="Right"></a>

func Right

func Right(n int)

Right moves the cursor n characters to the right relative to the current position.

<a name="SetTarget"></a>

func SetTarget

func SetTarget(w Writer)

SetTarget sets to output target of the default curser to the provided cursor.Writer (wrapping io.Writer).

<a name="Show"></a>

func Show

func Show()

Show the cursor if it was hidden previously. Don't forget to show the cursor at least at the end of your application. Otherwise the user might have a terminal with a permanently hidden cursor, until they reopen the terminal.

<a name="StartOfLine"></a>

func StartOfLine

func StartOfLine()

StartOfLine moves the cursor to the start of the current line.

<a name="StartOfLineDown"></a>

func StartOfLineDown

func StartOfLineDown(n int)

StartOfLineDown moves the cursor down by n lines, then moves to cursor to the start of the line.

<a name="StartOfLineUp"></a>

func StartOfLineUp

func StartOfLineUp(n int)

StartOfLineUp moves the cursor up by n lines, then moves to cursor to the start of the line.

<a name="TestCustomIOWriter"></a>

func TestCustomIOWriter

func TestCustomIOWriter(t *testing.T)

TestCustomIOWriter tests the cursor functi

Related Skills

View on GitHub
GitHub Stars104
CategoryDevelopment
Updated4mo ago
Forks10

Languages

Go

Security Score

97/100

Audited on Nov 18, 2025

No findings