npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

mani-screensense

v1.2.0

Published

Intelligent screen text extraction library with OCR, hotkeys, batch processing, and AI capabilities

Downloads

205

Readme

mani-screensense 👁️

Intelligent Screen Text Extraction Library

npm version License: MIT

A powerful Node.js library for OCR, screen capture, hotkeys, batch processing, and more. Extract text from images or your screen with just one line of code!

⚡ Installation

npm install mani-screensense

🚀 Quick Start (One-Liners!)

const { screenToText, imageToText, screenshot } = require('mani-screensense');

// 📸 Capture screen → text
const text = await screenToText();

// 🖼️ Image file → text  
const text = await imageToText('./document.png');

// 📷 Save screenshot
await screenshot('./screen.png');

🖥️ CLI Tool

npm install -g mani-screensense

# Commands
screensense capture              # Screen → text
screensense read ./doc.png       # Image → text
screensense screenshot           # Save screenshot
screensense capture --copy       # Copy to clipboard
screensense read ./jp.png -l jpn # Japanese OCR

🔑 Hotkey Support

Register keyboard shortcuts to trigger actions:

const { createHotkeyManager } = require('mani-screensense');

const hotkeys = createHotkeyManager({
  capture: 'ctrl+shift+s',   // Capture screen
  region: 'ctrl+shift+r',    // Capture region
  clipboard: 'ctrl+shift+c'  // Read clipboard
});

hotkeys.on('registered', (key) => {
  console.log(`Hotkey registered: ${key}`);
});

hotkeys.startListening();

📁 Batch Processing

Process multiple images at once:

const { batchProcess, batchProcessFolder } = require('mani-screensense');

// Process multiple files
const results = await batchProcess([
  './doc1.png',
  './doc2.png',
  './doc3.png'
], {
  language: 'eng',
  onProgress: (current, total, file) => {
    console.log(`Processing ${current}/${total}: ${file}`);
  }
});

// Or process entire folder
const results = await batchProcessFolder('./documents', {
  format: 'json',
  outputPath: './results.json'
});

👁️ File Watcher

Auto-process new images in a folder:

const { watchFolder } = require('mani-screensense');

const watcher = await watchFolder('./inbox', (event) => {
  if (event.type === 'added') {
    console.log(`New file: ${event.file}`);
    console.log(`Text: ${event.result.text}`);
  }
});

// Stop watching
await watcher.stop();

🖼️ Image Preprocessing

Enhance images for better OCR:

const { preprocessImage, autoEnhance, presets } = require('mani-screensense');

// Auto-enhance (recommended)
const enhanced = await autoEnhance('./blurry.png');

// Manual options
const processed = await preprocessImage('./image.png', {
  grayscale: true,
  sharpen: true,
  contrast: 30,
  denoise: true
});

// Use presets
const docImage = await presets.document('./scan.png');
const photoText = await presets.photo('./photo.png');
const lowQuality = await presets.lowQuality('./bad.png');

📤 Export Formats

Convert results to different formats:

const { analyzeImage, toJSON, toCSV, toHTML, toMarkdown } = require('mani-screensense');

const result = await analyzeImage('./doc.png');

// Different formats
const json = toJSON(result, { includeConfidence: true });
const csv = toCSV(result);      // Words with positions
const html = toHTML(result);    // Styled HTML page
const md = toMarkdown(result);  // Markdown format

🛠️ Utility Functions

const { 
  extractEmails,
  extractUrls,
  extractDates,
  extractPhoneNumbers,
  detectLanguage,
  copyToClipboard,
  detectCode
} = require('mani-screensense');

const text = "Contact: [email protected], visit https://example.com";

extractEmails(text);     // ['[email protected]']
extractUrls(text);       // ['https://example.com']
extractDates(text);      // Finds dates in various formats
detectLanguage(text);    // 'eng'
detectCode(text);        // true if contains code

🌍 Supported Languages

| Code | Language | Code | Language | |------|----------|------|----------| | eng | English | jpn | Japanese | | spa | Spanish | kor | Korean | | fra | French | chi_sim | Chinese | | deu | German | ara | Arabic | | ita | Italian | hin | Hindi | | por | Portuguese | rus | Russian |


📚 All Features

| Feature | Description | |---------|-------------| | One-liners | screenToText(), imageToText(), screenshot() | | CLI Tool | screensense capture, screensense read | | Hotkeys | Register keyboard shortcuts | | Batch Processing | Process multiple images | | File Watcher | Auto-process new images | | Preprocessing | Enhance images for better OCR | | Export Formats | JSON, CSV, HTML, Markdown, XML | | Utilities | Extract emails, URLs, dates, code detection |


📄 License

MIT © Mani Reddy