OSA uses profiles to filter which snippet types get loaded into your shell. This lets each developer get only the tools and aliases relevant to their work.
| Profile | Purpose | Best For |
|---|---|---|
| web | Frontend/web development | React, Vue, Svelte, npm, webpack, build tools |
| backend | Backend/polyglot development | APIs, databases, microservices, Docker |
| react-native | Mobile app development | iOS/Android with React Native, Expo |
| node | Node.js specific | Node development, npm/yarn/pnpm, ts-node |
| everything | All profiles combined | Need all development tools |
You can combine multiple profiles (comma-separated):
{
"profile": "web,backend"
}This loads snippets from both web/ and backend/ directories.
# Full stack development
"profile": "web,backend"
# Mobile + web
"profile": "react-native,web"
# Everything
"profile": "everything"- Specified in config → User selects profile during setup or in JSON config
- Saved to ~/.osa-config →
OSA_PROFILE="web,backend" - osa-snippets reads it → Only sources snippets from those profile directories
- Snippets loaded at shell init → User gets only relevant aliases and functions
| Config | Profile | Description |
|---|---|---|
minimal.json |
web |
Core shell with basic web snippets |
web.json |
web |
Frontend-focused setup |
backend.json |
backend |
Backend/polyglot development |
react-native.json |
react-native,node |
Mobile + Node development |
ios.json |
react-native,web |
iOS development with web tools |
android.json |
react-native,web |
Android development with web tools |
everything.json |
everything |
All available profiles |
Snippets are organized by profile:
src/zsh/plugins/
├── shared/ # Always loaded (git, oh-my-zsh, etc)
│ ├── git-setup.zsh
│ └── oh-my-zsh-setup.zsh
├── web/ # If profile contains "web"
│ ├── npm-aliases.zsh
│ └── webpack.zsh
├── backend/ # If profile contains "backend"
│ ├── docker-aliases.zsh
│ └── database-tools.zsh
├── react-native/ # If profile contains "react-native"
│ ├── android-setup.zsh
│ └── emulator-aliases.zsh
└── node/ # If profile contains "node"
├── nodemon-aliases.zsh
└── ts-node-setup.zsh
./osa-cli.zsh --interactiveYou'll be prompted:
What development profiles do you use?
(web, backend, react-native, node, everything)
Enter comma-separated profiles: web,backend
# Automatically uses the profile from the config
./osa-cli.zsh --config web
./osa-cli.zsh --config backend
./osa-cli.zsh --config react-nativeCreate a config with your desired profile:
{
"version": "1.0",
"profile": "web,backend",
"components": { ... }
}Then run:
./osa-cli.zsh --config-file my-config.jsonCheck what profile is set:
grep OSA_PROFILE ~/.osa-config
# Output: OSA_PROFILE="web,backend"Edit ~/.osa-config and update the OSA_PROFILE line:
# Before
OSA_PROFILE="web"
# After
OSA_PROFILE="web,backend"Then restart your shell or run:
source ~/.osa-configWhen you set profile: "web,backend", OSA loads:
-
Shared snippets (always):
- Core OSA setup
- Oh My Zsh configuration
- Git configuration
- Common aliases
-
Web snippets:
- npm aliases (npm-audit, npm-outdated, etc)
- webpack shortcuts
- React/Vite/build tool aliases
-
Backend snippets:
- Docker aliases (docker-clean, docker-logs, etc)
- Database connection tools
- API testing shortcuts (curl-json, curl-post, etc)
Users don't load snippets they don't need, keeping shells lean and fast.
Q: Can I change my profile later?
A: Yes, edit ~/.osa-config and restart your shell.
Q: What if I select a profile I don't need? A: Extra snippets won't hurt, but you'll have unnecessary aliases. Change to a profile that matches your work.
Q: Can I have multiple profiles on one machine?
A: Currently, you get one profile per shell configuration. You could maintain different OSA installations for different profiles, or just use everything.
Q: Do profiles affect which runtimes are installed?
A: No, profiles only filter snippets. Runtimes are controlled by the runtimes section in your config file.
Q: What about my constructors?
A: Constructors are always loaded (in src/zsh/constructors/). Profiles don't affect them. You have full control via constructors.