Quick Start
Commands
install
Install Python packages from PyPI or custom index.| Option | Description |
|---|---|
--index-url <url> | Use custom index URL |
--extra-index-url <url> | Add extra index (requires --allow-extra-index) |
--allow-extra-index | Allow extra index URLs (security risk!) |
--python <path> | Python interpreter to use |
-U, --upgrade | Upgrade packages |
--no-deps | Don’t install dependencies |
--json | Output in JSON format |
uninstall
Uninstall Python packages.| Option | Description |
|---|---|
--python <path> | Python interpreter to use |
-y, --yes | Don’t ask for confirmation |
--json | Output in JSON format |
package list
List installed packages.| Option | Description |
|---|---|
--python <path> | Python interpreter to use |
--json | Output in JSON format |
package search
Search for packages on PyPI.| Option | Description |
|---|---|
--json | Output in JSON format |
package index
Manage package index configuration.| Subcommand | Description |
|---|---|
show | Show current index configuration |
set <url> | Set primary index URL |
Security Features
Dependency Confusion Prevention
By default, only the primary index (PyPI) is used. Extra indexes are blocked to prevent dependency confusion attacks.Security Warning
When using--allow-extra-index, you’ll see:
Best Practices
- Prefer
--index-urlover--extra-index-urlwhen possible - Pin versions for production deployments
- Use private index for internal packages instead of extra indexes
- Audit dependencies regularly
Configuration
Configuration is stored in~/.praison/config.toml:
Environment Variables
| Variable | Description |
|---|---|
PRAISONAI_PACKAGE_INDEX_URL | Override primary index URL |
PIP_INDEX_URL | Fallback to pip’s index URL |
Exit Codes
| Code | Meaning |
|---|---|
| 0 | Success |
| 1 | General error |
| 2 | Validation error |
| 11 | Dependency error |
JSON Output Format
install
package list
package search
package index show
See Also
- Package Manager Module - Python API reference
- Installation Guide - Getting started with PraisonAI

