🚀 Big News: Socket Acquires Coana to Bring Reachability Analysis to Every Appsec Team.Learn more
Socket
Book a DemoInstallSign in
Socket

github.com/rai62/screanswer

Package Overview
Dependencies
Alerts
File Explorer
Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

github.com/rai62/screanswer

v1.1.0
Source
Go
Version published
Created
Source

Screanswer

Screanswer is a command line tool designed to provide a convenient way of answering text on the screen for macOS users. It is an easy-to-use tool that can be used for a variety of purposes, such as searching sentences or terms, copying texts to the clipboard, and more.

screanswer

Features

Screanswer is designed to be fast, efficient, and user-friendly. It includes the following features:

  • Capturing text on the screen and copying it to the clipboard
  • Answering the text on the screen automatically using chat AI
  • Reading the output aloud in a system voice

Installation

Homebrew

You can install Screanswer using brew:

brew tap rai62/screanswer
brew install screanswer

Go install

Alternatively, you can install Screanswer using go install:

go install github.com/rai62/screanswer@latest

Usage

Before using Screanswer, you need to set up the following environment settings for OpenAI API and GCP.

Setting up OpenAI API Key for Answering Text

To enable text answering functionality, register your API key for OpenAI API in the environment variable OPENAI_API_KEY.

export OPENAI_API_KEY=your_api_key

Setting up GCP for Image-to-Text and Text-to-Speech

To enable image-to-text and text-to-speech functionality, create a GCP project and enable the following APIs:

Please refer to the official documentation for more information. You only need to complete the Create a project and Enable the API sections.

After setting up GCP, register your credentials for GCP in the environment variable GOOGLE_APPLICATION_CREDENTIALS. Please see the official documentation.

export GOOGLE_APPLICATION_CREDENTIALS=/path/to/your/credentials.json

Commands

Here are some commands to use Screanswer:

  • To capture, answer, and read text on the screen: screanswer
  • To capture and copy text on the screen: screanswer capture
  • To get an answer to text: screanswer answer <text>
  • To read text aloud: screanswer speak <languageCode> <text>

Examples

Here are some examples of how to use Screanswer:

  • To capture, answer, and read text on the screen:
screanswer

This will capture text on the screen, answer it using chat AI, and then read the answer aloud in a system voice.

  • To capture and copy text on the screen:
screanswer capture

This will capture text on the screen and copy it to the clipboard.

  • To get an answer to text:
screanswer answer 'What is the capital of France?'

This will answer the specified text using chat AI and print the answer to the terminal.

  • To read text aloud:
screanswer speak en-US 'Hello, world!'

This will read the specified text "Hello, world!" in English using a system voice.

Supported Languages (Language Codes)

Screanswer currently supports the following languages:

  • English (en-US)
  • Japanese (ja-JP)

FAQs

Package last updated on 02 Jan 2025

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts