### Initialize and Maintain TypeScript Environment Source: https://github.com/supreme-gg-gg/instagram-cli/blob/main/DEVELOPMENT.md Commands to install project dependencies and ensure code quality through linting and formatting tools like Prettier and XO. ```bash npm ci npm run format npm run lint-check ``` -------------------------------- ### Emoji Rendering Example Source: https://github.com/supreme-gg-gg/instagram-cli/blob/main/instagram-py/README.md Illustrates how text with emoji syntax is rendered as actual emojis. The example shows ':thumbsup:' being converted to '👍'. ```text This is an emoji :thumbsup: ``` -------------------------------- ### Install Instagram CLI with Snap (Linux) Source: https://github.com/supreme-gg-gg/instagram-cli/blob/main/README.md Installs the Instagram CLI on Linux using Snapcraft. This involves packing the snap, installing it, and then running the command. Snap provides a sandboxed environment for the application. ```bash snapcraft pack sudo snap install instagram-cli_1.4.0_amd64.snap --dangerous instagram-cli ``` -------------------------------- ### Set Up Python Virtual Environment with uv Source: https://github.com/supreme-gg-gg/instagram-cli/blob/main/DEVELOPMENT.md Create and activate a virtual environment using 'uv' to manage Python dependencies and isolate the project. This ensures a clean and reproducible development environment. ```bash uv venv .venv uv sync source .venv/bin/activate ``` -------------------------------- ### Utilize Mock System and Production Build Source: https://github.com/supreme-gg-gg/instagram-cli/blob/main/DEVELOPMENT.md Commands to run the CLI with mock data to avoid API rate limits and to generate a production-ready build using esbuild. ```bash npm run start:mock -- --chat npm run build npm link ``` -------------------------------- ### Navigate to Python Project Directory Source: https://github.com/supreme-gg-gg/instagram-cli/blob/main/DEVELOPMENT.md Change the current directory to the 'instagram-py' folder to begin Python client development. ```bash cd instagram-py ``` -------------------------------- ### Render LaTeX Command Source: https://github.com/supreme-gg-gg/instagram-cli/blob/main/instagram-py/README.md Provides an example of rendering and sending LaTeX code as an image within the chat. The LaTeX expression must be enclosed in dollar signs. ```bash :latex $\frac{a}{b} + c = d$ ``` ```bash :latex $\left( \begin{bmatrix} a & b \\ c & d \end{bmatrix} \cdot \begin{bmatrix} e & f \\ g & h \end{bmatrix} \right) + \begin{bmatrix} i & j \\ k & l \end{bmatrix}^{-1} \times \left( \int_0^1 x^2 \, dx \right) + \begin{bmatrix} \sin(\theta) & \cos(\theta) \\ \tan(\phi) & \ln(\psi) \end{bmatrix}$ ``` -------------------------------- ### Install Instagram CLI with Homebrew (TypeScript) Source: https://github.com/supreme-gg-gg/instagram-cli/blob/main/README.md Installs the TypeScript version of the Instagram CLI using Homebrew. This involves tapping a custom repository and then installing the `instagram-cli` formula. It's a convenient way to manage the installation on macOS and Linux. ```bash brew tap supreme-gg-gg/tap brew install instagram-cli ``` -------------------------------- ### Install Instagram CLI from AUR (Arch Linux) Source: https://github.com/supreme-gg-gg/instagram-cli/blob/main/README.md Installs the Instagram CLI on Arch Linux using the AUR helper `yay`. This command fetches and builds the package from the Arch User Repository, providing a community-maintained installation method. ```bash yay -S instagram-cli ``` -------------------------------- ### Import Mock Client for Unit Tests Source: https://github.com/supreme-gg-gg/instagram-cli/blob/main/source/mocks/README.md Example of how to import the mock Instagram client for use in unit tests. This allows for dependency injection of the mock client, ensuring that tests run against simulated data and behavior. ```typescript import {mockClient} from './mocks/index.js'; // Use mockClient in your tests ``` -------------------------------- ### Run and Debug CLI in Development Source: https://github.com/supreme-gg-gg/instagram-cli/blob/main/DEVELOPMENT.md Commands to execute the CLI during development, including watching for file changes, running specific commands, and redirecting error logs. ```bash npm run dev npm run start -- auth login npm run start chat 2> error.log ``` -------------------------------- ### Install Instagram CLI with NPM (TypeScript) Source: https://github.com/supreme-gg-gg/instagram-cli/blob/main/README.md Installs the TypeScript version of the Instagram CLI globally using NPM. Requires Node.js v20 or higher. This command makes the `instagram-cli` executable available in your system's PATH. ```bash npm install -g @i7m/instagram-cli ``` -------------------------------- ### Install Instagram CLI with Pip (Python) Source: https://github.com/supreme-gg-gg/instagram-cli/blob/main/README.md Installs the Python version of the Instagram CLI using pip. This command makes the `instagram` command available in your system's PATH. It's the recommended method for the original Python implementation. ```bash pip install instagram-cli ``` -------------------------------- ### ConfigManager: Configuration Management (TypeScript) Source: https://context7.com/supreme-gg-gg/instagram-cli/llms.txt A singleton class for managing application settings via YAML files. Supports initializing, getting, and setting configuration values using dot notation. ```typescript import { ConfigManager } from './config.js'; const config = ConfigManager.getInstance(); await config.initialize(); // Get configuration values (dot notation) const username = config.get('login.currentUsername'); const feedType = config.get<'list' | 'timeline'>('feed.feedType', 'list'); const debugMode = config.get('advanced.debugMode', false); // Set configuration values await config.set('feed.feedType', 'timeline'); await config.set('image.protocol', 'sixel'); await config.set('login.currentUsername', 'newuser'); // Get entire config object const fullConfig = config.getConfig(); ``` -------------------------------- ### Run Python Tests with pytest Source: https://github.com/supreme-gg-gg/instagram-cli/blob/main/DEVELOPMENT.md Execute basic tests for the Instagram CLI located in the 'instagram-py/tests' directory using 'pytest' within the 'uv' managed environment. ```bash uv run pytest tests/ ``` -------------------------------- ### Example property tracker console output Source: https://github.com/supreme-gg-gg/instagram-cli/blob/main/docs/api-debugging.md The output format displayed in the console when the property tracker identifies new fields in an API response that were not previously present in the schema file. ```json New properties found: read_state, viewer_id, has_newer ``` -------------------------------- ### Run Instagram CLI Commands with uv Source: https://github.com/supreme-gg-gg/instagram-cli/blob/main/DEVELOPMENT.md Execute Instagram CLI commands within the activated virtual environment using 'uv run'. This command ensures that the CLI is run with the correct Python interpreter and dependencies. ```bash uv run instagram ``` -------------------------------- ### Perform Manual Python Code Quality Checks with ruff Source: https://github.com/supreme-gg-gg/instagram-cli/blob/main/DEVELOPMENT.md Manually check and format Python code using 'ruff' to ensure code quality and consistency before committing changes. These commands replace automatic pre-commit hooks. ```bash uv ruff check . uv ruff format . ``` -------------------------------- ### Configure LLM Integration (Python) Source: https://context7.com/supreme-gg-gg/instagram-cli/llms.txt Sets up local or remote LLM endpoints for features like chat summarization. Requires configuration of API keys, models, and system prompts. ```bash instagram config --set llm.endpoint http://localhost:11434/v1/ instagram config --set llm.model llama3 instagram config --set llm.streaming True ``` -------------------------------- ### Manage Configuration (Multi-language) Source: https://context7.com/supreme-gg-gg/instagram-cli/llms.txt Handles application settings, appearance, and behavior. The TypeScript version utilizes a YAML configuration file, while the Python version uses direct command-line flags. ```bash # TypeScript instagram-cli config instagram-cli config image.protocol sixel # Python instagram config --set llm.model llama3 instagram config --list ``` -------------------------------- ### View Media Command Source: https://github.com/supreme-gg-gg/instagram-cli/blob/main/instagram-py/README.md Shows how to view and download media at a specific index within the chat, or open a URL directly in the browser. Requires an index as an argument. ```bash :view ``` -------------------------------- ### Upload Media Command Source: https://github.com/supreme-gg-gg/instagram-cli/blob/main/instagram-py/README.md Explains the command for uploading media. It can be used with an optional path to upload a specific file, or without a path to open a file navigator. ```bash :upload ``` ```bash :upload ``` -------------------------------- ### Configure Instagram CLI Settings Source: https://context7.com/supreme-gg-gg/instagram-cli/llms.txt Demonstrates how to use the Config class to retrieve and update application settings, such as LLM endpoints and login credentials. ```python from instagram.configs import Config config = Config() # Get configuration values endpoint = config.get('llm.endpoint') username = config.get('login.current_username') # Set configuration values config.set('llm.model', 'llama3') config.set('llm.streaming', True) ``` -------------------------------- ### View Transition Logic (Enter/Escape) Source: https://github.com/supreme-gg-gg/instagram-cli/blob/main/docs/chat-ui-design.md Outlines the process for transitioning between the thread list view and the chat view. It details the state changes and rendering actions that occur when entering or exiting a chat. ```text View Transitions Enter in thread list → clear thread list → load messages → render chat view Escape in chat → clear chat view → reset state → render thread list ``` -------------------------------- ### Thread List Navigation Logic Source: https://github.com/supreme-gg-gg/instagram-cli/blob/main/docs/chat-ui-design.md Illustrates the sequence of actions for navigating through the thread list. It details how key presses update the selected index, manage the visible window, and trigger re-renders. ```text Thread List Navigation j/k pressed → update selectedThreadIndex → check if selection is in window → if not, update threadWindowStart → re-render with new window ``` -------------------------------- ### InstagramClient: Real-time Events and Cleanup (TypeScript) Source: https://context7.com/supreme-gg-gg/instagram-cli/llms.txt Handles real-time event subscriptions via MQTT and provides methods for logging out and cleaning up client resources. ```typescript // Real-time events (when MQTT is enabled) client.on('message', (message) => { console.log('New message:', message); }); client.on('reaction', (reactionData) => { console.log('New reaction:', reactionData); }); client.on('threadSeen', (seenData) => { console.log('Thread seen:', seenData); }); client.on('realtimeStatus', (status) => { console.log('Connection status:', status); // 'connecting' | 'connected' | 'disconnected' | 'error' }); // Cleanup await client.logout('username'); await client.shutdown(); InstagramClient.cleanupSessions(); InstagramClient.cleanupCache(); InstagramClient.cleanupLogs(); ``` -------------------------------- ### ScrollView Mouse Event Handling (JSX) Source: https://github.com/supreme-gg-gg/instagram-cli/blob/main/docs/mouse-use-design.md Example of how ScrollView handles mouse events for scrolling and child clicks. It uses `mouseScrollLines` for scroll wheel events and `onChildClick` with layout utilities to identify clicked children. ```tsx handleMessageClick(index)} > ``` -------------------------------- ### Configuration Command Source: https://github.com/supreme-gg-gg/instagram-cli/blob/main/instagram-py/README.md Details the command for modifying application configurations directly within the chat. It allows setting key-value pairs for various settings. ```bash :config = ``` -------------------------------- ### ClientWrapper: Login and Cleanup (Python) Source: https://context7.com/supreme-gg-gg/instagram-cli/llms.txt Python wrapper for Instagram API interactions, handling login with credentials or sessions and providing a cleanup utility for session files. ```python from instagram.client import ClientWrapper, cleanup # Create client with username client = ClientWrapper(username='myusername') # Login with credentials cl = client.login( username='myusername', password='mypassword', refresh_session=False, # Try session first, then credentials verification_code='123456' # Optional 2FA code ) # Login with existing session cl = client.login_by_session() # Logout client.logout() # Cleanup all session files cleanup(delete_all=True) ``` -------------------------------- ### View Usage Analytics (Python) Source: https://context7.com/supreme-gg-gg/instagram-cli/llms.txt Tracks and displays usage patterns for the Instagram CLI over a specified number of days. ```bash instagram stats instagram stats --days 30 ``` -------------------------------- ### Schedule Message Command Source: https://github.com/supreme-gg-gg/instagram-cli/blob/main/instagram-py/README.md Demonstrates the syntax for scheduling a message to be sent at a specific time. Supports both date and time, or just time for the current day. Messages are sent in 24-hour format and are restored upon application restart. ```bash :schedule "" ``` -------------------------------- ### Basic Chat Command Syntax Source: https://github.com/supreme-gg-gg/instagram-cli/blob/main/instagram-py/README.md Defines the general syntax for all chat commands in the application. It specifies the use of a colon prefix, followed by the command name, arguments, and optional long arguments which may require special enclosures for strings or LaTeX. ```bash :command ``` -------------------------------- ### Run Mock Instagram CLI Application Source: https://github.com/supreme-gg-gg/instagram-cli/blob/main/source/mocks/README.md Commands to build and run the mock Instagram CLI application. The mock client replaces real API calls, allowing for isolated testing. Specific flags can be used to test different views like the media feed or story. ```bash npm run build npm run start:mock # this will run cli.mock.js instead of cli.js npm run start:mock -- --feed # to test the media feed view npm run start:mock -- --story # to test the story view ``` -------------------------------- ### Execute Advanced Chat Commands (Python) Source: https://context7.com/supreme-gg-gg/instagram-cli/llms.txt Provides power-user functionality for the Python client, including LaTeX rendering, chat summarization via LLM, message scheduling, and in-chat configuration. These commands are executed directly within the chat interface. ```bash :latex $\frac{a}{b} + c = d$ :summarize 50 :schedule 14:30 "Don't forget the meeting!" :config llm.model=llama3 :view 0 :back ``` -------------------------------- ### Basic Instagram CLI Commands Source: https://github.com/supreme-gg-gg/instagram-cli/blob/main/README.md Demonstrates essential commands for interacting with the Instagram CLI. These include displaying help information, managing authentication, and launching the main TUI interfaces for chat, feed, stories, and notifications. ```bash instagram-cli # display title art instagram-cli --help # view available commands # Authentication instagram-cli auth login --username # login with username and password instagram-cli auth logout # logout and removes session instagram-cli auth switch # switch to another saved account instagram-cli auth whoami # display current default user # Launches TUI interfaces instagram-cli chat -u -t # start chat interface instagram-cli feed # view posts from people you follow instagram-cli stories # view stories from people you follow (BETA) instagram-cli notify # view notifications (inbox, followers, mentions) ``` -------------------------------- ### Initialize Logger Manually Source: https://github.com/supreme-gg-gg/instagram-cli/blob/main/docs/logging.md While the logger initializes automatically at startup, it can be manually triggered using the initializeLogger function. ```typescript import {initializeLogger} from './utils/logger.js'; await initializeLogger(); ``` -------------------------------- ### Manage Instagram Feed and Stories (TypeScript) Source: https://context7.com/supreme-gg-gg/instagram-cli/llms.txt Commands for browsing Instagram feeds and viewing stories. Supports multiple display modes and lazy-loading for efficient media consumption. ```bash instagram-cli feed instagram-cli feed myotheraccount instagram-cli stories ``` -------------------------------- ### Configure Mock View in React Component Source: https://github.com/supreme-gg-gg/instagram-cli/blob/main/source/mocks/README.md Configuration object for the mock application's view. This allows developers to switch between different UI views for testing purposes, such as the chat interface or the media feed interface, by modifying the 'view' property. ```typescript const MOCK_CONFIG = { view: 'chat' as 'chat' | 'media' // Change this line }; // Available views: // - "chat" - Test the chat interface // - "media" - Test the media feed interface ``` -------------------------------- ### InstagramClient: Media and Stories (TypeScript) Source: https://context7.com/supreme-gg-gg/instagram-cli/llms.txt Provides functionality to download media from messages and retrieve/manage user stories. ```typescript // Download media from message const filePath = await client.downloadMediaFromMessage(message, '/downloads/media'); // Stories const reels = await client.getReelsTray(); // Get users with active stories const stories = await client.getStoriesForUser(userId); // Get stories for specific user await client.markStoriesAsSeen(stories); // Mark stories as viewed ``` -------------------------------- ### InstagramClient: Login and Authentication (TypeScript) Source: https://context7.com/supreme-gg-gg/instagram-cli/llms.txt Handles logging into the Instagram private API using credentials or saved sessions. Includes support for two-factor authentication (2FA) and checkpoint challenges. ```typescript import { InstagramClient } from './client.js'; // Create client instance const client = new InstagramClient('optional_username'); // Login with credentials const result = await client.login('username', 'password', { initializeRealtime: true // Enable MQTT for real-time updates }); if (result.success) { console.log(`Logged in as @${result.username}`); } else if (result.twoFactorInfo) { // Handle 2FA const twoFactorResult = await client.twoFactorLogin({ verificationCode: '123456', twoFactorIdentifier: result.twoFactorInfo.two_factor_identifier, totp_two_factor_on: result.twoFactorInfo.totp_two_factor_on }); } else if (result.checkpointError) { // Handle checkpoint challenge await client.startChallenge(); const challengeResult = await client.sendChallengeCode('verification_code'); } // Login with saved session const sessionResult = await client.loginBySession({ initializeRealtime: true }); ``` -------------------------------- ### Delay Message Command Source: https://github.com/supreme-gg-gg/instagram-cli/blob/main/instagram-py/README.md Illustrates the command for delaying the sending of a message. Similar to scheduling, it takes a duration in seconds and the message content, enclosed in quotes if it contains spaces. ```bash :delay <seconds> "<message>" ``` -------------------------------- ### Summarize Chat Command Source: https://github.com/supreme-gg-gg/instagram-cli/blob/main/instagram-py/README.md Demonstrates the command to generate a summary of the chat history using an LLM. It can optionally take a number to limit the summarization to the most recent messages. ```plaintext :summarize ``` ```plaintext :summarize n ``` -------------------------------- ### View Notifications (Multi-language) Source: https://context7.com/supreme-gg-gg/instagram-cli/llms.txt Displays the Instagram activity dashboard including likes, comments, and mentions. Available for both TypeScript and Python clients. ```bash # TypeScript instagram-cli notify # Python instagram notify ``` -------------------------------- ### Log Application Events and Errors Source: https://github.com/supreme-gg-gg/instagram-cli/blob/main/docs/logging.md Demonstrates how to log various severity levels including info, warnings, debug messages, and errors with stack traces. ```typescript // Logging Errors try { await client.sendMessage(threadId, text); } catch (error) { logger.error('Failed to send message', error); } // Logging Warnings logger.warn('MQTT connection lost, using fallback API'); // Logging Info logger.info('User logged in successfully'); // Logging Debug logger.debug('Processing message from thread 12345'); ``` -------------------------------- ### DirectMessages: Fetching Chats (Python) Source: https://context7.com/supreme-gg-gg/instagram-cli/llms.txt Manages direct message threads and conversations in Python, allowing fetching of recent chats with configurable limits for the number of chats and messages per chat. ```python from instagram.api import DirectMessages, DirectChat # Initialize with authenticated client dm = DirectMessages(client) # Fetch recent chats chats = dm.fetch_chat_data(num_chats=20, num_message_limit=50) ``` -------------------------------- ### Instagram CLI Cleanup Commands Source: https://context7.com/supreme-gg-gg/instagram-cli/llms.txt Commands to clean up session files, cache, and media associated with the Instagram CLI. ```bash instagram cleanup # Clean session files instagram cleanup --all # Clean sessions, cache, and media files ``` -------------------------------- ### Perform Cleanup (TypeScript) Source: https://context7.com/supreme-gg-gg/instagram-cli/llms.txt Removes cached data, session files, and temporary media to maintain application performance. ```bash instagram-cli cleanup ``` -------------------------------- ### Access and Monitor Log Files Source: https://github.com/supreme-gg-gg/instagram-cli/blob/main/docs/logging.md Common shell commands to view, monitor, and search through session log files stored in the ~/.instagram-cli/logs/ directory. ```bash # View latest log ls -lt ~/.instagram-cli/logs/ | head -1 cat ~/.instagram-cli/logs/session-*.log # Real-time monitoring tail -f ~/.instagram-cli/logs/session-*.log # Search for errors grep "ERROR" ~/.instagram-cli/logs/session-*.log ``` -------------------------------- ### Manage Scheduled Messages (Python) Source: https://context7.com/supreme-gg-gg/instagram-cli/llms.txt Allows users to list and cancel pending messages scheduled for future delivery. ```bash instagram schedule ls instagram schedule cancel 0 ``` -------------------------------- ### Chat Navigation and Scrolling Logic Source: https://github.com/supreme-gg-gg/instagram-cli/blob/main/docs/chat-ui-design.md Describes the navigation flow within the chat view, focusing on scrolling behavior. It explains how scrolling actions trigger API calls for older messages or jump to specific positions, and how boundary conditions are handled. ```text Chat Navigation :j/:k pressed → call scrollViewRef.scrollTo() → scroll by 75% of viewport height → if at top boundary, trigger onScrollToStart → load older messages from API → re-render with new messages :J/:K pressed → call scrollToEnd()/scrollToStart() → jump to bottom/top of content → update scroll offset immediately (doesn't fetch more messages) ``` -------------------------------- ### Layout Utilities (TypeScript) Source: https://github.com/supreme-gg-gg/instagram-cli/blob/main/docs/mouse-use-design.md Provides functions for measuring the absolute layout of Ink elements and finding child elements at specific coordinates. These are crucial for translating raw mouse input into component-specific interactions. ```typescript // source/ui/hooks/use-content-size.ts // Layout utilities: `measureAbsoluteLayout`, `findChildAtPosition` ``` -------------------------------- ### Configure API Logging via Environment Variables Source: https://github.com/supreme-gg-gg/instagram-cli/blob/main/docs/logging.md Control the verbosity of Instagram API network requests by setting the DEBUG environment variable before executing CLI commands. ```bash # Enable only HTTP logs DEBUG=ig:http instagram-cli chat # Disable API logging DEBUG= instagram-cli chat # Enable all debug output DEBUG=* instagram-cli chat ``` -------------------------------- ### InstagramClient: Direct Messaging (TypeScript) Source: https://context7.com/supreme-gg-gg/instagram-cli/llms.txt Manages direct message threads, including fetching, searching, sending messages, replies, reactions, and media. ```typescript // Get inbox threads with pagination const { threads, hasMore } = await client.getThreads(false); // false = fresh load const moreThreads = await client.getThreads(true); // true = load more // Search threads by title (fuzzy search) const searchResults = await client.searchThreadsByTitle('Family', { threshold: 0.4, // Fuse.js threshold (0 = exact, 1 = match all) maxThreadsToSearch: 40 }); // Search by username const userResults = await client.searchThreadByUsername('johndoe', { forceExact: true // Require exact username match }); // Get or create thread for a user const thread = await client.ensureThread(userPk); // Get messages from a thread const { messages, cursor } = await client.getMessages(threadId, optionalCursor); // Send messages await client.sendMessage(threadId, 'Hello!'); await client.sendReply(threadId, 'Great point!', replyToMessage); await client.sendReaction(threadId, itemId, '❤️'); await client.sendPhoto(threadId, '/path/to/image.jpg'); await client.sendVideo(threadId, '/path/to/video.mp4'); // Unsend a message await client.unsendMessage(threadId, messageId); ``` -------------------------------- ### Define AutocompleteState Interface Source: https://github.com/supreme-gg-gg/instagram-cli/blob/main/docs/chat-commands-design.md Defines the state structure for the autocomplete system, tracking active status, suggestions, and query parameters. ```typescript interface AutocompleteState { isActive: boolean; suggestions: string[]; selectedIndex: number; triggerPosition: number; query: string; } ``` -------------------------------- ### Mouse Provider and Hook (TypeScript) Source: https://github.com/supreme-gg-gg/instagram-cli/blob/main/docs/mouse-use-design.md Defines the `MouseProvider` context and the `useMouse()` hook, which are central to how components subscribe to and handle mouse events in the Ink framework. ```typescript // source/ui/context/mouse-context.tsx // `MouseProvider` context and `useMouse()` hook ``` -------------------------------- ### Proper Error Logging in TypeScript Source: https://github.com/supreme-gg-gg/instagram-cli/blob/main/docs/logging.md Demonstrates how to properly log errors using the `createContextualLogger` and `logger.error` methods in TypeScript. This ensures that full error objects, including stack traces, are captured for debugging. It also shows how to log informational messages for successful operations. ```typescript export class MyService { private readonly logger = createContextualLogger('MyService'); async performAction() { try { await this.riskyOperation(); this.logger.info('Action completed successfully'); } catch (error) { this.logger.error('Action failed', error); throw error; } } } ``` -------------------------------- ### Implement Contextual Logging in TypeScript Source: https://github.com/supreme-gg-gg/instagram-cli/blob/main/docs/logging.md Use the createContextualLogger utility to instantiate loggers within classes or functions. This ensures logs are tagged with the appropriate module context for easier debugging. ```typescript import {createContextualLogger} from './utils/logger.js'; // In a class private readonly logger = createContextualLogger('InstagramClient'); // In a function const logger = createContextualLogger('myFunction'); ``` -------------------------------- ### ANSI Mouse Protocol Parser (TypeScript) Source: https://github.com/supreme-gg-gg/instagram-cli/blob/main/docs/mouse-use-design.md Low-level parser for handling mouse events using ANSI escape sequences, supporting both SGR and X11 formats. This is the foundation for capturing raw mouse input. ```typescript // source/utils/mouse.ts // Low-level ANSI mouse protocol parser (SGR + X11 formats) ```