Python &
CLI Guide.
Many of the best OSINT tools run from the command line. This guide gets you from zero to running your first tool — no prior experience needed.
What is Python?
Python is a programming language that many OSINT tools are written in. You don't need to learn to code — you just need Python installed so your computer can run those tools.
Think of it like a engine. The tool is the car. You don't need to build the engine — you just need it installed.
Always download Python from the official source: python.org/downloads. Download the latest stable version (3.x).
- 01Go to python.org/downloads and download the latest version for Windows.
- 02Critical: On the installer's first screen, check
Add Python to PATHbefore clicking Install. If you miss this, nothing will work. - 03Click Install Now and wait for it to finish.
- 04Verify the install — open CMD or PowerShell and type
python --version. You should see something likePython 3.12.4.
CMD vs PowerShell
Windows has two command line interfaces. For OSINT tools, either works — but they have small differences worth knowing.
Press Win + R → type cmd → press Enter
or search "Command Prompt" in the Start menu
CMD is the older, simpler interface. Most OSINT tool instructions are written for CMD. If a guide says "open a terminal", CMD works fine.
cd C:\Users\You\Desktop\sherlock # navigate to folder cd .. # go up one folder dir # list files in current folder cls # clear the screen python sherlock.py username # run a script
Press Win + X → select "Windows PowerShell"
or search "PowerShell" in the Start menu
PowerShell is more powerful and modern. Some tools work better here. The main difference you'll notice: use ./ instead of just the script name.
cd C:\Users\You\Desktop\sherlock # navigate to folder cd .. # go up one folder ls # list files (not dir) cls # clear the screen python ./sherlock.py username # run a script
Getting a tool from GitHub
Most OSINT tools live on GitHub — a platform where developers share code. You don't need a GitHub account to download tools.
There are two ways to get a tool. The easiest is downloading a ZIP. The better way is using Git, which makes updating the tool later much easier.
- 01Go to the tool's GitHub page (e.g.
github.com/sherlock-project/sherlock). - 02Click the green Code button → click Download ZIP.
- 03Extract the ZIP to a folder you'll remember — e.g.
C:\OSINT\sherlock. - 04Open CMD, navigate to that folder with
cd C:\OSINT\sherlock, then follow the tool's install instructions.
- 01Install Git from git-scm.com. Use default settings during install.
- 02Open CMD in the folder where you want to save the tool.
- 03Run
git clone https://github.com/sherlock-project/sherlock(replace URL with the tool you want). - 04To update later:
cd sherlockthengit pull. Done — always the latest version.
Installing dependencies with pip
Most tools need extra Python packages to work. These are listed in a file called requirements.txt. You install them with pip — Python's package manager.
pip install -r requirements.txt
Some tools have their own install command listed in their README. Always check the README first — it's the page you see when you open a GitHub repo.
pip install requests
pip install beautifulsoup4
pip install sherlock-project # some tools can be installed directly
If pip isn't recognized, try pip3 instead. On some systems Python 3 uses pip3.
Virtual environments
Some tools conflict with each other's dependencies. A virtual environment is an isolated space for each tool — like a separate room so they don't interfere. Optional, but good practice.
python -m venv venv # create it (run once) venv\Scripts\activate # activate it (CMD) venv\Scripts\Activate.ps1 # activate it (PowerShell) pip install -r requirements.txt # now install inside it deactivate # exit the environment
You'll know it's active when you see (venv) at the start of your command line. Always activate before running the tool.
Running a tool
Once installed, most tools follow the same pattern — Python, then the script name, then your input.
python toolname.py [your input]
python sherlock.py johndoe # search username python holehe.py [email protected] # check email python maigret.py johndoe --all-sites # detailed username search python theHarvester.py -d domain.com -b google # domain harvest
Most tools also have a help flag that lists all available options:
python sherlock.py --help
Common errors & fixes
Add Python to PATH on the first screen. Alternatively, try python3 instead of python.pip install requests (replace with whatever module name it says). Or run pip install -r requirements.txt again.pip3 instead of pip. If that also fails, run python -m pip install [package].Set-ExecutionPolicy RemoteSigned. Then try activating the virtual environment again.cd to navigate to where the tool is. Type dir (CMD) or ls (PowerShell) to see what's in the current folder.python2 toolname.py or check the tool's README for version requirements.Quick reference
python --version # check Python version pip --version # check pip version pip install -r requirements.txt # install tool dependencies pip install packagename # install a single package pip list # see installed packages pip update packagename # update a package python toolname.py --help # see tool options cd foldername # enter a folder cd .. # go up one folder dir # list files (CMD) ls # list files (PowerShell) cls # clear screen git clone [url] # download a GitHub repo git pull # update a cloned repo
Still stuck? Use the contact form and describe the error you're seeing — include the full error message and which tool you're trying to run.