____ ____ ___ _ _ _____ ____ ____
/ __ \/ __ `__ \ | | |_ _| / __ \/ __ \
/ / / / / / / / / | | | | | / / / / / / /
/ /_/ / /_/ /_/ /| |_| | | | / /_/ / /_/ /
\____/\__,_|\__,_| \__,_| |_| \____/\____/
Advanced identity correlation and cognitive profiling CLI
OSINT-D2 ingests usernames and/or emails, aggregates public evidence from multiple OSINT sources, and enriches the dataset with targeted scrapers. A DeepSeek/OpenAI-compatible analyst can turn the evidence into hypothesis-driven intelligence. The CLI defaults to English while still supporting a full Spanish experience (--language es).
- Multi-source correlation that links usernames, emails, and derived aliases in a single run.
- Modular async pipeline with reusable services, Sherlock integration, and support for WhatsMyName-style site lists.
- Cognitive AI analysis (
--deep-analyze) generating structured summaries, highlights, and confidence levels. - Professional dossier exports (JSON + PDF/HTML) suitable for incident response or executive briefings.
- Typer + Rich CLI with contextual help, interactive wizard, and JSON-first automation outputs.
Prerequisites
- Python 3.11 or newer
- Poetry
- WeasyPrint system dependencies (for PDF generation)
PDF export uses WeasyPrint and requires system libraries.
Ubuntu/Debian:
sudo apt-get update
sudo apt-get install -y \
libcairo2 libpango-1.0-0 libpangoft2-1.0-0 \
libgdk-pixbuf2.0-0 libffi-dev shared-mime-infoFedora:
sudo dnf install -y cairo pango gdk-pixbuf2 libffi shared-mime-infoArch:
sudo pacman -S --needed cairo pango gdk-pixbuf2 libffi shared-mime-infoSetup
git clone https://github.com/Doble-2/osint-d2.git
cd osint-d2
poetry installVerify your environment:
poetry run osint-d2 doctor runCopy .env.example to .env and configure at least:
- (Optional)
OSINT_D2_AI_API_KEY(required only if you want remote AI)
Optional overrides:
OSINT_D2_AI_BASE_URLOSINT_D2_AI_MODELOSINT_D2_AI_TIMEOUT_SECONDSOSINT_D2_DEFAULT_LANGUAGE(enores)
AI note:
- Remote AI requires a provider account + API key (even on free tiers).
- If no key is configured, OSINT-D2 automatically falls back to a local heuristic summary (no network calls).
PyInstaller / non-Python users (recommended):
- Run
osint-d2 doctor setup-aionce and paste your provider key. - This saves a user config
.envfile (no manual editing).
User config .env locations:
- Linux:
~/.config/osint-d2/.env(or$XDG_CONFIG_HOME/osint-d2/.env) - macOS:
~/Library/Application Support/osint-d2/.env - Windows:
%APPDATA%\\osint-d2\\.env
PDF exports rely on WeasyPrint 60.1 and pydyf < 0.11 for compatibility.
Interactive wizard (default command):
poetry run osint-d2Direct help:
poetry run osint-d2 --help
poetry run osint-d2 hunt --helpRemote AI setup (no manual .env editing):
poetry run osint-d2 doctor setup-aiOne-shot preset (prompts for key if missing):
poetry run osint-d2 scan-email user@example.com --deep-analyze --ai-provider groqFull hunt with AI + breaches:
poetry run osint-d2 hunt -e user@example.com --ai --ai-provider groq --breach-check --no-ai-save| Command | Summary |
|---|---|
wizard |
Guided workflow asking for usernames/emails, language, Sherlock, site-lists, and exports. |
scan |
Lightweight username sweep across built-in sources. |
scan-email |
Email-centric scan with optional local-part username pivot. |
hunt |
Full pipeline orchestrating usernames, emails, Sherlock, and site-lists with optional AI. |
analyze |
Re-run AI analysis against a previously exported JSON dossier. |
doctor |
Environment diagnostics (HTTP connectivity, WeasyPrint smoke test, config checks). |
Key flags (apply to the relevant commands):
--site-lists / --no-site-listsenables large data-driven site manifests.--sherlock / --no-sherlockdownloads and executes the Sherlock manifest (~400 sites).--strict / --no-strictapplies defensive heuristics to reduce false positives.--export-jsonwritesreports/<target>.json.--export-pdfwritesreports/<target>.pdf(falls back to HTML if PDF fails).--format jsonproduces machine-friendly output (recommended for automation).-l, --language [es|en|pt]toggles localized prompts and AI analysis.
AI flags (important):
scanandscan-emailuse--deep-analyze/--no-deep-analyze.huntuses--ai/--noai.- All of them accept
--ai-provider,--ai-save/--no-ai-save, and--ai-key.
Examples:
# Full hunt: usernames, email, Sherlock, site lists, PDF dossier
poetry run osint-d2 hunt \
--usernames exampleuser \
--emails user@example.com \
--site-lists \
--sherlock \
--strict \
--export-pdf
# Quick email triage with AI analysis disabled
poetry run osint-d2 scan-email user@example.com --no-deep-analyze
# Re-run the AI profiler over an exported dossier in Spanish
poetry run osint-d2 analyze reports/example.json --language es- English is the default CLI and AI language. Use
--language es(orOSINT_D2_DEFAULT_LANGUAGE=es) to switch.
Supported presets (examples):
--ai-provider deepseekβdeepseek-chat--ai-provider groq/groq-70bβllama-3.1-70b-versatile(recommended quality)--ai-provider groq-fastβllama-3.1-8b-instant(fast/cheap)--ai-provider openrouterβopenai/gpt-4o-mini--ai-provider huggingfaceβmeta-llama/Llama-3.1-8B-Instruct
Most free tiers rate-limit by TPM (tokens per minute) and/or request rate. Token usage roughly is:
If you hit RateLimitError/HTTP 429, OSINT-D2 falls back to a local heuristic summary so your run still completes.
Tips to avoid TPM limits:
- Prefer
--ai-provider groqfor better output quality. - If you must use small models (like
groq-fast), OSINT-D2 automatically switches to a compact prompt and trims evidence to reduce tokens. - Wait 30β90 seconds and retry when you get a 429.
AI analysis is optional. When enabled:
- If no
OSINT_D2_AI_API_KEYis set, OSINT-D2 falls back to a local heuristic summary (no network calls). - For non-Python / PyInstaller installs, run
osint-d2 doctor setup-aiand paste the key once. - Use
--ai-save/--no-ai-saveto control whether provider configuration is persisted. --ai-keyexists but is discouraged because it may end up in shell history; prefer the prompt/wizard.
--json-raw embeds the provider payload under analysis.raw for auditing.
Treat AI output as hypothesis generation; always confirm with primary evidence.
- JSON exports mirror the internal Pydantic models, making them easy to post-process.
- PDF/HTML dossiers are rendered via Jinja2 templates and WeasyPrint, including summary tables and AI narratives when available.
- Exports are written under
reports/with filenames sanitised via the pipeline helpers.
OSINT-D2 can query Have I Been Pwned (HIBP) unified search and render results:
- CLI tables:
hunt ... --breach-check - Reports: breach results are included in HTML/PDF dossiers when available
Example:
poetry run osint-d2 hunt -e user@example.com --breach-check --no-sherlock --no-site-listsYou can ship OSINT-D2 to βsimple usersβ as a standalone executable bundle.
Key design points:
- AI keys are stored in the user config
.env(no need to edit the project.env). - Runtime datasets (like
sherlock.json) are stored in a writable user data dir when frozen. - Report templates are bundled into the executable.
Build in a clean environment that matches your target distro/glibc:
python -m venv .venv-build
source .venv-build/bin/activate
pip install -U pip
pip install -e .
bash scripts/build_pyinstaller_linux.shpython -m venv .venv-build
source .venv-build/bin/activate
pip install -U pip
pip install -e .
bash scripts/build_pyinstaller_macos.shpython -m venv .venv-build
.\.venv-build\Scripts\Activate.ps1
pip install -U pip
pip install -e .
.\scripts\build_pyinstaller_windows.ps1The artifact will be available at:
dist/osint-d2/(ship this folder as a.zipor.tar.gz)
Inside the shipped folder:
./osint-d2 doctor setup-ai
./osint-d2 hunt -e user@example.com --ai --ai-provider groq --breach-checkThis repo includes a GitHub Actions workflow that builds PyInstaller bundles for:
- Linux (
.tar.gz) - macOS (
.tar.gz) - Windows (
.zip)
To publish a new release, push a tag like:
git tag v0.1.0
git push origin v0.1.0The workflow will upload artifacts to the GitHub Release automatically.
src/core/domain models, configuration, resources loader, and orchestrating services (identity pipeline, language utilities).src/adapters/integrations: HTTP client, Sherlock runner, site lists, AI analyst, exporters, specific scrapers.src/cli/Typer commands, interactive wizard, doctor utilities, and Rich UI components.
The CLI delegates business logic to the service layer (core/services/identity_pipeline.py), keeping commands thin and testable. Async operations are wrapped with asyncio.run(...) to stay Typer-friendly.
poetry run osint-d2 doctor runvalidates AI config presence, HTTP connectivity, and WeasyPrint PDF support.- Enable
--format jsonto capture exact outputs for bug reports or automated pipelines. - Use
--no-deep-analyzeif you prefer to skip AI calls during debugging.
If you pipe output (e.g. ... | head / sed -n ...) you may see Aborted.. This is usually SIGPIPE when the downstream command closes early.
Workarounds:
- Prefer
--format jsonand redirect to a file. - Avoid piping Rich tables when possible.
OSINT-D2 is intended for lawful defensive and investigative use (incident response, fraud, brand protection, self-audits). Respect privacy, terms of service, and local regulations.
- Do not use this tool for harassment, doxxing, or unauthorized intrusion.
- Correlation workflows can produce false positives; verify with additional evidence.
- AI-generated content can be biased or incorrect; treat it as guidance rather than fact.
Released under the MIT License. See LICENSE for details.



