A Simple & Extensible Dotfile and Computing Environments Manager That Facilitates Your Terminal Operations
ไธไธช็ฎๅ & ๅฏๆฉๅฑ็๏ผ็จไบ็ฎๅๆไฝ็ dotfile ๅ่ฎก็ฎ็ฏๅข็ฎก็ๅทฅๅ ท
oxidizer is originally designed for non-administrator users. It saves your time from repetitive and tedious setups of coding environments, and it aims to provide with following features:
- Cross-Platform (mainly Rust toolchains)
- Minimal Dependencies & Minimal Installation
- Extensible Architecture
- Unified Interface & Smooth Usage
- Barely affect loading (loading time < 1 s)
oxidizer ่ตทๅไธป่ฆไธบ้็ฎก็ๅ็จๆท่ฎพ่ฎก๏ผๅจๅฎ้ชๅฎค็ไธๅ่ฎก็ฎๆบไธๅๅคๆญๅปบ็ฏๅข็็ๅพ็ฆ๏ผ๏ผ็จไบๅฟซ้ๆญๅปบ่ทจๅนณๅฐ็ปไธ็ๅทฅไฝ็ฏๅข๏ผ้ฟๅ ้ๅคๅ็น็็็ฏๅข้ ็ฝฎๅณๅจ๏ผๅ ถๅ ทๆ็น็น
- ่ทจๅนณๅฐ๏ผไธป่ฆๅบไบ Rust ๅทฅๅ ท้พ๏ผ
- ๆๅฐไพ่ต & ๆๅฐๅฎ่ฃ
- ๅฏๆฉๅฑๆถๆ
- ็ปไธๆฅๅฃ & ไธๆปๆไฝ
- ๅ ไนไธๅฝฑๅๅ ่ฝฝ๏ผ๏ผ่ฝฝๅ ฅๆถ้ด < 1 ็ง๏ผ
Although this toy program uses a lot of rust-based CLI, its name just came out of the pattern "element-oxidizer-oxide" when I was a student in biochemistry.
่ฝ็ถ่ฟไธช็ฉๅ ท็จๅบไฝฟ็จไบๅพๅคๅบไบ rust ็ CLI๏ผไฝๅฎ็ๅๅญๅชๆฏๅจๆ่ฟๆฏ็ๅไธไธ็ๅญฆ็ๆถไปๆจกๅผ"ๅ่ดจ - ๆฐงๅๅ - ๆฐงๅ็ฉ"ไธญๅๅบๆฅ็ใ
Based on the name origin of the program, the program creates 3 main variables
- OX_ELEMENT: config files of softwares
- OX_OXIDE: backup of the config files
- OX_OXYGEN: config files in oxidizer
ๆ นๆฎ็จๅบ็ๅ็งฐ่ตทๆบ๏ผ็จๅบไผๅๅปบ 3 ไธชไธป่ฆๅ้
-
OX_ELEMENT: ่ฝฏไปถ็้ ็ฝฎๆไปถ
-
OX_OXIDE: ้ ็ฝฎๆไปถ็ๅคไปฝ
-
OX_OXYGEN: oxidizer ่ชๅธฆ็้ ็ฝฎๆไปถ
-
rff- refresh file by
source
- refresh file by
-
edf- edit file by
$EDITOR(default: VSCode)
- edit file by
-
brf- file: browse by
bat/cat - folder: browse by
lsd/ls
- file: browse by
-
ipf(import file, alias:rdf)- reduce file: overwrite configuration file by backup (customized) file
-
epf(export file, alias:oxf)- oxidize file: backup configuration file to backup folder
-
iif(initialize file, alias:clzf)- catalyze file: overwrite configuration file by oxidizer defaults
-
ppgf- propagate file: backup oxidizer defaults to backup folder
For example, if you want to edit ~/.zshrc, you can type edf zs.
When you epf zs (export file), ~/.zshrc will be copied and save in folder backup folder
As mentioned in Get Started, you can open custom.json simply by edf ox.
In the custom.json, edit the oxides map to predefine the specific backup path, where oxide_folder is the backup root path relative to $HOME. Note that the key should be set as bk + [key in OX_ELEMENT].
{
"oxide_folder": "Documents",
"oxides": {
"bkox": "shell/custom.json",
"bkoxw": "shell/custom.json",
"bkoxj": "shell/custom.json",
"bkb": "unix/Brewfile",
"bkvi": "shell/.vimrc",
"bkss": "shell/starship.toml",
"bkg": "../notes/.gitconfig",
"bkzs": "shell/.zshrc",
"bkbs": "shell/.bash_profile"
}
}The table below lists the information of specific configuration files:
_denotes a folder, and you can check these abbreviations closely bybrf [Plugin Abbr.]|edf [Plugin Abbr.].
oxidizer uses ouch to deal with compression and decompression, and provides with 3 shortcuts
zpf: compress filezpfr: decompress filezpfls: list items in the compressed file
For macOS / Linux (Intel)
export OXIDIZER=$HOME/oxidizer
git clone --depth=1 https://github.com/ivaquero/oxidizer.git $OXIDIZER && bash oxidizer/install.shNote that Homebrew is an essential dependency for oxidizer on macOS / Linux.
- ๅฏนไธญๅฝๅคง้็จๆท๏ผๅฏ่ฎพ็ฝฎ
BREW_CNๅ้ๆฅไธ่ฝฝๅฎ่ฃ Homebrew๏ผ
export BREW_CN=1For Windows
$env:OXIDIZER = "$HOME\oxidizer"
git clone --depth=1 https://github.com/ivaquero/oxidizer.git $env:OXIDIZER; . oxidizer\install.ps1- ๅฏนไธญๅฝๅคง้็จๆท๏ผๅฏ่ฎพ็ฝฎ
SCOOP_CNๅ้ๆฅไธ่ฝฝๅฎ่ฃ
$env:scoop_mirror = 1For Cmderrs, you need to remove the
-Options ReadOnlyfromSet-Item -Path function:\prompt -Value $Prompt -Options ReadOnlyin the last line of%CMDER_ROOT%\vendor\profile.ps1.ๅฏนไบ Cmder ็จๆท๏ผไฝ ้่ฆๅ ้ค
%CMDER_ROOT%\vendor\profile.ps1็ๆๅไธ่กSet-Item -Path function:\prompt -Value $Prompt -Options ReadOnlyไธญ็-Options ReadOnlyใ
After installation, you might personalize your preference in custom.json, check defaults.json. Open custom.json by following command
ๅฎ่ฃ
ไนๅ๏ผๆจๅฏไปฅๅจcustom.jsonไธญไธชๆงๅๆจ็็ณป็ป็ฏๅข๏ผ่ฏทๅ่defaults.json๏ผ้่ฟไธไธๅฝไปคๆๅผ
edf oxTo keep up the updates, simply upox function.
ๅฏไฝฟ็จ upox ๅฝไปคๆฅๆดๆฐ oxidizer
Oxidizer ็ไธป่ฆ็ฎๆ
Oxidizer is originally designed for non-administrator users. It saves your time from repetitive and tedious setups of coding environments, and it aims to provide with following features:
- Cross-Platform (mainly Rust toolchains)
- Minimal Dependencies & Minimal Installation
- Extensible Architecture
- Unified Interface & Smooth Usage
- Super-Fast! (loading time < 1 s)
Oxidizer ่ตทๅไธป่ฆไธบ้็ฎก็ๅ็จๆท่ฎพ่ฎก๏ผ็จไบๅฟซ้ๆญๅปบ่ทจๅนณๅฐ็ปไธ็ๅทฅไฝ็ฏๅข๏ผ้ฟๅ ้ๅคๅ็น็็็ฏๅข้ ็ฝฎๅณๅจ๏ผๅ ถๅ ทๆ็น็น
- ่ทจๅนณๅฐ๏ผไธป่ฆๅบไบ Rust ๅทฅๅ ท้พ๏ผ
- ๆๅฐไพ่ต & ๆๅฐๅฎ่ฃ
- ๅฏๆฉๅฑๆถๆ
- ็ปไธๆฅๅฃ & ไธๆปๆไฝ
- ่ถ ็บงๅฟซ๏ผ๏ผ่ฝฝๅ ฅๆถ้ด < 1 ็ง๏ผ
โ๏ธ means required in the installation.
- coreutils
- bat โถ
cat - lsd โถ
ls - uutils-coreutils โถ
coreutils
- bat โถ
- non-coreutils
WezTermis more recommended because it has a built-in multiplexer.
- ouch: Painless compression and decompression tool
oxidizer is designed to be extensible, you can personalize plugin_load in config.json to load the plugins by your need.
Of course, you are allowed to write your own plugins, see Writing A Plugin for details.
The plugins are hosted in oxplugins as well as oxplugins-powershell.
ๆไปถไฝไบ oxplugins ๅ oxplugins-powershell
To load a plugin, simply add its abbreviation into the OX_PLUGINS array of ~/oxidizer/config.json, like
{
"plugin_load": [
"cli_espanso",
"cli_jupyter",
"cli_ollama",
"cli_vscode",
"lang_julia",
"lang_ruby",
"lang_rust",
"pkg_conda",
"pkg_npm",
"pkg_tlmgr"
]
}| Filename | Category | Support |
|---|---|---|
os_macos |
OS Shortcuts | macOS |
os_debian |
OS Shortcuts | Debian-Based Systems |
os_redhat |
OS Shortcuts | RedHat-Based Systems |
os_windows |
OS Shortcuts | Windows (include winget) |
pkg_brew |
Package Manager | Homebrew (macOS & Linux) |
pkg_scoop |
Package Manager | Scoop (Windows) |
pkg_conda |
Package Manager | Conda (Multi-Languages) |
pkg_npm |
Package Manager | NPM + PNPM (JavaScript) |
pkg_pixi |
Package Manager | Pixi (Multi-Languages) |
pkg_tlmgr |
Package Manager | tlmgr (TeXLive) |
cli_bitwarden |
App CLI | Bitwarden |
cli_espanso |
App CLI | Espanso |
cli_jupyter |
App CLI | Jupyter (notebook, lab, book) |
cli_ollama |
App CLI | Ollama |
cli_vscode |
App CLI | VSCode |
lang_julia |
Language | Julia |
lang_ruby |
Language | Ruby (include gem) |
lang_rust |
Language | Rust (include cargo, rustup) |
utils_files |
System Utils | File Operation |
utils_formats |
System Utils | Formats Conversion |
utils_networks.sh |
System Utils | Network Configuration |
xtra_notes |
Extra Utils | Notes Apps (Obsidian & Logseq) |
oxidizer aims to provide a unified interface for all package manager-related commands to reduce typing and memory burden of command-liners.
| Suffix | Action | brew b |
scoop s |
conda c |
npm n |
cargo cg |
rustup rs |
julia jl |
pixi px |
gem rb |
tlmgr tl |
|---|---|---|---|---|---|---|---|---|---|---|---|
*h |
help | โ | โ | โ | โ | โ | โ | โ | โ | โ | |
*cf |
config | โ | โ | โ | โ | ||||||
*is |
install | โ | โ | โ | โ | โ | โ | โ | โ | โ | โ |
*us |
uninstall | โ | โ | โ | โ | โ | โ | โ | โ | โ | โ |
*up |
update | โ | โ | โ | โ | โ | โ | โ | โ | โ | โ |
*ups |
update self | โ | โ | โ | |||||||
*ls |
list | โ | โ | โ | โ | โ | โ | โ | โ | โ | โ |
*lv |
leaves | โ | โ | โ | โ | โ | โ | โ | |||
*sc |
search | โ | โ | โ | โ | โ | โ | โ | |||
*cl |
clean | โ | โ | โ | โ | โ | โ | โ | โ | ||
*if |
info | โ | โ | โ | โ | โ | โ | ||||
*st |
status | โ | โ | โ | โ | ||||||
*ck |
check | โ | โ | โ | โ | โ | โ | โ | โ | ||
*pn |
pin | โ | โ | โ | |||||||
*upn |
unpin | โ | โ | โ | |||||||
*dp |
depends | โ | โ | โ | โ | โ | โ | ||||
*dpr |
needs | โ | โ | ||||||||
*xa |
add repo | โ | โ | โ | |||||||
*xrm |
remove repo | โ | โ | โ | |||||||
*xls |
list repo | โ |
Some package managers also have functionality of project management
| Suffix | Action | brew b |
scoop s |
conda c |
npm n |
cargo cg |
rustup rs |
julia jl |
pixi px |
gem rb |
|---|---|---|---|---|---|---|---|---|---|---|
*ii |
init | โ | โ | โ | โ | |||||
*cr |
create | โ | โ | โ | โ | |||||
*b |
build | โ | โ | โ | ||||||
*r |
run | โ | โ | โ | โ | โ | โ | |||
*ed |
edit | โ | ||||||||
*ct |
cat | โ | โ | โ | ||||||
*ln |
link | โ | ||||||||
*ts |
test | โ | โ | โ | โ | |||||
*au |
audit | โ | โ | |||||||
*fx |
fix | โ | โ | โ | ||||||
*pb |
publish | โ | โ |
Some of the package managers shortcuts are included in corresponding system plugins.
ox-os-macos: auto-loaded, contains alias and functions formasox-os-debians: auto-loaded, contains alias and functions foraptox-os-windows: auto-loaded, contains alias and functions forwingetandwsl
| Suffix | Action | mas m |
apt a |
winget w |
wsl wl |
|---|---|---|---|---|---|
*h |
help | โ | โ | โ | โ |
*is |
install | โ | โ | โ | โ |
*us |
uninstall | โ | โ | โ | โ |
*up |
update | โ | โ | โ | โ |
*ups |
update self | โ | โ | โ | |
*ls |
list | โ | โ | โ | |
*lv |
leaves | ||||
*sc |
search | โ | โ | ||
*cl |
clean | โ | โ | โ | |
*if |
info | โ | โ | โ | |
*st |
status | โ | |||
*ck |
check | โ | |||
*dp |
depends | โ | |||
*xa |
add repo | โ | โ | ||
*xrm |
remove repo | โ | โ | ||
*xls |
list repo | โ | โ |
bis: brew installbris: brew reinstall
suffix c is a flag to specify brew commands only work on casks
-
bisc: brew install --cask -
brisc: brew reinstall --cask -
bupc: brew upgrade --cask -
brp [cask]: replace brew cache file by pre-downloaded file
Note that some shortcuts of the ox-conda plugin is based on the package conda-tree that you need to install
conda install -c conda-forge conda-treeBesides the shortcuts mentioned above in Package Management, the conda plugin also provides with Conda environment management shortcuts which start with ce
ceat: activate environment$1length = 0: activatebaseenv$1length = 1 | 2: activate predefined envOX_CONDA_ENV$1length > 2: activate new env
OX_CONDA_ENV can be personalized in custom.json
For example, assume your environment's name is hello, you can set
# macOS / Linux
OX_CONDA_ENV[h]="hello"
# Windows
$Global:OX_CONDA_ENV.h = "hello"then, you will be able to manipulate the environment by
# create environment
cecr h
# remove environment
cerm h
# update all packages in the specific environment
cup h
# list all packages in the specific environment
cls hcerat: reactivate environment, works liveceatceq: quit environment (qis forkill/quit)cecr: createcerm: remove environment, works liveceatbut won't removebaseenvcels: environment listcedf: compare packages between conda environmentscern: renames an existing environmentcesd: change environment'sconda-forge subdiri: forosx-64|linux-64|win-64a: forosx-arm64|linux-aarch64|win-arm64p: forppc64les: forlinux-s390x
ceep: export environment
back_* and up_* work for brew, scoop, conda, vscode (only for windows), julia, tlmgr, npm. clean_* works for brew and conda.
back_*- file: export package/extension info into
$OX_BACKUPfolder
- file: export package/extension info into
up_*- file: install packages/extensions by predefined files in
$OX_BACKUP
- file: install packages/extensions by predefined files in
clean_*- file: clean package/extension info by predefined files in
$OX_BACKUPfolder
- file: clean package/extension info by predefined files in
-
gclhs: delete commit history
for aliases, check .gitconfig in defaults folder by edf oxg
This work is released under the GPL-v3 license.
่ฟไธช้กน็ฎๅจ GPL-v3 ่ฎธๅฏไธๅๅธ

