Boxxy (ตัวพิมพ์เล็ก) เป็นเครื่องมือสำหรับการชกมวยการทำงานที่ไม่เหมาะสมของแอปพลิเคชัน Linux และบังคับให้พวกเขาวางไฟล์และไดเรกทอรีในสถานที่ที่เหมาะสม โดยไม่ต้องมี symlinks!
Boxxy เป็นส่วนหนึ่งของเซิร์ฟเวอร์ Amyware Discord
ถ้าคุณชอบสิ่งที่ฉันทำลองพิจารณาสนับสนุนฉันใน Patreon:
Linux-only! Boxxy ใช้เนมสเปซ Linux สำหรับฟังก์ชั่น
ตัวอย่างเช่นพิจารณา tmux มันต้องการใส่การกำหนดค่าใน ~/.tmux.conf ด้วย Boxxy คุณสามารถใส่ config ใน ~/.config/tmux/tmux.conf แทน:
# ~/.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 " ฉันหยุดพักจากการรักษาโครงการโอเพนซอร์สเนื่องจากเหตุผลด้านสุขภาพ PRS จะยังคงได้รับการยอมรับและปัญหาจะยังคงถูกดู แต่ก็ไม่มีสัญญาเกี่ยวกับสิ่งนี้จะเกิดขึ้นเมื่อใด
ฉันเพิ่งใช้ AWS CLI มันต้องการบันทึกข้อมูลใน ~/.aws แต่ฉันไม่ต้องการให้มันแค่ยุ่งกับ $HOME ของฉัน แต่มันต้องการ Boxxy ให้ฉันบังคับให้วางข้อมูลไว้ที่ไหนสักแห่งที่ดีและเหมาะสม
0.5.0 : Boxxy สามารถสแกนบ้านของคุณเพื่อแนะนำกฎสำหรับคุณโดยอัตโนมัติ!0.6.0 : Boxxy สามารถใช้ไฟล์ Project-local boxxy.yaml และสามารถโหลดไฟล์ .env ให้คุณได้!0.6.1 : กฎ Boxxy สามารถฉีด Env Vars:0.7.2 : Boxxy สามารถแยกกระบวนการ boxxed ลงในพื้นหลังด้วยธง --daemon0.8.0 : Boxxy สามารถผ่านกฎได้ที่บรรทัดคำสั่งด้วย --rule และปิดใช้งานไฟล์ config การโหลดด้วย --no-config0.8.2 : อธิบายวิธีเรียกใช้ AppImages อย่างถูกต้อง: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" (ทำซ้ำสำหรับเครื่องมืออื่น ๆ ) Boxxy ต้องการ newuidmap ในการใช้งานซึ่งไม่รวมอยู่ในค่าเริ่มต้นในการแจกแจงทั้งหมด ในการติดตั้ง:
อัลไพน์:
$ apk add shadow-uidmapDebian / Ubuntu:
$ apt install uidmapRhel / Fedora:
$ yum install shadow-utils ไฟล์การกำหนดค่า boxxy มีชีวิตอยู่ใน ~/.config/boxxy/boxxy.yaml หากไม่มีอยู่จะมีการสร้างที่ว่างเปล่าให้คุณ
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 installcargo buildcargo run -- ls -lah ~/.config/ to tmp/ rofixtures/helloworld-appimage-x86_84.AppImage : https://github.com/clonedrepos/hello-world-appimage