← 返回命令列表

Linux command

pyra 命令

文本

复制后可按需替换文件名、目录或参数。

常用示例

Install a specific Python

pyra python install [3.12]

Initialize

pyra init --python [3.12]

Add a dependency

pyra add [requests]

Remove a dependency

pyra remove [requests]

Sync the environment

pyra sync

Run a script or command

pyra run [script.py]

Show the dependency tree

pyra tree

Update Pyra itself

pyra self update

说明

pyra is a modern Python package and project manager written in Rust. It unifies Python version management, project initialization, dependency resolution, environment synchronization, and script execution under a single deterministic pipeline. Projects declare intent in _pyproject.toml_ and Pyra writes the fully-resolved state to _pylock.toml_. Running pyra sync then reconciles the local virtual environment exactly to the lockfile, so the same lockfile always yields the same environment across machines. Compared with traditional tools like _pip_ and _venv_, Pyra replaces the chain of _pyenv_ + _virtualenv_ + _pip_ + _pip-tools_ with one binary that handles the full lifecycle — install, add, lock, sync, run — without network calls at run time beyond what is needed to fetch declared packages.

参数

python install _version_
Install a specific Python interpreter version managed by Pyra.
init --python _version_
Initialize a new project, generating _pyproject.toml_ and _pylock.toml_.
add _package_ _package ..._
Add one or more dependencies to _pyproject.toml_ and update the lockfile.
remove _package_ _package ..._
Remove dependencies from _pyproject.toml_ and update the lockfile.
sync
Reconcile the local virtual environment with _pylock.toml_.
lock
Resolve dependencies and write the precise state to _pylock.toml_.
run _command_
Execute a script or command inside the synchronized environment.
tree
Show the resolved dependency tree for the current project.
info
Show project metadata, Python version, and environment details.
cache
Inspect or manage Pyra's on-disk cache.
self update
Update Pyra itself to the latest version.

FAQ

What is the pyra command used for?

pyra is a modern Python package and project manager written in Rust. It unifies Python version management, project initialization, dependency resolution, environment synchronization, and script execution under a single deterministic pipeline. Projects declare intent in _pyproject.toml_ and Pyra writes the fully-resolved state to _pylock.toml_. Running pyra sync then reconciles the local virtual environment exactly to the lockfile, so the same lockfile always yields the same environment across machines. Compared with traditional tools like _pip_ and _venv_, Pyra replaces the chain of _pyenv_ + _virtualenv_ + _pip_ + _pip-tools_ with one binary that handles the full lifecycle — install, add, lock, sync, run — without network calls at run time beyond what is needed to fetch declared packages.

How do I run a basic pyra example?

Run `pyra python install [3.12]` in a terminal, then adjust file names, paths, flags, or remote targets for your system.

What does python install _version_ do in pyra?

Install a specific Python interpreter version managed by Pyra.