| Command | Description | Example |
|---|---|---|
install <packages...> |
Install packages and their dependencies | dpm install numpy pandas |
update <packages...> |
Update packages to latest compatible versions | dpm update requests |
remove <packages...> |
Remove installed packages | dpm remove flask |
list |
List all installed packages | dpm list |
resolve <packages...> |
Show resolution plan without installing (dry run) | dpm resolve django |
tree <packages...> |
Display dependency tree | dpm tree flask |
lock <packages...> |
Generate lock file without installing | dpm lock requests flask |
search <query> |
Search for packages | dpm search flask |
info <package> |
Show package details | dpm info requests |
init [name] [version] |
Initialize dpm.json manifest file | dpm init myproject 1.0.0 |
clean [--dry-run] |
Remove unused packages | dpm clean |
outdated |
Check for outdated packages | dpm outdated |
cache [command] |
Manage cache | dpm cache info |
pin <pkg>@<version> |
Pin package to exact version | dpm pin requests@2.32.5 |
unpin <pkg> |
Unpin package (allow version ranges) | dpm unpin requests |
export <format> [output] |
Export dependencies | dpm export requirements.txt |
venv [command] |
Manage virtual environment | dpm venv create |
repo [command] |
Manage custom repositories | dpm repo list |
| Flag | Description |
|---|---|
--help, -h |
Show usage information |
--version |
Show version |
--verbose, -v |
Show detailed output |
--debug, -d |
Show debug information (includes verbose) |
--offline |
Use cache only, no network requests |
--skip-integrity |
Skip integrity verification |
--show-resolution |
Show detailed resolution steps |
Install packages and their dependencies. If no packages are specified and dpm.lock exists, installs from the lock file.
# install specific packages
dpm install requests flask
# install from lock file
dpm installUpdate packages to their latest compatible versions.
# update all packages
dpm update
# update specific packages
dpm update requests numpyRemove installed packages.
dpm remove flask djangoList all installed packages with versions.
dpm listShow what would be installed without actually installing (dry run).
dpm resolve flask djangoDisplay dependency tree for packages.
dpm tree requests
dpm tree flask djangoGenerate a lock file without installing packages.
dpm lock requests flaskSearch for packages across all sources.
dpm search flask
dpm search jsonShow detailed information about a package.
dpm info requests
dpm info numpyInitialize a new dpm.json manifest file.
dpm init myproject 1.0.0Remove packages that are not in dpm.json or dpm.lock.
# preview what would be removed
dpm clean --dry-run
# actually remove
dpm cleanCheck for outdated packages.
dpm outdatedManage the cache.
# show cache information
dpm cache info
# list cached entries
dpm cache list
# clear cache
dpm cache clearPin a package to an exact version in dpm.json.
dpm pin requests@2.32.5Unpin a package, allowing version ranges.
dpm unpin requestsExport dependencies to other formats.
# export to requirements.txt
dpm export requirements.txt
# export to package.json
dpm export package.json
# export lock file
dpm export lockManage virtual environments.
# create a venv
dpm venv create myenv
# check status
dpm venv status
# detect existing environments
dpm venv detect
# use existing environment
dpm venv use conda
dpm venv use poetry
# remove venv
dpm venv removeManage custom package repositories. This feature allows you to configure additional package sources beyond the default ones (PyPI, npm, system).
Status: ✅ Fully implemented and tested. Custom repositories are used during package resolution.
Security Note: Credentials are stored in ~/.dpm/repositories.json with restricted file permissions (600). However, passwords are stored in plain text. For better security:
- Use API tokens instead of passwords when possible
- Ensure the repositories file has proper permissions (
chmod 600 ~/.dpm/repositories.json) - Avoid committing this file to version control
- Consider using environment variables for sensitive credentials
Use Cases:
-
Private Package Registries: Add your company's internal package registry
# Add private PyPI mirror dpm repo add company-pypi https://pypi.company.com # Add private npm registry with authentication (recommended: use token) dpm repo add company-npm https://npm.company.com token "" # Alternative: username/password (stored in plain text) dpm repo add company-npm https://npm.company.com username password
-
Custom Package Sources: Configure alternative package sources
# Add a custom package repository dpm repo add custom https://packages.example.com -
Mirror Repositories: Use faster or local mirrors
# Add a local PyPI mirror dpm repo add local-pypi http://localhost:8080
Commands:
# list all configured repositories
dpm repo list
# add a repository (public)
dpm repo add myrepo https://example.com/repo
# add a repository with authentication (recommended: use token)
dpm repo add private https://private.com/repo token ""
# add a repository with username/password (stored in plain text)
dpm repo add private https://private.com/repo username password
# remove a repository
dpm repo remove myrepoHow it works:
Repositories are stored in ~/.dpm/repositories.json:
{
"repositories": {
"myrepo": {
"url": "https://example.com/repo",
"auth": null
},
"private": {
"url": "https://private.com/repo",
"auth": {
"username": "user",
"password": "pass"
}
}
}
}How It Works:
- Custom repositories are automatically checked during package resolution
- Authentication is handled automatically for authenticated repositories
- Repositories are checked after default sources (PyPI, npm, system)
- Supports both PyPI and npm repository formats
- Repository type is auto-detected from URL
# install Python packages
dpm install numpy pandas matplotlib
# install npm packages
dpm install express lodash
# preview what would be installed
dpm resolve flask django
# show dependency tree
dpm tree requests
# search for packages
dpm search json
# create lock file
dpm lock requests flask
# install from lock file
dpm install
# check for outdated packages
dpm outdated
# update packages
dpm update
# export to requirements.txt
dpm export requirements.txt
# pin a package version
dpm pin requests@2.32.5
# create virtual environment
dpm venv create myenv
# add custom repository
dpm repo add myrepo https://example.com/repoRunning dpm lock or dpm install generates a dpm.lock file in the current directory. This file pins exact versions for reproducible installs.
# create lock file
dpm lock requests flask
# install from lock file
dpm installDPM can create isolated environments to avoid polluting global installs:
# create a venv
dpm venv create myenv
# check status
dpm venv status
# detect existing environments
dpm venv detect
# use existing environment
dpm venv use condaThe venv includes both Python (via python3 -m venv) and supports detection of conda, poetry, and pipenv environments.
DPM verifies package integrity using SHA256 checksums. When packages are downloaded, their hashes are checked against the registry-provided integrity strings. This prevents tampered or corrupted packages from being installed.
After installation, DPM also verifies that:
- Python packages are importable
- npm packages exist in node_modules
- Installation was successful
If verification fails, DPM automatically rolls back the installation.
Use --skip-integrity to bypass verification (not recommended).
Use --offline to work without network access:
# resolve using only cached data
dpm --offline resolve requestsUse --verbose or --debug for detailed output:
# verbose output
dpm --verbose resolve requests
# debug output (includes verbose)
dpm --debug resolve requestsUse --show-resolution to see detailed resolution steps:
dpm --show-resolution resolve flask djangoThis shows:
- Which algorithm was used (greedy vs backtracking)
- Number of packages resolved
- Conflicts detected (if any)
- Resolution time
- Timeout status (if applicable)
DPM includes several robustness features that work automatically:
- Automatic retry with exponential backoff (3 attempts by default)
- Timeout protection (30s per request)
- Rate limit handling (429 responses)
- Comprehensive error logging
- Package names are sanitized to prevent path traversal attacks
- Version strings are validated
- Invalid inputs are rejected with clear error messages
- Cache entries expire after 24 hours (TTL)
- Cache size is limited to 100MB (automatic eviction)
- Cache writes are atomic (no corruption on failures)
- Resolution timeout (60s default) prevents infinite hangs
- Detailed conflict reporting when resolution fails
- Automatic rollback on installation failures
| Command | Description | Example |
|---|---|---|
install <packages...> |
Install packages and their dependencies | dpm install numpy pandas |
update <packages...> |
Update packages to latest compatible versions | dpm update requests |
remove <packages...> |
Remove installed packages | dpm remove flask |
list |
List all installed packages | dpm list |
resolve <packages...> |
Show resolution plan without installing (dry run) | dpm resolve django |
tree <packages...> |
Display dependency tree | dpm tree flask |
lock <packages...> |
Generate lock file without installing | dpm lock requests flask |
search <query> |
Search for packages | dpm search flask |
info <package> |
Show package details | dpm info requests |
init [name] [version] |
Initialize dpm.json manifest file | dpm init myproject 1.0.0 |
clean [--dry-run] |
Remove unused packages | dpm clean |
outdated |
Check for outdated packages | dpm outdated |
cache [command] |
Manage cache | dpm cache info |
pin <pkg>@<version> |
Pin package to exact version | dpm pin requests@2.32.5 |
unpin <pkg> |
Unpin package (allow version ranges) | dpm unpin requests |
export <format> [output] |
Export dependencies | dpm export requirements.txt |
venv [command] |
Manage virtual environment | dpm venv create |
repo [command] |
Manage custom repositories | dpm repo list |
| Flag | Description |
|---|---|
--help, -h |
Show usage information |
--version |
Show version |
--verbose, -v |
Show detailed output |
--debug, -d |
Show debug information (includes verbose) |
--offline |
Use cache only, no network requests |
--skip-integrity |
Skip integrity verification |
--show-resolution |
Show detailed resolution steps |
Install packages and their dependencies. If no packages are specified and dpm.lock exists, installs from the lock file.
# install specific packages
dpm install requests flask
# install from lock file
dpm installUpdate packages to their latest compatible versions.
# update all packages
dpm update
# update specific packages
dpm update requests numpyRemove installed packages.
dpm remove flask djangoList all installed packages with versions.
dpm listShow what would be installed without actually installing (dry run).
dpm resolve flask djangoDisplay dependency tree for packages.
dpm tree requests
dpm tree flask djangoGenerate a lock file without installing packages.
dpm lock requests flaskSearch for packages across all sources.
dpm search flask
dpm search jsonShow detailed information about a package.
dpm info requests
dpm info numpyInitialize a new dpm.json manifest file.
dpm init myproject 1.0.0Remove packages that are not in dpm.json or dpm.lock.
# preview what would be removed
dpm clean --dry-run
# actually remove
dpm cleanCheck for outdated packages.
dpm outdatedManage the cache.
# show cache information
dpm cache info
# list cached entries
dpm cache list
# clear cache
dpm cache clearPin a package to an exact version in dpm.json.
dpm pin requests@2.32.5Unpin a package, allowing version ranges.
dpm unpin requestsExport dependencies to other formats.
# export to requirements.txt
dpm export requirements.txt
# export to package.json
dpm export package.json
# export lock file
dpm export lockManage virtual environments.
# create a venv
dpm venv create myenv
# check status
dpm venv status
# detect existing environments
dpm venv detect
# use existing environment
dpm venv use conda
dpm venv use poetry
# remove venv
dpm venv removeManage custom package repositories. This feature allows you to configure additional package sources beyond the default ones (PyPI, npm, system).
Status: ✅ Fully implemented and tested. Custom repositories are used during package resolution.
Security Note: Credentials are stored in ~/.dpm/repositories.json with restricted file permissions (600). However, passwords are stored in plain text. For better security:
- Use API tokens instead of passwords when possible
- Ensure the repositories file has proper permissions (
chmod 600 ~/.dpm/repositories.json) - Avoid committing this file to version control
- Consider using environment variables for sensitive credentials
Use Cases:
-
Private Package Registries: Add your company's internal package registry
# Add private PyPI mirror dpm repo add company-pypi https://pypi.company.com # Add private npm registry with authentication (recommended: use token) dpm repo add company-npm https://npm.company.com token "" # Alternative: username/password (stored in plain text) dpm repo add company-npm https://npm.company.com username password
-
Custom Package Sources: Configure alternative package sources
# Add a custom package repository dpm repo add custom https://packages.example.com -
Mirror Repositories: Use faster or local mirrors
# Add a local PyPI mirror dpm repo add local-pypi http://localhost:8080
Commands:
# list all configured repositories
dpm repo list
# add a repository (public)
dpm repo add myrepo https://example.com/repo
# add a repository with authentication (recommended: use token)
dpm repo add private https://private.com/repo token ""
# add a repository with username/password (stored in plain text)
dpm repo add private https://private.com/repo username password
# remove a repository
dpm repo remove myrepoHow it works:
Repositories are stored in ~/.dpm/repositories.json:
{
"repositories": {
"myrepo": {
"url": "https://example.com/repo",
"auth": null
},
"private": {
"url": "https://private.com/repo",
"auth": {
"username": "user",
"password": "pass"
}
}
}
}How It Works:
- Custom repositories are automatically checked during package resolution
- Authentication is handled automatically for authenticated repositories
- Repositories are checked after default sources (PyPI, npm, system)
- Supports both PyPI and npm repository formats
- Repository type is auto-detected from URL
# install Python packages
dpm install numpy pandas matplotlib
# install npm packages
dpm install express lodash
# preview what would be installed
dpm resolve flask django
# show dependency tree
dpm tree requests
# search for packages
dpm search json
# create lock file
dpm lock requests flask
# install from lock file
dpm install
# check for outdated packages
dpm outdated
# update packages
dpm update
# export to requirements.txt
dpm export requirements.txt
# pin a package version
dpm pin requests@2.32.5
# create virtual environment
dpm venv create myenv
# add custom repository
dpm repo add myrepo https://example.com/repoRunning dpm lock or dpm install generates a dpm.lock file in the current directory. This file pins exact versions for reproducible installs.
# create lock file
dpm lock requests flask
# install from lock file
dpm installDPM can create isolated environments to avoid polluting global installs:
# create a venv
dpm venv create myenv
# check status
dpm venv status
# detect existing environments
dpm venv detect
# use existing environment
dpm venv use condaThe venv includes both Python (via python3 -m venv) and supports detection of conda, poetry, and pipenv environments.
DPM verifies package integrity using SHA256 checksums. When packages are downloaded, their hashes are checked against the registry-provided integrity strings. This prevents tampered or corrupted packages from being installed.
After installation, DPM also verifies that:
- Python packages are importable
- npm packages exist in node_modules
- Installation was successful
If verification fails, DPM automatically rolls back the installation.
Use --skip-integrity to bypass verification (not recommended).
Use --offline to work without network access:
# resolve using only cached data
dpm --offline resolve requestsUse --verbose or --debug for detailed output:
# verbose output
dpm --verbose resolve requests
# debug output (includes verbose)
dpm --debug resolve requestsUse --show-resolution to see detailed resolution steps:
dpm --show-resolution resolve flask djangoThis shows:
- Which algorithm was used (greedy vs backtracking)
- Number of packages resolved
- Conflicts detected (if any)
- Resolution time
- Timeout status (if applicable)
DPM includes several robustness features that work automatically:
- Automatic retry with exponential backoff (3 attempts by default)
- Timeout protection (30s per request)
- Rate limit handling (429 responses)
- Comprehensive error logging
- Package names are sanitized to prevent path traversal attacks
- Version strings are validated
- Invalid inputs are rejected with clear error messages
- Cache entries expire after 24 hours (TTL)
- Cache size is limited to 100MB (automatic eviction)
- Cache writes are atomic (no corruption on failures)
- Resolution timeout (60s default) prevents infinite hangs
- Detailed conflict reporting when resolution fails
- Automatic rollback on installation failures
| Command | Description | Example |
|---|---|---|
install <packages...> |
Install packages and their dependencies | dpm install numpy pandas |
update <packages...> |
Update packages to latest compatible versions | dpm update requests |
remove <packages...> |
Remove installed packages | dpm remove flask |
list |
List all installed packages | dpm list |
resolve <packages...> |
Show resolution plan without installing (dry run) | dpm resolve django |
tree <packages...> |
Display dependency tree | dpm tree flask |
lock <packages...> |
Generate lock file without installing | dpm lock requests flask |
search <query> |
Search for packages | dpm search flask |
info <package> |
Show package details | dpm info requests |
init [name] [version] |
Initialize dpm.json manifest file | dpm init myproject 1.0.0 |
clean [--dry-run] |
Remove unused packages | dpm clean |
outdated |
Check for outdated packages | dpm outdated |
cache [command] |
Manage cache | dpm cache info |
pin <pkg>@<version> |
Pin package to exact version | dpm pin requests@2.32.5 |
unpin <pkg> |
Unpin package (allow version ranges) | dpm unpin requests |
export <format> [output] |
Export dependencies | dpm export requirements.txt |
venv [command] |
Manage virtual environment | dpm venv create |
repo [command] |
Manage custom repositories | dpm repo list |
| Flag | Description |
|---|---|
--help, -h |
Show usage information |
--version |
Show version |
--verbose, -v |
Show detailed output |
--debug, -d |
Show debug information (includes verbose) |
--offline |
Use cache only, no network requests |
--skip-integrity |
Skip integrity verification |
--show-resolution |
Show detailed resolution steps |
Install packages and their dependencies. If no packages are specified and dpm.lock exists, installs from the lock file.
# install specific packages
dpm install requests flask
# install from lock file
dpm installUpdate packages to their latest compatible versions.
# update all packages
dpm update
# update specific packages
dpm update requests numpyRemove installed packages.
dpm remove flask djangoList all installed packages with versions.
dpm listShow what would be installed without actually installing (dry run).
dpm resolve flask djangoDisplay dependency tree for packages.
dpm tree requests
dpm tree flask djangoGenerate a lock file without installing packages.
dpm lock requests flaskSearch for packages across all sources.
dpm search flask
dpm search jsonShow detailed information about a package.
dpm info requests
dpm info numpyInitialize a new dpm.json manifest file.
dpm init myproject 1.0.0Remove packages that are not in dpm.json or dpm.lock.
# preview what would be removed
dpm clean --dry-run
# actually remove
dpm cleanCheck for outdated packages.
dpm outdatedManage the cache.
# show cache information
dpm cache info
# list cached entries
dpm cache list
# clear cache
dpm cache clearPin a package to an exact version in dpm.json.
dpm pin requests@2.32.5Unpin a package, allowing version ranges.
dpm unpin requestsExport dependencies to other formats.
# export to requirements.txt
dpm export requirements.txt
# export to package.json
dpm export package.json
# export lock file
dpm export lockManage virtual environments.
# create a venv
dpm venv create myenv
# check status
dpm venv status
# detect existing environments
dpm venv detect
# use existing environment
dpm venv use conda
dpm venv use poetry
# remove venv
dpm venv removeManage custom package repositories. This feature allows you to configure additional package sources beyond the default ones (PyPI, npm, system).
Status: ✅ Fully implemented and tested. Custom repositories are used during package resolution.
Security Note: Credentials are stored in ~/.dpm/repositories.json with restricted file permissions (600). However, passwords are stored in plain text. For better security:
- Use API tokens instead of passwords when possible
- Ensure the repositories file has proper permissions (
chmod 600 ~/.dpm/repositories.json) - Avoid committing this file to version control
- Consider using environment variables for sensitive credentials
Use Cases:
-
Private Package Registries: Add your company's internal package registry
# Add private PyPI mirror dpm repo add company-pypi https://pypi.company.com # Add private npm registry with authentication (recommended: use token) dpm repo add company-npm https://npm.company.com token "" # Alternative: username/password (stored in plain text) dpm repo add company-npm https://npm.company.com username password
-
Custom Package Sources: Configure alternative package sources
# Add a custom package repository dpm repo add custom https://packages.example.com -
Mirror Repositories: Use faster or local mirrors
# Add a local PyPI mirror dpm repo add local-pypi http://localhost:8080
Commands:
# list all configured repositories
dpm repo list
# add a repository (public)
dpm repo add myrepo https://example.com/repo
# add a repository with authentication (recommended: use token)
dpm repo add private https://private.com/repo token ""
# add a repository with username/password (stored in plain text)
dpm repo add private https://private.com/repo username password
# remove a repository
dpm repo remove myrepoHow it works:
Repositories are stored in ~/.dpm/repositories.json:
{
"repositories": {
"myrepo": {
"url": "https://example.com/repo",
"auth": null
},
"private": {
"url": "https://private.com/repo",
"auth": {
"username": "user",
"password": "pass"
}
}
}
}How It Works:
- Custom repositories are automatically checked during package resolution
- Authentication is handled automatically for authenticated repositories
- Repositories are checked after default sources (PyPI, npm, system)
- Supports both PyPI and npm repository formats
- Repository type is auto-detected from URL
# install Python packages
dpm install numpy pandas matplotlib
# install npm packages
dpm install express lodash
# preview what would be installed
dpm resolve flask django
# show dependency tree
dpm tree requests
# search for packages
dpm search json
# create lock file
dpm lock requests flask
# install from lock file
dpm install
# check for outdated packages
dpm outdated
# update packages
dpm update
# export to requirements.txt
dpm export requirements.txt
# pin a package version
dpm pin requests@2.32.5
# create virtual environment
dpm venv create myenv
# add custom repository
dpm repo add myrepo https://example.com/repoRunning dpm lock or dpm install generates a dpm.lock file in the current directory. This file pins exact versions for reproducible installs.
# create lock file
dpm lock requests flask
# install from lock file
dpm installDPM can create isolated environments to avoid polluting global installs:
# create a venv
dpm venv create myenv
# check status
dpm venv status
# detect existing environments
dpm venv detect
# use existing environment
dpm venv use condaThe venv includes both Python (via python3 -m venv) and supports detection of conda, poetry, and pipenv environments.
DPM verifies package integrity using SHA256 checksums. When packages are downloaded, their hashes are checked against the registry-provided integrity strings. This prevents tampered or corrupted packages from being installed.
After installation, DPM also verifies that:
- Python packages are importable
- npm packages exist in node_modules
- Installation was successful
If verification fails, DPM automatically rolls back the installation.
Use --skip-integrity to bypass verification (not recommended).
Use --offline to work without network access:
# resolve using only cached data
dpm --offline resolve requestsUse --verbose or --debug for detailed output:
# verbose output
dpm --verbose resolve requests
# debug output (includes verbose)
dpm --debug resolve requestsUse --show-resolution to see detailed resolution steps:
dpm --show-resolution resolve flask djangoThis shows:
- Which algorithm was used (greedy vs backtracking)
- Number of packages resolved
- Conflicts detected (if any)
- Resolution time
- Timeout status (if applicable)
DPM includes several robustness features that work automatically:
- Automatic retry with exponential backoff (3 attempts by default)
- Timeout protection (30s per request)
- Rate limit handling (429 responses)
- Comprehensive error logging
- Package names are sanitized to prevent path traversal attacks
- Version strings are validated
- Invalid inputs are rejected with clear error messages
- Cache entries expire after 24 hours (TTL)
- Cache size is limited to 100MB (automatic eviction)
- Cache writes are atomic (no corruption on failures)
- Resolution timeout (60s default) prevents infinite hangs
- Detailed conflict reporting when resolution fails
- Automatic rollback on installation failures
| Command | Description | Example |
|---|---|---|
install <packages...> |
Install packages and their dependencies | dpm install numpy pandas |
update <packages...> |
Update packages to latest compatible versions | dpm update requests |
remove <packages...> |
Remove installed packages | dpm remove flask |
list |
List all installed packages | dpm list |
resolve <packages...> |
Show resolution plan without installing (dry run) | dpm resolve django |
tree <packages...> |
Display dependency tree | dpm tree flask |
lock <packages...> |
Generate lock file without installing | dpm lock requests flask |
search <query> |
Search for packages | dpm search flask |
info <package> |
Show package details | dpm info requests |
init [name] [version] |
Initialize dpm.json manifest file | dpm init myproject 1.0.0 |
clean [--dry-run] |
Remove unused packages | dpm clean |
outdated |
Check for outdated packages | dpm outdated |
cache [command] |
Manage cache | dpm cache info |
pin <pkg>@<version> |
Pin package to exact version | dpm pin requests@2.32.5 |
unpin <pkg> |
Unpin package (allow version ranges) | dpm unpin requests |
export <format> [output] |
Export dependencies | dpm export requirements.txt |
venv [command] |
Manage virtual environment | dpm venv create |
repo [command] |
Manage custom repositories | dpm repo list |
| Flag | Description |
|---|---|
--help, -h |
Show usage information |
--version |
Show version |
--verbose, -v |
Show detailed output |
--debug, -d |
Show debug information (includes verbose) |
--offline |
Use cache only, no network requests |
--skip-integrity |
Skip integrity verification |
--show-resolution |
Show detailed resolution steps |
Install packages and their dependencies. If no packages are specified and dpm.lock exists, installs from the lock file.
# install specific packages
dpm install requests flask
# install from lock file
dpm installUpdate packages to their latest compatible versions.
# update all packages
dpm update
# update specific packages
dpm update requests numpyRemove installed packages.
dpm remove flask djangoList all installed packages with versions.
dpm listShow what would be installed without actually installing (dry run).
dpm resolve flask djangoDisplay dependency tree for packages.
dpm tree requests
dpm tree flask djangoGenerate a lock file without installing packages.
dpm lock requests flaskSearch for packages across all sources.
dpm search flask
dpm search jsonShow detailed information about a package.
dpm info requests
dpm info numpyInitialize a new dpm.json manifest file.
dpm init myproject 1.0.0Remove packages that are not in dpm.json or dpm.lock.
# preview what would be removed
dpm clean --dry-run
# actually remove
dpm cleanCheck for outdated packages.
dpm outdatedManage the cache.
# show cache information
dpm cache info
# list cached entries
dpm cache list
# clear cache
dpm cache clearPin a package to an exact version in dpm.json.
dpm pin requests@2.32.5Unpin a package, allowing version ranges.
dpm unpin requestsExport dependencies to other formats.
# export to requirements.txt
dpm export requirements.txt
# export to package.json
dpm export package.json
# export lock file
dpm export lockManage virtual environments.
# create a venv
dpm venv create myenv
# check status
dpm venv status
# detect existing environments
dpm venv detect
# use existing environment
dpm venv use conda
dpm venv use poetry
# remove venv
dpm venv removeManage custom package repositories. This feature allows you to configure additional package sources beyond the default ones (PyPI, npm, system).
Status: ✅ Fully implemented and tested. Custom repositories are used during package resolution.
Security Note: Credentials are stored in ~/.dpm/repositories.json with restricted file permissions (600). However, passwords are stored in plain text. For better security:
- Use API tokens instead of passwords when possible
- Ensure the repositories file has proper permissions (
chmod 600 ~/.dpm/repositories.json) - Avoid committing this file to version control
- Consider using environment variables for sensitive credentials
Use Cases:
-
Private Package Registries: Add your company's internal package registry
# Add private PyPI mirror dpm repo add company-pypi https://pypi.company.com # Add private npm registry with authentication (recommended: use token) dpm repo add company-npm https://npm.company.com token "" # Alternative: username/password (stored in plain text) dpm repo add company-npm https://npm.company.com username password
-
Custom Package Sources: Configure alternative package sources
# Add a custom package repository dpm repo add custom https://packages.example.com -
Mirror Repositories: Use faster or local mirrors
# Add a local PyPI mirror dpm repo add local-pypi http://localhost:8080
Commands:
# list all configured repositories
dpm repo list
# add a repository (public)
dpm repo add myrepo https://example.com/repo
# add a repository with authentication (recommended: use token)
dpm repo add private https://private.com/repo token ""
# add a repository with username/password (stored in plain text)
dpm repo add private https://private.com/repo username password
# remove a repository
dpm repo remove myrepoHow it works:
Repositories are stored in ~/.dpm/repositories.json:
{
"repositories": {
"myrepo": {
"url": "https://example.com/repo",
"auth": null
},
"private": {
"url": "https://private.com/repo",
"auth": {
"username": "user",
"password": "pass"
}
}
}
}How It Works:
- Custom repositories are automatically checked during package resolution
- Authentication is handled automatically for authenticated repositories
- Repositories are checked after default sources (PyPI, npm, system)
- Supports both PyPI and npm repository formats
- Repository type is auto-detected from URL
# install Python packages
dpm install numpy pandas matplotlib
# install npm packages
dpm install express lodash
# preview what would be installed
dpm resolve flask django
# show dependency tree
dpm tree requests
# search for packages
dpm search json
# create lock file
dpm lock requests flask
# install from lock file
dpm install
# check for outdated packages
dpm outdated
# update packages
dpm update
# export to requirements.txt
dpm export requirements.txt
# pin a package version
dpm pin requests@2.32.5
# create virtual environment
dpm venv create myenv
# add custom repository
dpm repo add myrepo https://example.com/repoRunning dpm lock or dpm install generates a dpm.lock file in the current directory. This file pins exact versions for reproducible installs.
# create lock file
dpm lock requests flask
# install from lock file
dpm installDPM can create isolated environments to avoid polluting global installs:
# create a venv
dpm venv create myenv
# check status
dpm venv status
# detect existing environments
dpm venv detect
# use existing environment
dpm venv use condaThe venv includes both Python (via python3 -m venv) and supports detection of conda, poetry, and pipenv environments.
DPM verifies package integrity using SHA256 checksums. When packages are downloaded, their hashes are checked against the registry-provided integrity strings. This prevents tampered or corrupted packages from being installed.
After installation, DPM also verifies that:
- Python packages are importable
- npm packages exist in node_modules
- Installation was successful
If verification fails, DPM automatically rolls back the installation.
Use --skip-integrity to bypass verification (not recommended).
Use --offline to work without network access:
# resolve using only cached data
dpm --offline resolve requestsUse --verbose or --debug for detailed output:
# verbose output
dpm --verbose resolve requests
# debug output (includes verbose)
dpm --debug resolve requestsUse --show-resolution to see detailed resolution steps:
dpm --show-resolution resolve flask djangoThis shows:
- Which algorithm was used (greedy vs backtracking)
- Number of packages resolved
- Conflicts detected (if any)
- Resolution time
- Timeout status (if applicable)
DPM includes several robustness features that work automatically:
- Automatic retry with exponential backoff (3 attempts by default)
- Timeout protection (30s per request)
- Rate limit handling (429 responses)
- Comprehensive error logging
- Package names are sanitized to prevent path traversal attacks
- Version strings are validated
- Invalid inputs are rejected with clear error messages
- Cache entries expire after 24 hours (TTL)
- Cache size is limited to 100MB (automatic eviction)
- Cache writes are atomic (no corruption on failures)
- Resolution timeout (60s default) prevents infinite hangs
- Detailed conflict reporting when resolution fails
- Automatic rollback on installation failures