Skip to content

plurigrid/_

 
 

Repository files navigation

Download the Desktop App

Featured on Ben's Bites Join us on Discord X account

Demo


Latest News 🔥

  • [2024/07] 🎁 Screenpipe won Friends (the AI necklace) hackathon (integrations soon)
  • [2024/07] We just launched the desktop app! Download now!

Screenshot 2024-07-30 at 12 13 15


24/7 Screen & Audio Capture

Library to build personalized AI powered by what you've seen, said, or heard. Works with Ollama. Alternative to Rewind.ai. Open. Secure. You own your data. Rust.
We are shipping daily, make suggestions, post bugs, give feedback.

diagram

Why?

Building a reliable stream of audio and screenshot data, where a user simply clicks a button and the script runs in the background 24/7, collecting and extracting data from screen and audio input/output, can be frustrating.

There are numerous use cases that can be built on top of this layer. To simplify life for other developers, we decided to solve this non-trivial problem. It's still in its early stages, but it works end-to-end. We're working on this full-time and would love to hear your feedback and suggestions.

Get started

There are multiple ways to install screenpipe:

  • as a CLI (continue reading), for rather technical users
  • as a paid desktop app with updates, priority support, and features
  • as a free desktop app (but you need to build it yourself). We're 100% OSS.

This is the instructions to install the command line interface.

Struggle to get it running? I'll install it with you in a 15 min call.

CLI installation
MacOS
Option I: brew
  1. Install CLI
brew tap louis030195/screen-pipe https://github.com/louis030195/screen-pipe.git
brew install screenpipe
  1. Run it:
screenpipe 

or if you don't want audio to be recorded

screenpipe --disable-audio

if you want to save OCR data to text file in text_json folder in the root of your project (good for testing):

screenpipe --save-text-files

if you want to run screenpipe in debug mode to show more logs in terminal:

screenpipe --debug

you can combine multiple flags if needed

Didn't work?

Option II: Install from the source
  1. Install dependencies:
brew install pkg-config ffmpeg jq tesseract

Install Rust.

  1. Clone the repo:
git clone https://github.com/louis030195/screen-pipe

This runs a local SQLite DB + an API + screenshot, ocr, mic, stt, mp4 encoding

cd screen-pipe # enter cloned repo
cargo build --release --features metal

Sign the executable to avoid mac killing the process when it's running for too long

codesign --sign - --force --preserve-metadata=entitlements,requirements,flags,runtime ./target/release/screenpipe

Then run it

./target/release/screenpipe # add "--disable-audio" if you don't want audio to be recorded
# "--save-text-files" if you want to save OCR data to text file in text_json folder in the root of your project (good for testing)
# "--debug" if you want to run screenpipe in debug mode to show more logs in terminal

Didn't work?



Windows

NOT RECOMMENDED. Get the desktop app instead.

  1. Install dependencies:
# Install first Chocolatey from https://chocolatey.org/install
choco install ffmpeg pkgconfiglite rust git
  1. Clone the repo:
git clone https://github.com/louis030195/screen-pipe
cd screen-pipe
  1. Run the API:
# This runs a local SQLite DB + an API + screenshot, ocr, mic, stt, mp4 encoding
cargo build --release --features cuda # remove "--features cuda" if you do not have a NVIDIA GPU

# then run it
./target/release/screenpipe
Linux
  1. Install dependencies:
sudo apt-get update
sudo apt-get install -y libavformat-dev libavfilter-dev libavdevice-dev ffmpeg libasound2-dev tesseract-ocr libtesseract-dev

# Install Rust programming language
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh
  1. Clone the repo:
git clone https://github.com/louis030195/screen-pipe
cd screen-pipe
  1. Run the API:
cargo build --release --features cuda # remove "--features cuda" if you do not have a NVIDIA GPU

# then run it
./target/release/screenpipe


By default the data is stored in $HOME/.screenpipe (C:\AppData\Users\<user>\.screenpipe on Windows) you can change using --data-dir <mydir>

run example vercel/ai chatbot web interface

This example uses OpenAI. If you're looking for ollama example check the examples folder

The desktop app fully support OpenAI & Ollama by default.

To run Vercel chatbot, try this:

git clone https://github.com/louis030195/screen-pipe

Navigate to app directory

cd screen-pipe/examples/typescript/vercel-ai-chatbot 

Set up you OPENAI API KEY in .env

echo "OPENAI_API_KEY=XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX" > .env

Didn't work?

Install dependencies and run local web server

npm install 
npm run dev

Vercel App

Claude_prompt

Usage

You can use terminal commands to query and view your data as shown below. Also, we recommend Tableplus.com to view the database, it has a free tier.

Here's a pseudo code to illustrate how to use screenpipe, after a meeting for example (automatically with our webhooks):

// 1h ago
const startDate = "<some time 1h ago..>"
// 10m ago
const endDate = "<some time 10m ago..>"

// get all the screen & mic data from roughly last hour 
const results = fetchScreenpipe(startDate, endDate)

// send it to an LLM and ask for a summary
const summary = fetchOllama("{results} create a summary from these transcriptions")
// or const summary = fetchOpenai(results)

// add the meeting summary to your notes
addToNotion(summary)
// or your favourite note taking app

Or thousands of other usages of all your screen & mic data!

