Swytchit
Switch environment context easily in the shell
Usage
sw your/project/directory
- Performs a
cdoperation to the project - Starts a subshell
- Within the subshell, runs
sourceon.swytchitrc.shfiles in the project directory and any ancestor directories
Use the exit command when done with the project to exit the subshell and clear the environment.
Note that .swytchitrc.sh can support any source operation, including:
- Set environment variables
- Define aliases
- Define functions
Why?
- Easily switch virtual environments for scripting languages (Python, Ruby, etc)
- Easily populate project-specific environment variables and aliases
- Use with the
opCLI from 1Password to keep project-specific secrets in memory
Installation (MacOS)
brew install pipx
pipx install swytchit
Also do a profile/rc song and dance something like this:
echo 'if [[ -n $SWYTCHITRC ]]; then source $SWYTCHITRC; fi' >> $ZDOTDIR/.zshrc
source $ZDOTDIR/.zshrc
(use e.g. .profile or .bashrc if not on zsh)
Rules
- Only works in TTY shell (no piping)
- Only works for a descendent of user's home directory
- Resolves symlinks first
Metadata
Release files for swytchit 2.0.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 | |
|---|---|---|---|
| swytchit-2.0.0.tar.gz | 3.4 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| swytchit-2.0.0-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 8.3 kB
Release files / swytchit-2.0.0.tar.gz
| Download URL | swytchit-2.0.0.tar.gz |
|---|---|
| Size | 3.4 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
17c2a998776bd9f10172175b2cd5bd07749ee06f52476282c38d5e287ae1ee78
|
|
BLAKE2b-256 checksum How to use checksums |
09adc2e5c0424df4516f1b0ff55276002f81d7ac3ce3246fc8fa94de31f37e6e
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
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 Oct 2, 2026.
Transparency logRelease files / swytchit-2.0.0-py3-none-any.whl
| Download URL | swytchit-2.0.0-py3-none-any.whl |
|---|---|
| Size | 4.9 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
2d6fcb38ecf0124171aec0a725bb2ebec580dea13b6bffff7a082328eb252842
|
|
BLAKE2b-256 checksum How to use checksums |
8a0f7c534a57e1eaa25c223a0097b967ccaf1b803ee44a72b749fb9460238cbd
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
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 Oct 2, 2026.
Transparency log