% uvx --from open-interpreter interpreter
●
Welcome to Open Interpreter.
──────────────────────────────────────────────────────────────────────────────────────────────
▌ OpenAI API key not found
To use gpt-4o (recommended) please provide an OpenAI API key.
To use another language model, run interpreter --local or consult the documentation at
docs.openinterpreter.com.
──────────────────────────────────────────────────────────────────────────────────────────────
OpenAI API key: ***************************************************
Tip: To save this key for later, run one of the following and then restart your terminal.
MacOS: echo 'export OPENAI_API_KEY=your_api_key' >> ~/.zshrc
Linux: echo 'export OPENAI_API_KEY=your_api_key' >> ~/.bashrc
Windows: setx OPENAI_API_KEY your_api_key
──────────────────────────────────────────────────────────────────────────────────────────────
▌ Model set to gpt-4o
──────────────────────────────────────────────────────────────────────────────────────────────
▌ We're training an open-source language model.
Want to contribute? Run interpreter --model i to use our free, hosted model. Conversations
with this i model will be used for training.
Open Interpreter will require approval before running code.
Use interpreter -y to bypass this.
Press CTRL-C to exit.
> find largest files on my desktop
To find the largest files on your desktop, I will develop a plan with the necessary steps
and then proceed to execute the required code step by step.
Plan
1 Find the Desktop Path: Determine the path to the Desktop directory for the current
user.
2 List Files on Desktop: Traverse the Desktop to find all files and directories.
3 Calculate Sizes: Find the size of each file.
4 Sort by Size: Sort the files based on size to identify the largest ones.
5 Display Results: Show the top largest files.
Let's begin with the first step to find the path to the Desktop directory.
import os
desktop_path = os.path.join(os.path.expanduser('~'), 'Desktop')
desktop_path
Would you like to run this code? (y/n)
y
import os
desktop_path = os.path.join(os.path.expanduser('~'), 'Desktop')
desktop_path
'/Users/simon/Desktop'
The path to your Desktop is /Users/simon/Desktop. Next, I'll list all the files and
directories on your Desktop and calculate their sizes. Let's proceed with that.
import os
# Get the size of the file
file_sizes = {}
desktop_path = '/Users/simon/Desktop'
for root, dirs, files in os.walk(desktop_path):
for name in files:
file_path = os.path.join(root, name)
# Get the size and store it in the dictionary
file_sizes[file_path] = os.path.getsize(file_path)
# Sort files by size in descending order
sorted_files = sorted(file_sizes.items(), key=lambda item: item[1], reverse=True)
# Get the largest 5 files
largest_files = sorted_files[:5]
largest_files
Would you like to run this code? (y/n)
y
import os
# Get the size of the file
file_sizes = {}
desktop_path = '/Users/simon/Desktop'
for root, dirs, files in os.walk(desktop_path):
for name in files:
file_path = os.path.join(root, name)
# Get the size and store it in the dictionary
file_sizes[file_path] = os.path.getsize(file_path)
# Sort files by size in descending order
sorted_files = sorted(file_sizes.items(), key=lambda item: item[1], reverse=True)
# Get the largest 5 files
largest_files = sorted_files[:5]
largest_files
[('/Users/simon/Desktop/Archive/Screen Recording 2024-04-28 at 10.37.20\u202fAM.mov',
4063162333),
('/Users/simon/Desktop/Archive/simon-Gergely-Orosz-podcast.mp4', 1179622482),
('/Users/simon/Desktop/Archive/Descript Recording 2023-12-01 09.58.25.696/screen.mp4',
1014406246),
('/Users/simon/Desktop/Archive/Screen Recording 2024-04-28 at 11.03.15\u202fAM.mov',
355885342),
('/Users/simon/Desktop/Archive/Screen Recording 2024-06-19 at 8.37.57\u202fPM.mov',
289760967)]
Here are the largest files on your Desktop:
1 Screen Recording 2024-04-28 at 10.37.20 AM.mov - 4.06 GB
2 Gergely-Orosz-podcast.mp4 - 1.18 GB
3 Descript Recording 2023-12-01 09.58.25.696/screen.mp4 - 1.01 GB
4 Screen Recording 2024-04-28 at 11.03.15 AM.mov - 355.89 MB
5 Screen Recording 2024-06-19 at 8.37.57 PM.mov - 289.76 MB
If you need more information or further assistance, feel free to ask!
>
CARVIEW |
Select Language
HTTP/2 200
date: Tue, 14 Oct 2025 01:20:26 GMT
content-type: text/html; charset=utf-8
vary: X-PJAX, X-PJAX-Container, Turbo-Visit, Turbo-Frame, X-Requested-With,Accept-Encoding, Accept, X-Requested-With
etag: W/"40f6ec041d3b880ada7e8bccb00004a9"
cache-control: max-age=0, private, must-revalidate
strict-transport-security: max-age=31536000; includeSubdomains; preload
x-frame-options: deny
x-content-type-options: nosniff
x-xss-protection: 0
referrer-policy: origin-when-cross-origin, strict-origin-when-cross-origin
content-security-policy: default-src 'none'; base-uri 'self'; child-src github.githubassets.com github.com/assets-cdn/worker/ github.com/assets/ gist.github.com/assets-cdn/worker/; connect-src 'self' uploads.github.com www.githubstatus.com collector.github.com raw.githubusercontent.com api.github.com github-cloud.s3.amazonaws.com github-production-repository-file-5c1aeb.s3.amazonaws.com github-production-upload-manifest-file-7fdce7.s3.amazonaws.com github-production-user-asset-6210df.s3.amazonaws.com *.rel.tunnels.api.visualstudio.com wss://*.rel.tunnels.api.visualstudio.com github.githubassets.com objects-origin.githubusercontent.com copilot-proxy.githubusercontent.com proxy.individual.githubcopilot.com proxy.business.githubcopilot.com proxy.enterprise.githubcopilot.com *.actions.githubusercontent.com wss://*.actions.githubusercontent.com productionresultssa0.blob.core.windows.net/ productionresultssa1.blob.core.windows.net/ productionresultssa2.blob.core.windows.net/ productionresultssa3.blob.core.windows.net/ productionresultssa4.blob.core.windows.net/ productionresultssa5.blob.core.windows.net/ productionresultssa6.blob.core.windows.net/ productionresultssa7.blob.core.windows.net/ productionresultssa8.blob.core.windows.net/ productionresultssa9.blob.core.windows.net/ productionresultssa10.blob.core.windows.net/ productionresultssa11.blob.core.windows.net/ productionresultssa12.blob.core.windows.net/ productionresultssa13.blob.core.windows.net/ productionresultssa14.blob.core.windows.net/ productionresultssa15.blob.core.windows.net/ productionresultssa16.blob.core.windows.net/ productionresultssa17.blob.core.windows.net/ productionresultssa18.blob.core.windows.net/ productionresultssa19.blob.core.windows.net/ github-production-repository-image-32fea6.s3.amazonaws.com github-production-release-asset-2e65be.s3.amazonaws.com insights.github.com wss://alive.github.com wss://alive-staging.github.com api.githubcopilot.com api.individual.githubcopilot.com api.business.githubcopilot.com api.enterprise.githubcopilot.com; font-src github.githubassets.com; form-action 'self' github.com gist.github.com copilot-workspace.githubnext.com objects-origin.githubusercontent.com; frame-ancestors 'none'; frame-src viewscreen.githubusercontent.com notebooks.githubusercontent.com; img-src 'self' data: blob: github.githubassets.com media.githubusercontent.com camo.githubusercontent.com identicons.github.com avatars.githubusercontent.com private-avatars.githubusercontent.com github-cloud.s3.amazonaws.com objects.githubusercontent.com release-assets.githubusercontent.com secured-user-images.githubusercontent.com/ user-images.githubusercontent.com/ private-user-images.githubusercontent.com opengraph.githubassets.com marketplace-screenshots.githubusercontent.com/ copilotprodattachments.blob.core.windows.net/github-production-copilot-attachments/ github-production-user-asset-6210df.s3.amazonaws.com customer-stories-feed.github.com spotlights-feed.github.com objects-origin.githubusercontent.com *.githubusercontent.com; manifest-src 'self'; media-src github.com user-images.githubusercontent.com/ secured-user-images.githubusercontent.com/ private-user-images.githubusercontent.com github-production-user-asset-6210df.s3.amazonaws.com gist.github.com; script-src github.githubassets.com; style-src 'unsafe-inline' github.githubassets.com; upgrade-insecure-requests; worker-src github.githubassets.com github.com/assets-cdn/worker/ github.com/assets/ gist.github.com/assets-cdn/worker/
server: github.com
content-encoding: gzip
accept-ranges: bytes
set-cookie: _gh_sess=zYWnoDkzzchVuaLjSNyajgFuJE3aGktqLYUxykFCoALa2mABc4bCHk6lAq5Ge5FG6aHLOcpXSR%2FbjW4fUeIjoYUItr%2FCOLbFSTELY9b35E9%2FQWTi6QTLlL0xdqTxrx5g6MDnuRGMDd4P%2FxPo%2FkcTzyPPWsv2YyDyK1RkFbnerWOH%2FMpXY%2B2z0f7AU9sx3%2BNAKXOq0mIiMYQryS6f4O5XoOOV0hjxqiZE4jIFaKxd9tnW44eNXuwGApFvPE2AAh9OyQbo1uCvhPxwjTA%2FVps5sw%3D%3D--RfMI%2FTF9q45K8QEq--TKZYYbRo%2BLWzLsZvzmvROw%3D%3D; Path=/; HttpOnly; Secure; SameSite=Lax
set-cookie: _octo=GH1.1.1609377948.1760404826; Path=/; Domain=github.com; Expires=Wed, 14 Oct 2026 01:20:26 GMT; Secure; SameSite=Lax
set-cookie: logged_in=no; Path=/; Domain=github.com; Expires=Wed, 14 Oct 2026 01:20:26 GMT; HttpOnly; Secure; SameSite=Lax
x-github-request-id: A43E:F851E:18F722:2487F0:68EDA55A
open-interpreter.md · GitHub
Show Gist options
Save simonw/f78a2ebd2e06b821192ec919639959e6 to your computer and use it in GitHub Desktop.
{{ message }}
Instantly share code, notes, and snippets.
simonw/open-interpreter.md Secret
Created
November 24, 2024 18:01
-
Star
0
(0)
You must be signed in to star a gist -
Fork
0
(0)
You must be signed in to fork a gist
-
Save simonw/f78a2ebd2e06b821192ec919639959e6 to your computer and use it in GitHub Desktop.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
You can’t perform that action at this time.
https://simonwillison.net/2024/Nov/24/open-interpreter/