Pydepsync
Automatically sync dependencies in your python codebase to your pyproject.toml
Install / Use
/learn @shaneikennedy/PydepsyncREADME
pydepsync
Detect external package dependencies in your code and add the missing ones to pyproject.toml
A Rust port of the excellent package pipreqs, but for pyproject.toml
Usage
Run pydepsync in the root of a project with a pyproject.toml file to scan your code and update dependencies
Use-cases
- Vibe coding and claude keeps adding dependencies everywhere? pydepsync
- Migrating from poetry, pipenv, or just plain pip? pydepsync
Installation
From Binary Releases
Download the latest binary for your platform from the releases page, extract it, and place it in your PATH.
From Source
Install from source using Cargo (requires Rust to be installed):
cargo install --git https://github.com/shaneikennedy/pydepsync
Usage
uvproject git:main
❯ pydepsync --help
Usage: pydepsync [OPTIONS]
Options:
--exclude-dirs <EXCLUDE_DIRS>
List of directories to ignore, we ignore .venv and .git by default
--extra-indexes <EXTRA_INDEXES>
List of extra package indexes pydepsync should check when resolving dependencies. We check https://pypi.org/simple by default
--preferred-index <PREFERRED_INDEX>
The index pydepsync should check first when resolving packages
-r, --remap <KEY=VALUE>
List of key-value pairs in the format 'key=value'
-h, --help
Print help
-V, --version
Print version
Configuration
To avoid repeating CLI arguments, especially for private indexes or remapped packages, create a .pydepsync.toml file in your project root (next to pyproject.toml). CLI arguments override these settings.
Example:
# .pydepsync.toml
# Directories to exclude (array of strings)
# .venv and .git are ignored by default; no need to list them unless overriding
exclude_dirs = ["build", "dist"]
# Extra package indexes to check (array of strings)
extra_indexes = ["https://test.pypi.org/simple/", "https://mycompany.pypi.org/simple/"]
# Preferred index to check first (optional string)
# Defaults to https://pypi.org/simple/ if omitted
preferred_index = "https://pypi.org/simple/"
# Remappings for import-to-package-name mismatches
[remap]
"rest_framework" = "djangorestframework" # Built-in for 1000+ public packages
"how_its_imported" = "WhatItsNamedOnIndex"
Related Skills
himalaya
342.0kCLI to manage emails via IMAP/SMTP. Use `himalaya` to list, read, write, reply, forward, search, and organize emails from the terminal. Supports multiple accounts and message composition with MML (MIME Meta Language).
node-connect
342.0kDiagnose OpenClaw node connection and pairing failures for Android, iOS, and macOS companion apps
claude-opus-4-5-migration
84.7kMigrate prompts and code from Claude Sonnet 4.0, Sonnet 4.5, or Opus 4.1 to Opus 4.5
frontend-design
84.7kCreate distinctive, production-grade frontend interfaces with high design quality. Use this skill when the user asks to build web components, pages, or applications. Generates creative, polished code that avoids generic AI aesthetics.
