slowrc
Why does your terminal take so long to open?
slowrc times your shell's startup, shows exactly which lines of your .zshrc / .bashrc cost the most, and fixes the slow ones safely.
uvx slowrc # see where the time goes
uvx slowrc --fix # fix it
Demo run on a sandboxed home directory with a typical setup: nvm, pyenv, Homebrew, kubectl completions.
How it works
-
Times your real startup a few times (median).
-
Traces one startup with the shell's own tracing (timestamps on every line it runs), then charges each line's time to the line in your file that caused it. For example, 250 ms deep inside
nvm.shshows up as~/.zshrc:3. Tracing overhead is measured and subtracted. -
Recognises the usual suspects and how to fix each one.
-
With
--fix: backs up your files, applies the fixes, then starts a fresh shell and checks it behaves exactly the same:- it still starts cleanly
- nothing went missing from
PATH noderesolves to the same binary- no new errors appear
If anything differs, every file is restored automatically.
What it fixes
| Typical saving | What slowrc does | |
|---|---|---|
| nvm | 200–800 ms | Puts your default Node straight on PATH; nvm itself loads the first time you run nvm |
eval "$(tool init)" for pyenv, rbenv, brew shellenv, starship, zoxide, direnv, mise, atuin, fzf, thefuck, … |
30–300 ms each | Caches the generated script; it regenerates automatically when the tool is updated |
source <(kubectl completion zsh) and other generated completions (helm, gh, docker, uv, poetry, …) |
50–200 ms each | Same caching |
$(brew --prefix formula) |
100–500 ms each | Replaces it with the path it prints |
| compinit | 20–150 ms | Runs its full check at most once a day, reusing its cache otherwise |
It also points out what it won't touch automatically: conda's base environment, oh-my-zsh plugin weight,
SDKMAN!, RVM, a global compinit in /etc/zsh/zshrc, and any other line over 50 ms.
Only init commands whose output never changes between sessions get cached. Things like ssh-agent,
keychain or fnm env are left alone.
Safety
- Nothing is changed without
--fix. The report alone is read-only. - Every edited file gets a timestamped backup next to it, and
slowrc --undorestores them byte for byte. - Each change is marked with a
# slowrc:comment saying what the line used to be. - System files (
/etc/...) are never edited.
Options
slowrc --shell bash # default: your $SHELL
slowrc --login / --no-login # default: login on macOS, interactive on Linux (what terminals use)
slowrc --runs 20 # more timing runs
slowrc --json # machine-readable report
zsh and bash on macOS and Linux. Line-by-line profiling of bash needs bash 5+ (macOS ships 3.2: brew install bash).
If something in your startup files waits for input (like tmux auto-attach), it can skip itself when $SLOWRC is set.
License
MIT
Metadata
Release files for slowrc 0.1.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| slowrc-0.1.0.tar.gz | 18.9 kB | With provenance | Details for slowrc-0.1.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| slowrc-0.1.0-py3-none-any.whl | Python 3 | none | any | Details for slowrc-0.1.0-py3-none-any.whl |
Total release size: 38.2 kB
Release files / slowrc-0.1.0.tar.gz
| Download URL | slowrc-0.1.0.tar.gz |
|---|---|
| Size | 18.9 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
50126d25ab816db8aa3e1c158cdfeca3c8e2228bb0c5df40fbb2225caa354ad8
|
|
BLAKE2b-256 checksum How to use checksums |
c5080a0df5b12bec91c6c4f1ef2f503ba59376a2df8fe298ba0c23af76d48381
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.16
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Nov 5, 2026.
Transparency logRelease files / slowrc-0.1.0-py3-none-any.whl
| Download URL | slowrc-0.1.0-py3-none-any.whl |
|---|---|
| Size | 19.2 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
d4c7b85430194073d307be64c994ed58c07536c1358b665ebbf889d30eaf03b4
|
|
BLAKE2b-256 checksum How to use checksums |
519aebff6ee1a3dd3942ae846b4add1492dbfcaf4cd5ca62d897fe59e01aba19
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.16
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Nov 5, 2026.
Transparency logSecurity for slowrc 0.1.0
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
Full provenance
Both files in this release have been uploaded with provenance metadata.
Attestation for slowrc-0.1.0.tar.gz
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Nov 5, 2026.
Transparency logA note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.