Check which tables you have in the local database
sqlite3 ~/.screenpipe/db.sqlite ".tables" 
Print a sample audio_transcriptions from the database
sqlite3 ~/.screenpipe/db.sqlite ".mode json" ".once /dev/stdout" "SELECT * FROM audio_transcriptions ORDER BY id DESC LIMIT 1;" | jq .

audio_transcriptions

Print a sample frame_OCR_text from the database
sqlite3 ~/.screenpipe/db.sqlite ".mode json" ".once /dev/stdout" "SELECT * FROM ocr_text ORDER BY frame_id DESC LIMIT 1;" | jq -r '.[0].text'

frame_text

Play a sample frame_recording from the database
ffplay "data/2024-07-12_01-14-14.mp4"
Play a sample audio_recording from the database
ffplay "data/Display 1 (output)_2024-07-12_01-14-11.mp4"
Example to query the API
  1. Basic search query
curl "https://localhost:3030/search?q=Neuralink&limit=5&offset=0&content_type=ocr" | jq

"Elon Musk" prompt Elon_Musk_prompt

Other Example to query the API
# 2. Search with content type filter (OCR)
curl "https://localhost:3030/search?q=QUERY_HERE&limit=5&offset=0&content_type=ocr"

# 3. Search with content type filter (Audio)
curl "https://localhost:3030/search?q=QUERY_HERE&limit=5&offset=0&content_type=audio"

# 4. Search with pagination
curl "https://localhost:3030/search?q=QUERY_HERE&limit=10&offset=20"

# 6. Search with no query (should return all results)
curl "https://localhost:3030/search?limit=5&offset=0"


Keep in mind that it's still experimental.

screenpipe_demo2.1.mp4

Use cases:

  • Search
    • Semantic and keyword search. Find information you've forgotten or misplaced
    • Playback history of your desktop when searching for a specific info
  • Automation:
    • Automatically generate documentation
    • Populate CRM systems with relevant data
    • Synchronize company knowledge across platforms
    • Automate repetitive tasks based on screen content
  • Analytics:
    • Track personal productivity metrics
    • Organize and analyze educational materials
    • Gain insights into areas for personal improvement
    • Analyze work patterns and optimize workflows
  • Personal assistant:
    • Summarize lengthy documents or videos
    • Provide context-aware reminders and suggestions
    • Assist with research by aggregating relevant information
    • Live captions, translation support
  • Collaboration:
    • Share and annotate screen captures with team members
    • Create searchable archives of meetings and presentations
  • Compliance and security:
    • Track what your employees are really up to
    • Monitor and log system activities for audit purposes
    • Detect potential security threats based on screen content

Example vercel/ai-chatbot that query screenpipe autonomously

Check this example of screenpipe which is a chatbot that make requests to your data to answer your questions

070424.mp4

Status

Alpha: runs on my computer (Macbook pro m3 32 GB ram) 24/7.

  • Integrations
    • ollama
    • openai
    • Friend wearable
    • Fileorganizer2000
    • mem0
    • supermemory
    • Obsidian
    • Apple shortcut
    • multion
    • iPhone
    • Android
    • Camera
    • Keyboard
    • Browser
    • Pipe Store (a list of "pipes" you can build, share & easily install to get more value out of your screen & mic data without effort)
  • screenshots + OCR
  • audio + STT (works with multi input & output devices, like your iPhone + mac mic)
  • remote capture (run screenpipe on your cloud and it capture your local machine, only tested on Linux) for example when you have low compute laptop
  • optimised screen & audio recording (mp4 encoding, estimating 30 gb/m with default settings)
  • sqlite local db
  • local api
  • Cross platform CLI, desktop app (MacOS, Windows, Linux)
  • Metal, CUDA
  • TS SDK
  • multimodal embeddings
  • cloud storage options (s3, pgsql, etc.)
  • cloud computing options
  • bug-free & stable
  • custom storage settings: customizable capture settings (fps, resolution)
  • data encryption options & higher security
  • fast, optimised, energy-efficient modes
  • webhooks/events (for automations)

Why open source?

Recent breakthroughs in AI have shown that context is the final frontier. AI will soon be able to incorporate the context of an entire human life into its 'prompt', and the technologies that enable this kind of personalisation should be available to all developers to accelerate access to the next stage of our evolution.

Contributing

Contributions are welcome! If you'd like to contribute, please read CONTRIBUTING.md.

FAQ

What's the difference with adept.ai and rewind.ai?
  • adept.ai is a closed product, focused on automation while we are open and focused on enabling tooling & infra for a wide range of applications like adept
  • rewind.ai is a closed product, focused on a single use case (they only focus on meetings now), not customisable, your data is owned by them, and not extendable by developers
Where is the data stored?
  • 100% of the data stay local in a SQLite database and mp4/mp3 files. You own your data
Do you encrypt the data?
  • Not yet but we're working on it. We want to provide you the highest level of security.
How can I customize capture settings to reduce storage and energy usage?
  • You can adjust frame rates and resolution in the configuration. Lower values will reduce storage and energy consumption. We're working on making this more user-friendly in future updates.
What are some practical use cases for screenpipe?
- RAG & question answering
- Automation (write code somewhere else while watching you coding, write docs, fill your CRM, sync company's knowledge, etc.)
- Analytics (track human performance, education, become aware of how you can improve, etc.)
- etc.
- We're constantly exploring new use cases and welcome community input!

Releases

No releases published

Packages

No packages published

Languages

  • Rust 98.8%
  • Ruby 1.2%