Boxxy (حساسة للحالة) هي أداة لملاكمة تطبيقات Linux التي سوء التصرف وإجبارها على وضع ملفاتها ودلائلها في المكان المناسب ، دون ارتباطات Symlinks!
Boxxy هو جزء من خادم Discord Amyware.
إذا كنت تحب ما أقوم به ، فكر في دعمني على Patreon:
لينكس فقط! يستخدم Boxxy مساحات أسماء Linux لوظائفها.
على سبيل المثال ، النظر في TMUX. إنها تريد وضع التكوين في ~/.tmux.conf . مع boxxy ، يمكنك وضع تكوينه في ~/.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 مسح homedir الخاص بك لاقتراح قواعد لك تلقائيًا!0.6.0 : يمكن لـ boxxy استخدام ملفات project-local boxxy.yaml ، ويمكنها تحميل ملفات .env لك!0.6.1 : يمكن لقواعد boxxy حقن env vars:0.7.2 : يمكن لـ Boxxy مفترق العملية المربعة في الخلفية مع علم --daemon .0.8.0 : يمكن لـ Boxxy تمرير القواعد في سطر الأوامر مع --rule ، وتعطيل ملفات التكوين مع-- --no-config .0.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-uidmapديبيان / أوبونتو:
$ apt install uidmapريل / فيدورا:
$ 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/ إلى دليل TMP/ rofixtures/helloworld-appimage-x86_84.AppImage : https://github.com/clonedrepos/hello-world-appimage