Backed by mandō

Configuration injection,
perfected.

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.

0 ms subshell overhead
100% state persistence
file types supported

Trusted by teams who refuse to use subshells

dotenv ShellCorp BashForge ProfileIO EnvStack InitSys
Core Platform

Every injection primitive your shell needs

From .bashrc to .env to custom function libraries — Sourcery reads and executes commands from any file in your current execution context.

💉

Current-Context Execution

Commands execute in your current shell — not a subshell. Variables, functions, and aliases persist after the file completes. True state injection.

📂

Universal File Support

Source .bashrc, .profile, .env, or any file containing shell commands. If it's text, Sourcery executes it.

🎯

Positional Arguments

Pass arguments directly: sourcery config.sh prod us-east. Access them as $1, $2 inside the file. Dynamic configuration at injection time.

🔍

$PATH Discovery

No slash in your filename? Sourcery searches $PATH automatically. Centralize configs, source them from anywhere. Zero hardcoded paths.

Dot Shorthand

The . builtin is the POSIX-portable alias for sourcery. Two characters, same power. Ship cross-shell compatible scripts effortlessly.

🔄

Function Injection

Define functions in external files and inject them into your session. Build modular shell libraries loaded on demand.

🛡️

Return Control

Use return inside a sourced file to stop execution and bubble up an exit status — without killing your shell. Graceful bailout built in.

🗂️

Path Override

The -p path option lets you specify a custom colon-separated search path. Bypass $PATH without modifying it.

How It Works

Three steps to shell transformation

Sourcery's injection pipeline is elegantly simple — and devastatingly effective.

01

Locate the File

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).

02

Read & Execute

Every command in the file is read and executed line by line in your current shell environment. No fork, no subshell, no isolation boundary.

03

State Persists

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.

Interactive Demo

Injection Visualizer

Watch configuration flow from file to shell in real time. Select a scenario to see Sourcery in action.

📄 Source File
source .
🖥️ Shell State
Configuration Registry

Every file type Sourcery supports

From startup profiles to custom function libraries — if it has shell commands, Sourcery injects it.

🏠

.bashrc

Per-interactive-shell startup. Aliases, prompt customization, shell options. The backbone of every developer environment.

sourcery ~/.bashrc
🔑

.profile

Login shell initialization. PATH setup, environment variables, SSH agent configuration. Runs once per session.

. ~/.profile
🌍

.env

Application environment variables. API keys, database URLs, feature flags. The 12-factor app's best friend.

sourcery .env.production
🧩

functions.sh

Reusable function libraries. Inject utility functions on demand. Build a modular shell toolkit.

sourcery lib/functions.sh
⚙️

completions

Programmable completion definitions. Tab-complete everything. Loaded dynamically via Sourcery.

sourcery /etc/bash_completion
🎨

themes

Prompt themes and color schemes. Switch your shell's visual identity with a single source command.

sourcery themes/dracula.sh
Shell Transformation

Before & after injection

See exactly how your shell state changes when Sourcery processes a configuration file.

Before: source .env
$ echo $API_KEY
(empty)
$ echo $DB_HOST
(empty)
$ type deploy
-bash: type: deploy: not found
$ alias ll
-bash: alias: ll: not found
source
.env
After: source .env
$ echo $API_KEY
sk-prod-9xQ7mR...
$ echo $DB_HOST
db.sourcery.io
$ type deploy
deploy is a function
$ alias ll
alias ll='ls -lah --color=auto'
Pricing

Simple injection, simple pricing

Every plan includes current-context execution. No subshell fees. No isolation tax.

Dot
Free
POSIX-portable forever
  • Single-file sourcing
  • . filename shorthand
  • Current-shell execution
  • $PATH auto-discovery
  • Community support
Get Started
Injection Suite
$199/mo
per organization
  • Everything in Source
  • Custom -p path overrides
  • Configuration registry
  • Shell state snapshots
  • Audit logging
  • Dedicated account manager
Contact Sales
Testimonials

Trusted by shell professionals

★★★★★

"I used to run scripts in subshells like a barbarian. Sourcery changed everything. My variables actually persist now. Revolutionary."

Rachel .bashrc Senior DevOps Engineer, ProfileIO
★★★★★

"We went from manually exporting 47 environment variables to a single 'source .env' command. 98% reduction in keystrokes. Our compliance team wept with joy."

Marcus Envvar Platform Lead, ShellCorp
★★★★★

"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."

Dot Slasher CTO, InitSys
FAQ

Frequently asked questions

How is Sourcery different from running a script?

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.

What's the difference between 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.

Can I pass arguments to a sourced file?

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.

How does $PATH searching work?

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.

What happens if the sourced file has an error?

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.

Is Sourcery safe for production environments?

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.

Ready to inject your configuration?

Stop spawning subshells. Stop losing state. Source your files like you mean it.

No credit card required · Full current-context execution · Cancel anytime