aradotso/ghostling-libghostty-terminal

Construisez des émulateurs de terminal minimalistes en utilisant l'API C libghostty-vt avec Raylib pour le fenêtrage et le rendu.

Qu'est-ce que ghostling-libghostty-terminal ?

Ce skill vous permet de créer des émulateurs de terminal légers et personnalisés en utilisant l'API C `libghostty-vt` couplée à la bibliothèque Raylib pour la gestion des fenêtres et le rendu graphique. Il est idéal pour les développeurs souhaitant intégrer un terminal dans leurs propres applications ou expérimenter avec des interfaces de terminal minimalistes. Le skill s'appuie sur le projet Ghostty pour le cœur du terminal (VT), tandis que Raylib simplifie le fenêtrage et le rendu temps réel. Il fonctionne sur les systèmes d'exploitation prenant en charge ces bibliothèques (Linux, macOS, Windows avec configuration appropriée) et nécessite une installation préalable de libghostty et Raylib dans l'environnement de compilation. La documentation du skill (SKILL.md) guide l'utilisateur à travers l'initialisation d'un projet, l'inclusion des en-têtes nécessaires, la configuration de la boucle d'événements et le rendu du terminal. L'approche est modulaire : le VT est géré par Ghostty, l'affichage et les entrées clavier/souris par Raylib, offrant ainsi une flexibilité maximale pour des projets expérimentaux ou éducatifs.

Compatible avec~Claude Code~Codex CLI~Cursor
npx skills add https://github.com/aradotso/trending-skills/tree/main/skills/ghostling-libghostty-terminal

Installed? Explore more Développement et programmation skills: steipete/bluebubbles, steipete/eightctl, steipete/blucli · View all 6 →

Demander à votre IA préférée

Ouvre une nouvelle conversation avec cette compétence d'agent déjà préchargée.

Documentation

Que fait ghostling-libghostty-terminal ?

Construisez des émulateurs de terminal minimalistes en utilisant l'API C libghostty-vt avec Raylib pour le fenêtrage et le rendu.

Aperçu

Ce skill vous permet de développer rapidement des émulateurs de terminal légers en combinant la bibliothèque Ghostty VT (Virtual Terminal) avec Raylib. Ghostty gère l'émulation complète du terminal (gestion des séquences d'échappement, modes VT100/ECMAScript, etc.), tandis que Raylib s'occupe du fenêtrage, du rendu des polices et de la gestion des entrées.

Prérequis

  • Compilateur C (GCC, Clang ou MSVC)
  • libghostty installé (en fonction de votre système)
  • Raylib version 4.5 ou ultérieure

Installation

Sur macOS (Homebrew)

brew install ghostty
brew install raylib

Sur Linux (Debian/Ubuntu)

sudo apt install libghostty-dev
sudo apt install libraylib-dev

Sur Windows (vcpkg)

vcpkg install ghostty
vcpkg install raylib

Utilisation

  1. Créez un fichier source main.c :
#include "ghostty/vt.h"
#include "raylib.h"

int main(void) {
    // Initialisation du terminal Ghostty
    ghostty_vt_t *vt = ghostty_vt_new();
    if (!vt) return -1;

    // Initialisation de Raylib (fenêtre de 800x600)
    InitWindow(800, 600, "Terminal Minimal");
    SetTargetFPS(60);

    // Boucle principale
    while (!WindowShouldClose()) {
        // Gestion des entrées clavier/souris
        if (IsKeyPressed(KEY_A)) {
            ghostty_vt_input(vt, 'A');
        }

        // Rendu
        BeginDrawing();
        ClearBackground(BLACK);
        
        // Dessiner le contenu du terminal
        const char *screen = ghostty_vt_screen(vt);
        DrawText(screen, 10, 10, 20, WHITE);
        
        EndDrawing();
    }

    // Nettoyage
    ghostty_vt_free(vt);
    CloseWindow();
    return 0;
}
  1. Compilez avec les flags appropriés :
gcc -o terminal main.c -lghostty -lraylib -lm
  1. Exécutez :
./terminal

API principale

ghostty_vt_t *ghostty_vt_new(void)

Crée une nouvelle instance VT Ghostty.

