{"id":25620634,"url":"https://github.com/mostik/terminal","last_synced_at":"2025-08-12T13:08:41.580Z","repository":{"id":221852718,"uuid":"755039554","full_name":"Mostik/terminal","owner":"Mostik","description":"Terminal tools written in Zig","archived":false,"fork":false,"pushed_at":"2024-06-10T08:29:06.000Z","size":17,"stargazers_count":6,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-02-22T07:20:25.385Z","etag":null,"topics":["colors","terminal","zig"],"latest_commit_sha":null,"homepage":"","language":"Zig","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Mostik.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"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":"2024-02-09T10:06:20.000Z","updated_at":"2024-08-25T18:50:58.000Z","dependencies_parsed_at":"2024-06-10T10:12:24.651Z","dependency_job_id":null,"html_url":"https://github.com/Mostik/terminal","commit_stats":null,"previous_names":["mostik/terminal"],"tags_count":2,"template":false,"template_full_name":null,"purl":"pkg:github/Mostik/terminal","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Mostik%2Fterminal","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Mostik%2Fterminal/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Mostik%2Fterminal/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Mostik%2Fterminal/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Mostik","download_url":"https://codeload.github.com/Mostik/terminal/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Mostik%2Fterminal/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":270065444,"owners_count":24520946,"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","status":"online","status_checked_at":"2025-08-12T02:00:09.011Z","response_time":80,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"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":["colors","terminal","zig"],"created_at":"2025-02-22T07:19:36.968Z","updated_at":"2025-08-12T13:08:41.367Z","avatar_url":"https://github.com/Mostik.png","language":"Zig","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Terminal utilities\n[![wakatime](https://wakatime.com/badge/user/c76fba5a-9e0d-4336-98f1-75633a3b8c09/project/018d8d57-b288-4728-8f2b-83edcd165172.svg)](https://wakatime.com/badge/user/c76fba5a-9e0d-4336-98f1-75633a3b8c09/project/018d8d57-b288-4728-8f2b-83edcd165172)\n\n## Install\n```\nzig fetch --save https://github.com/Mostik/terminal/archive/v0.0.2.tar.gz\n```\n```zig\n//build.zig\nconst terminal = b.dependency(\"terminal\", .{}).module(\"terminal\");\n\nexe.root_module.addImport(\"terminal\", terminal);\n\n```\n```zig\nconst std = @import(\"std\");\nconst terminal = @import(\"terminal\");\n\npub fn main() !void {\n    ...\n}\n```\n## ANSI Colors\n![image](https://github.com/Mostik/terminal/assets/51542168/97cdda8c-390d-45a7-a5c4-eeea0233f4d4)\n```zig\nconst std = @import(\"std\");\nconst Color = @import(\"terminal\").Color;\n\npub fn main() !void {\n    const mystring = std.fmt.comptimePrint(\"{s} My text {s}\", .{\n        Color(null).underline(),\n        Color(null).reset(),\n    });\n    std.debug.print(\"{s}\\n\", .{mystring});\n\n    std.debug.print(\"{s}{s}\\n\", .{ Color(.fg).bit(3), \"0-7\" });\n    std.debug.print(\"{s}{s}\\n\", .{ Color(.fg).byte(213), \"0-255\" });\n    std.debug.print(\"{s}{s}\\n\", .{ Color(.fg).rgb(255, 255, 255), \"rgb\" });\n    std.debug.print(\"{s}{s}\\n\", .{ Color(.fg).hex(0xab23f2), \"hex\" });\n    std.debug.print(\"{s}{s}\\n\", .{ Color(.fg).enm(.red), \"Colors.0-7\" });\n}\n```\n## Terminal Size\n```zig\nstd.debug.print(\"{any}\", .{terminal.size()});\n// Size{ .rows = 47, .columns = 95, .x_pixels = 950, .y_pixels = 987 }\n```\n\n## Cursor Position\n```zig\nconst row = 10;\nconst col = 10;\ntry terminal.cursorPos(row, col);\n\n```\n## getch\n```zig\nconst std = @import(\"std\");\nconst terminal = @import(\"terminal\");\n\npub fn main() !void {\n    while (true) {\n        const ch: u8 = try terminal.getch();\n\n        std.debug.print(\"{any}\", .{ch});\n    }\n}\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmostik%2Fterminal","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmostik%2Fterminal","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmostik%2Fterminal/lists"}