Skip to content

Instantly share code, notes, and snippets.

View Shaharyar-developer's full-sized avatar

Muhammad Shaharyar Shaharyar-developer

View GitHub Profile
/// <reference types="bun-types" />
import 'dotenv/config';
import { Command } from 'commander';
import { input, select, confirm } from '@inquirer/prompts';
import blessed from 'blessed';
import chalk from 'chalk';
import Plunk from '@plunk/node';
import { authenticate } from '@google-cloud/local-auth';
import { createOpenRouter } from '@openrouter/ai-sdk-provider';
import { generateObject, streamText } from 'ai';
@Shaharyar-developer
Shaharyar-developer / cache.ts
Last active November 18, 2025 18:37
Compression-first cache implementation in TS with ioredis
import { getIORedisClient } from "./redis";
import logger from "@workspace/utils/logger";
import { promisify } from "util";
import { gzip, gunzip } from "zlib";
const gzipAsync = promisify(gzip);
const gunzipAsync = promisify(gunzip);
// Configuration interface
export interface CacheConfig {