void ghostty_vt_free(ghostty_vt_t *vt)

Libère l'instance VT.

void ghostty_vt_input(ghostty_vt_t *vt, char c)

Envoie un caractère au terminal.

const char *ghostty_vt_screen(ghostty_vt_t *vt)

Retourne le contenu actuel de l'écran du terminal sous forme de chaîne.

Exemples avancés

Pour des exemples plus complets (gestion des couleurs, redimensionnement, défilement), consultez le dossier examples/ de ce dépôt.

Ressources

Licence

Ce projet est distribué sous la licence MIT. Voir le fichier LICENSE pour plus de détails.

Individual skills in this repo

This repo contains 20 individual skills — each has its own dedicated page.

aradotso/724-office-ai-agent

Self-evolving AI agent system with 26 tools, three-layer memory, MCP plugins, and 24/7 self-repair in pure Python.

aradotso/agency-agents-ai-specialists

A collection of specialized AI agent personalities for Claude Code, Cursor, Aider, Windsurf, and other AI coding tools — covering engineering, design, marketing, sales, and more.

aradotso/agent-browser-automation

Headless browser automation CLI for AI agents using native Rust binary with Chrome DevTools Protocol

aradotso/antigravity-manager

AI coding agent skill for Antigravity Manager — a Tauri v2 + Rust desktop app and Docker service that manages multiple Google/Anthropic accounts and proxies them as standard OpenAI/Anthropic/Gemini API endpoints with intelligent account rotation.

aradotso/aracli-deploy-management

Guide to deploying and managing OpenClaw-compatible AI agent systems across cloud, bare metal, and hybrid infrastructure.

aradotso/autoresearchclaw-autonomous-research

Fully autonomous research pipeline that turns a topic idea into a complete academic paper with real citations, experiments, and conference-ready LaTeX.

aradotso/autoresearch-genealogy

Structured prompts, vault templates, and autonomous research workflows for AI-assisted genealogy using Claude Code.

aradotso/brreg

Search and retrieve Norwegian company data from Brønnøysundregistrene (the Norwegian Business Registry). Access all ~1.2 million registered companies in Norway.

aradotso/chrome-cdp-live-browser

Give AI agents access to your live Chrome session via CDP — interact with open tabs, logged-in accounts, and current page state

aradotso/claude-hud-statusline

A Claude Code plugin that displays a real-time HUD showing context usage, active tools, running agents, and todo progress in your terminal statusline.

aradotso/claude-peers-mcp

Enable multiple Claude Code instances to discover each other and exchange messages in real-time via a local broker daemon and MCP server.

aradotso/clui-cc-claude-overlay

Command Line User Interface for Claude Code — a floating macOS desktop overlay with multi-tab sessions, permission approval UI, voice input, and skills marketplace.

aradotso/cmux-terminal-multiplexer

AI-native terminal multiplexer with programmable socket API, full Playwright-equivalent browser automation, and agent team coordination — built for Claude Code and autonomous agent workflows

aradotso/code-review-graph

Build a persistent knowledge graph of your codebase so Claude reads only what matters — up to 49x fewer tokens on coding tasks.

aradotso/codex-autoresearch-loop

Self-directed iterative research skill for Codex that continuously cycles through modify, verify, retain or discard, and repeat until a measurable goal is reached.

aradotso/copaw-ai-assistant

Personal AI assistant framework supporting multiple chat channels (DingTalk, Feishu, QQ, Discord, etc.) with extensible skills, local/cloud deployment, and cron scheduling.

aradotso/corridorkey-green-screen

AI-powered green screen keyer that unmixes foreground colors and generates clean linear alpha channels using neural networks

aradotso/crucix-intelligence-dashboard

Personal intelligence agent that aggregates 27 OSINT data sources into a self-hosted Jarvis-style dashboard with Telegram/Discord bots, LLM analysis, and real-time alerts.

aradotso/daily-stock-analysis

LLM-powered A/H/US stock intelligent analysis system with multi-source data, real-time news, AI decision dashboards, and multi-channel push notifications via GitHub Actions.

aradotso/deepseek-ocr

Expert skill for using DeepSeek-OCR, a vision-language model for optical character recognition with context optical compression supporting documents, PDFs, and images.

Skills associés