Oxidizer
Simple & Extensible Dotfile Manager using Rust Toolchains (PRs and Forks are welcome !)
Let's Oxidize Development Environments
1. Get Started
For macOS / Linux (Intel)
git clone --depth=1 https://github.com/ivaquero/oxidizer.git && bash oxidizer/install.sh
# customize path for Oxidizer
export OXIDIZER=$HOME/oxidizer
Note that Homebrew is an essential dependency for Oxidizer on macOS / Linux. For China mainland users, you may set BREW_CN
variable to install Homebrew through domestic mirror
export BREW_CN=1
Note that Oxidizer only support limited functionality on Linux-on-ARM yet.
For Windows
git clone --depth=1 https://github.com/ivaquero/oxidizer.git; . oxidizer\install.ps1
# customize path for Oxidizer
$env:OXIDIZER = "$HOME\oxidizer"
Note that Scoop is an essential dependency for Oxidizer on Windows. For China mainland users, you may set SCOOP_CN
variable to install Scoop through domestic mirror
$env:scoop_mirror = 1
For Cmder users, you need to remove the
-Options ReadOnly
fromSet-Item -Path function:\prompt -Value $Prompt -Options ReadOnly
in the last line of%CMDER_ROOT%\vendor\profile.ps1
.
After installation, you might personalize your preference in custom.sh
or custom.ps1
, check defaults.sh or defaults.ps1. Open custom.sh
or custom.ps1
by following command
edf ox
To keep up the updates, simply use upox
function.
2. Motivation
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)
2.1. CLI Tools Replacement
โ๏ธ means required in the installation.
- coreutils
- Use uutils-coreutils instead of
coreutils
- Use bat instead of
cat
- Use lsd instead of
ls
- Use uutils-coreutils instead of
- non-coreutils
Nushell
is a cross-platform written in Rust, but it doesn't support dynamical path for the moment.
2.2. TUI Tools Replacement
- Use bottom instead of
top
orhtop
- Use gitui instead of
lazygit
- Use helix instead of
neovim
- Use zellij instead of
tmux
(Not support Windows yet)
2.3. GUI Tools Replacement
WezTerm
is more recommended because it has a built-in multiplexer.
2.4. Other Useful Rust Tools
- ouch: Painless compression and decompression tool
- pueue: Command-line task management tool for sequential and parallel execution of long-running tasks.
- espanso: Text Expander written in Rust (try it for fun!)
- kondo: A tool to clean dependencies and build artefacts from your projects.
- navi: An interactive cheatsheet tool for the command-line
- onefetch: Command-line Git information tool
2.5. Summary of Plugins
Oxidizer is designed to be extensible, you can personalize OX_PLUGINS
in custom.sh
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-Zsh and OxPlugins-PowerShell
Plugin | Linux | macOS | Windows | Autoload? |
---|---|---|---|---|
Brew | โ | โ | โ | โ |
Scoop | โ | โ | โ | โ |
Pueue | โ | โ | โ | โ |
System | โ ยน | โ | โ | โ |
Utility | โ | โ | โ | โ |
Git | โ | โ | โ | |
Bitwarden | ๐ | ๐ | ๐ | |
Conan | โ | โ | โ | |
Conda | โ | โ | โ | |
Julia | โ | โ | ๐ง | |
Jupyter | โ | โ | โ | |
Node | โ | โ | โ | |
Rust | โ | โ | โ | |
Espanso | โ | โ | โ | |
TeXLive | โ | โ | โ | |
VSCode | โ | โ | โ | |
Containerยฒ | โ | โ | โ | |
Helix | ๐ | ๐ | ๐ | |
Formats | ๐ | ๐ | ๐ | |
Weather | ๐ | ๐ | ๐ | |
Notes | ๐ | ๐ | ๐ |
โ : complete functionality ๐ง: partial functionality ๐: basic functionality, needs more features โ: not exist
ยน: Currently, on Linux only provide with Debian-family shortcuts
Oxidizer uses Homebrew or Scoop to manage packages and software programs to bypass the requirement of administrator privilege.
3. File Management
frf
- 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
- overwrite system configurations by customized (backup) files
epf
- export system configurations to back up folder
iif
- overwrite system configurations in by Oxidizer defaults.
For example, if you want to edit ~/.zshrc
, you can type edf zs
.
When you use epf zs
, ~/.zshrc
will be copied and save in $OX_BACKUP/shell
folder, where $OX_BACKUP
is the backup path that can be personalized in $OXIDIZER/custom.sh
. As mentioned in Get Started, you can open custom.sh
simply by edf ox
.
The table below lists the information of specific configuration files:
Origin | Abbreviation | Corresponding File |
---|---|---|
oxidizer | ox |
custom.sh |
zsh | zs |
.zshrc |
powershell | ps |
Profile.ps1 |
linux (debian) | sc |
/etc/apt/sources.list |
wezterm | wz |
wezterm.lua |
conda | c |
.condarc |
git | g |
.gitconfig |
git | gi |
.gitignore |
conan | cn |
conan.conf |
conan | cnr |
remotes.json |
conan | cnd |
profiles/default |
espanso | es |
default.yml |
espanso | esb |
match/base.yml |
espanso | esx_ |
match/packages |
helix | hx |
config.toml |
helix | hxl |
languages.toml |
julia | jl |
startup.jl |
julia | jlx |
julia-pkgs.txt |
julia | jlp |
Project.toml |
julia | jlm |
Manifest.toml |
jupyter | jn |
jupyter_notebook_config.py |
latex | tl |
texlive-pkgs |
node | nj |
.npmrc |
node | njx |
node-pkgs.txt |
pueue | pu |
pueue.yml |
pueue | pua |
pueue_aliases.yml |
cargo | cg |
config.toml |
rustup | rs |
settings.toml |
starship | ss |
starship.toml |
vscode | vs |
settings.json |
vscode | vsk |
keybindings.json |
vscode | vss_ |
snippets |
vscode | vsx |
vscode-pkgs.txt |
winget | w |
winget.json |
zellij | zj |
config.kdl |
zellij | zjl_ |
layouts |
_
denotes a folder
Oxidizer uses ouch
to deal with compression and decompression, and provides with 3 shortcuts
zpf
: compress fileuzpf
: decompress filelzpf
: list items in the compressed file
4. Software Information Management
back_*
and up_*
work for brew
, scoop
, conda
, vscode
(only for windows), julia
, texlive
, node
. clean_*
works for brew
and conda
.
back_*
- file: export package/extension info into
$OX_BACKUP
folder
- 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_BACKUP
folder
- file: clean package/extension info by predefined files in
5. Package Management
Oxidizer aims to provide a unified interface for all package manager-related commands to reduce typing and memory burden of command-line users.
Suffix | Action | brew b |
scoop s |
conda c |
npm n |
cargo cg |
rustup rs |
julia jl |
conan cn |
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 | โ | โ | โ | โ | โ | โ | |||
*rdp |
needs | โ | โ | |||||||
*xa |
add repo | โ | โ | โ | โ | |||||
*xrm |
remove repo | โ | โ | โ | โ | |||||
*xls |
list repo | โ | โ |
Particularly, Oxidizer provides with two groups of experimental functions with suffix p
for installing and downloading packages in parallel
- brew:
bisp
,biscp
,bupp
- scoop:
sisp
,supp
For example, when you have more than 1 packages to install, instead of using bis [pkg1] [pkg2]
, you can use bisp [pkg1] [pkg2]
then the packages will be downloaded and installed in parallel.
Similarly, biscp
, bupp
, are the parallel version of bisc
, bup
, respectively.
Before using parallel functions, pueue
service need to be enabled by
# All OS
pueued -d
# or macOS / Linux
bss pu
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 |
conan cn |
---|---|---|---|---|---|---|---|---|---|
*ii |
init/create | โ | โ | โ | โ | โ | โ | ||
*b |
build | โ | โ | โ | |||||
*r |
run | โ | โ | โ | โ | โ | |||
*ed |
edit | โ | |||||||
*ca |
cat | โ | โ | ||||||
*ln |
link | โ | |||||||
*ts |
test | โ | โ | โ | โ | โ | |||
*au |
audit | โ | โ | ||||||
*fx |
fix | โ | โ | โ | |||||
*pb |
publish | โ | โ |
Some of the package managers shortcuts are included in corresponding system plugins.
ox-macos
: autoloaded, contains alias and functions formas
ox-debians
: autoloaded, contains alias and functions forapt
ox-windows
: autoloaded, contains alias and functions forwinget
andwsl
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 | โ | โ |
5.1. Homebrew
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 -
bupg
: brew upgrade --greedy -
brp
: replace brew cache file by pre-downloaded file -
bmr
: using brew mirror -
bmrq
: reset brew git source to official repositories,q
is for quit.
5.2. Conda
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-tree
Besides the shortcuts mentioned above in Package Management, the conda plugin also provides with Conda environment management shortcuts which start with ce
ceat
: activate environment$1
length = 0: activatebase
env$1
length = 1 or 2: activate predefined envOX_CONDA_ENV
$1
length > 2: activate new env
OX_CONDA_ENV
can be personalized in custom.sh
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 h
cerat
: reactivate environment, works liveceat
ceq
: quit environment (q
is forkill/quit
)cecr
: createcerm
: remove environment, works liveceat
but won't removebase
envcels
: environment listcedf
: compare packages between conda environmentscern
: renames an existing environmentcesd
: change environment'sconda-forge subdir
i
: forosx-64
orlinux-64
orwin-64
a
: forosx-arm64
orlinux-aarch64
orwin-arm64
p
: forppc64le
s
: forlinux-s390x
ceep
: export environment
6. Further Reading
7. Credits
8. License
This work is released under the GPL-v3 license.