Skip to main content

Swytchit

Switch environment context easily in the shell

Usage

sw your/project/directory
  • Performs a cd operation to the project
  • Starts a subshell
  • Within the subshell, runs source on .swytchitrc.sh files 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 op CLI 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)

Source distribution for swytchit 2.0.0
File Size Uploaded
swytchit-2.0.0.tar.gz 3.4 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for swytchit 2.0.0
File Interpreter ABI Platform
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 log

Release 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

Release history Release notifications | RSS feed

This release

2.0.0 This release

2 release files

1.0.1

2 release files

1.0.0

2 release files

0.2.1

2 release files

0.2.0

2 release files

0.1.2

2 release files

0.1.1

2 release files

0.1.0

2 release files

0.0.2

2 release files

0.0.1

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page