Sourcery reads and executes commands from any file directly into your running shell environment. Variables, functions, aliases — injected into your current context. No subshell. No isolation. Pure state transformation.
Trusted by teams who refuse to use subshells
From .bashrc to .env to custom function libraries — Sourcery reads and executes commands from any file in your current execution context.
Commands execute in your current shell — not a subshell. Variables, functions, and aliases persist after the file completes. True state injection.
Source .bashrc, .profile, .env, or any file containing
shell commands. If it's text, Sourcery executes it.
Pass arguments directly: sourcery config.sh prod us-east. Access them as
$1, $2 inside the file. Dynamic configuration at injection time.
No slash in your filename? Sourcery searches $PATH automatically. Centralize
configs, source them from anywhere. Zero hardcoded paths.
The . builtin is the POSIX-portable alias for sourcery. Two characters,
same power. Ship cross-shell compatible scripts effortlessly.
Define functions in external files and inject them into your session. Build modular shell libraries loaded on demand.
Use return inside a sourced file to stop execution and bubble up an exit status —
without killing your shell. Graceful bailout built in.
The -p path option lets you specify a custom colon-separated search path. Bypass
$PATH without modifying it.
Sourcery's injection pipeline is elegantly simple — and devastatingly effective.
Provide a filename. If it contains a /, Sourcery reads it directly. If not, it
searches $PATH (or falls back to the current directory when not in POSIX mode).
Every command in the file is read and executed line by line in your current shell environment. No fork, no subshell, no isolation boundary.
Variables are set. Functions are defined. Aliases are registered. Your shell is permanently transformed. The exit status of the last command becomes the return value.
Watch configuration flow from file to shell in real time. Select a scenario to see Sourcery in action.
From startup profiles to custom function libraries — if it has shell commands, Sourcery injects it.
Per-interactive-shell startup. Aliases, prompt customization, shell options. The backbone of every developer environment.
sourcery ~/.bashrc
Login shell initialization. PATH setup, environment variables, SSH agent configuration. Runs once per session.
. ~/.profile
Application environment variables. API keys, database URLs, feature flags. The 12-factor app's best friend.
sourcery .env.production
Reusable function libraries. Inject utility functions on demand. Build a modular shell toolkit.
sourcery lib/functions.sh
Programmable completion definitions. Tab-complete everything. Loaded dynamically via Sourcery.
sourcery /etc/bash_completion
Prompt themes and color schemes. Switch your shell's visual identity with a single source command.
sourcery themes/dracula.sh
See exactly how your shell state changes when Sourcery processes a configuration file.
Every plan includes current-context execution. No subshell fees. No isolation tax.
. filename shorthand-p path overrides"I used to run scripts in subshells like a barbarian. Sourcery changed everything. My variables actually persist now. Revolutionary."
"We went from manually exporting 47 environment variables to a single 'source .env' command. 98% reduction in keystrokes. Our compliance team wept with joy."
"The dot shorthand alone saved us 6 characters per invocation. At our scale, that's 4.2 million keystrokes per year. The ROI is insane."
When you run a script with bash script.sh, it executes in a subshell. Any variables
set are lost when it exits. With sourcery script.sh, commands execute in your current
shell — variables, functions, and aliases persist permanently. It's the difference between a
letter and a live injection.
sourcery and .?Functionally identical. The . (dot) command is the POSIX-standard form, available in
every Bourne-compatible shell. sourcery is the Bash-specific syntax. We recommend
. for portability and sourcery for readability.
Absolutely. sourcery config.sh production us-east-1 makes "production" available as
$1 and "us-east-1" as $2 inside config.sh. Original positional
parameters are restored after execution.
If the filename contains no slash, Sourcery searches each directory in $PATH for the
file. When not in POSIX mode, it also checks the current directory as a fallback. Use
-p path to specify a custom search path.
Sourcery returns the exit status of the last command executed. If the file isn't found or can't
be read, it returns non-zero. Use return inside a sourced file to exit early
without killing your shell.
Sourcery operates with the full permissions of your shell session. Only source files you trust — the injected commands have complete access to your environment. We recommend auditing all configuration files before injection.
Stop spawning subshells. Stop losing state. Source your files like you mean it.
No credit card required · Full current-context execution · Cancel anytime