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 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
You can install Screanswer using brew
:
brew tap rai62/screanswer
brew install screanswer
Alternatively, you can install Screanswer using go install
:
go install github.com/rai62/screanswer@latest
Before using Screanswer, you need to set up the following environment settings for OpenAI API and GCP.
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
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
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>
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.
Screanswer currently supports the following languages:
- English (
en-US
) - Japanese (
ja-JP
)