Skip to content

Installation

Mikhail Deynekin edited this page Oct 12, 2026 · 4 revisions

Установка

Installation

Installation

Pick one; every method installs the same sr command.

A) Standalone single file (no package manager, no dependencies beyond Python 3.10+)

 curl -fsSL https://raw.githubusercontent.com/paulmann/sr-search-replace/main/scripts/install.sh | bash
 # or, explicitly:
 curl -fsSLO https://github.com/paulmann/sr-search-replace/releases/latest/download/sr.pyz
 curl -fsSLO https://github.com/paulmann/sr-search-replace/releases/latest/download/sr.pyz.sha256
 sha256sum -c sr.pyz.sha256
 install -m 0755 sr.pyz /usr/local/bin/sr

B) pipx (isolated, recommended for Python users)

 pipx install sr-search-replace
 pipx upgrade sr-search-replace

C) pip

 python3 -m pip install --user sr-search-replace

D) npm (wrapper that locates python3 and runs the bundled app)

 npm install -g sr-search-replace

E) From source

 git clone https://github.com/paulmann/sr-search-replace
 cd sr-search-replace
 make test          # runs the full suite
 make install       # installs the zipapp to PREFIX/bin (default /usr/local)

Verify the installation:

 sr --version
 sr doctor          # environment, filesystem, config, network
 sr selftest        # end-to-end smoke test in a temporary directory

Shell completion (optional):

 sr completions --install

Updating:

 sr update --check     # is there a newer release?
 sr update             # standalone installs: download, verify, replace
                          # pip/pipx/npm: prints the exact upgrade command

Requirements: Python 3.10 or newer. No third-party packages. Linux and macOS; on Windows use WSL2 (the filesystem code assumes POSIX rename semantics).


Страница сгенерирована из встроенной справки sr 7.0.1 (sr help <topic>). Первоисточник — sr/help_system.py; он же питает man sr и sr help --all. Если страница и вывод sr help расходятся, верить нужно sr help: он всегда соответствует установленной версии.

Clone this wiki locally