BoxXy (peka case) adalah alat untuk bertinju aplikasi Linux yang salah dan memaksa mereka untuk meletakkan file dan direktori mereka di tempat yang tepat, tanpa symlink!
BoxXy adalah bagian dari server Amyware Discord.
Jika Anda menyukai apa yang saya buat, pertimbangkan untuk mendukung saya di Patreon:
Linux saja! BoxXy menggunakan Linux Namespaces untuk fungsinya.
Misalnya, pertimbangkan tmux. Ia ingin menempatkan konfigurasi di ~/.tmux.conf
. Dengan BoxXy, Anda dapat menempatkan konfigurasi di ~/.config/tmux/tmux.conf
sebagai gantinya:
# ~/.config/boxxy/boxxy.yaml
rules :
- name : " redirect tmux config from ~/.tmux.conf to ~/.config/tmux/tmux.conf "
target : " ~/.tmux.conf "
rewrite : " ~/.config/tmux/tmux.conf "
mode : " file "
Saya sedang istirahat dari memelihara proyek open-source karena alasan kesehatan. PRS masih akan diterima dan masalah masih akan dilihat, tetapi tidak ada janji tentang kapan ini akan terjadi.
Saya baru -baru ini harus menggunakan AWS CLI. Ia ingin menyimpan data di ~/.aws
, tapi saya tidak ingin itu hanya mengacaukan $HOME
saya sesuka hati. BoxXy memungkinkan saya memaksanya untuk menempatkan datanya di suatu tempat yang bagus dan tepat.
0.5.0
: BoxXy dapat memindai homedir Anda untuk secara otomatis menyarankan aturan untuk Anda!0.6.0
: Boxxy dapat menggunakan file boxxy.yaml
proyek-lokal, dan dapat memuat file .env
untuk Anda!0.6.1
: Aturan BoxXy dapat menyuntikkan Env Vars:0.7.2
: Boxxy dapat memperpanjang proses boxxed ke latar belakang dengan -bendera --daemon
.0.8.0
: BoxXy dapat lulus aturan pada baris perintah dengan --rule
, dan nonaktifkan memuat file konfigurasi dengan --no-config
.0.8.2
: Jelaskan cara menjalankan appImages dengan benar:git:(mistress) | ▶ cat ~ /.config/boxxy/boxxy.yaml
rules:
- name: " Store AWS CLI config in ~/.config/aws "
target: " ~/.aws "
rewrite: " ~/.config/aws "
git:(mistress) | ▶ boxxy aws configure
INFO boxxy > loaded 1 rules
INFO boxxy::enclosure > applying rule ' Store AWS CLI config in ~/.config/aws '
INFO boxxy::enclosure > redirect: ~ /.aws - > ~ /.config/aws
INFO boxxy::enclosure > boxed " aws " ♥
AWS Access Key ID [ **************** d]: a
AWS Secret Access Key [ **************** c]: b
Default region name [b]: c
Default output format [a]: d
git:(mistress) | ▶ ls ~ /.aws
git:(mistress) | ▶ ls ~ /.config/aws
config credentials
git:(mistress) | ▶ cat ~ /.config/aws/config
[default]
region = c
output = d
git:(mistress) | ▶
alias aws="boxxy aws"
(ulangi untuk alat lain) BoxXy mengharuskan Fungsi newuidmap
, yang tidak termasuk secara default di semua distribusi. Untuk menginstal:
Alpine:
$ apk add shadow-uidmap
Debian / Ubuntu:
$ apt install uidmap
Rhel / Fedora:
$ yum install shadow-utils
File konfigurasi BoxXy tinggal di ~/.config/boxxy/boxxy.yaml
. Jika tidak ada, yang kosong akan dibuat untuk Anda.
rules :
# The name of the rule. User-friendly name for your reference
- name : " redirect aws-cli from ~/.aws to ~/.config/aws "
# The target of the rule, ie the file/directory that will be shadowed by the
# rewrite.
target : " ~/.aws "
# The rewrite of the rule, ie the file/directory that will be used instead of
# the target.
rewrite : " ~/.config/aws "
- name : " use different k8s configs when in ~/Projects/my-cool-startup "
target : " ~/.kube/config "
rewrite : " ~/Projects/my-cool-startup/.kube/config "
# The context for the rule. Any paths listed in the context are paths where
# this rule will apply. If no context is specified, the rule applies
# globally.
context :
- " ~/Projects/my-cool-startup "
# The mode of this rule, either `directory` or `file`. `directory` is the
# default. Must be specified for the correct behaviour when the target is a
# file. Required because the target file/directory may not exist yet.
mode : " file "
# The list of commands that this rule applies to. If no commands are
# specified, the rule applies to all programs run with boxxy.
only :
- " kubectl "
rules :
- name : " any valid string " # required
target : " path " # required
rewrite : " path " # required
context : # optional
- " path "
- " path "
mode : " directory | file " # optional
only : # optional
- " binary name "
- " binary name "
env : # optional
KEY : " value "
pre-commit install
cargo build
cargo run -- ls -lah ~/.config
/
to TMP/
rofixtures/helloworld-appimage-x86_84.AppImage
: https://github.com/clonedrepos/hello-world-appimage