百科.dev
全部条目在线工具AI 编程趋势榜开源项目技术资讯提交条目
登录
< 返回工具列表
A

antidot

> 编程语言
开源

清理您的 $HOME 中的那些麻烦的 dot 文件

353 stars0 点赞1 次浏览
访问官网GitHub

工具介绍

清理您的 $HOME 中的那些麻烦的 dot 文件

antidot :house: :small_orange_diamond: :boom:

Cleans up your $HOME from those pesky dotfiles.

Migration from Pre 0.6.0 Versions

Please backup your environment variable and aliases files (in $XDG_DATA_HOME/antidot/{env,alias}.*). After version 0.6.0 antidot stores env exports and alias definitions in a JSON file and generates from it shell definition files.

Intro

For years I stood by and saw how countless applications populate my home dir with dotfiles.

No more! antidot is a tool to automatically detect and remove dotfiles from $HOME without any risks. It will move files to more appropriate locations (based on XDG base directory specifications). It will also set environment variables, declare aliases and use symlinks to ensure apps can find their files.

Installation

Arch Linux

bash
yay -Sy antidot-bin

Homebrew

bash
brew install doron-cohen/tap/antidot

Go to the releases section and grab the one that fits your OS.

After installing run antidot update to download the latest rules file and you're all set!

How does it Work?

Dotfiles pollution is a complex problem to solve. There are many approaches to solve this annoying issue and antidot is taking the safest one.

We maintain a rule for each dotfile which applies actions when the file is detected. The main goal is to move the files to the most appropriate location while keeping the application working as expected.

There are a few types of actions:

  • Migrate - Move a file to a new location, optionally symlink the old location to the new one (this is for the hardest cases).
  • Delete - Delete a file or a directory (only if it's empty).
  • Export - Export an environment variable.
  • Alias - Set an alias to a command.

Examples

This is the rule for the Docker configuration directory:

yaml
  - name: docker
    dotfile:
      name: .docker
      is_dir: true
    actions:
      - type: migrate
        source: ${HOME}/.docker
        dest: ${XDG_CONFIG_HOME}/docker
      - type: export
        key: DOCKER_CONFIG
        value: ${XDG_CONFIG_HOME}/docker

When running antidot clean we will be prompted about this directory:

bash
❯ ./antidot clean
Rule docker:
  MOVE   /Users/doroncohen/.docker → /Users/doroncohen/.config/docker
  EXPORT DOCKER_CONFIG="${XDG_CONFIG_HOME}/docker"
? Apply rule docker? (y/N)

Answering yes will move the directory and write the environment variable to a file that can be easily sourced by the shell. Running antidot init will create a shell script that will do just that.

Adding eval "$(antidot init)" to your .bashrc or .zshrc will make sure you shell sessions will see these variables and aliases. In Fish the proper way is to run antidot init | source. You could add it to $__fish_config_dir/conf.d/antidot.fish.

Issues· 0 开放

查看全部 Issues在 GitHub 打开

暂无开放 Issues,或尚未同步最近议题。

> 标签

Godotfilesgolangrice

暂无评论,来聊聊你的看法吧

> 工具信息

发布日期2026年8月1日
最后更新2026年9月17日
分类编程语言
定价开源

> 相关工具

T
TypeScript
JavaScript 的超集,为前端与全栈提供静态类型
P
Python
通用编程语言,广泛用于 Web、数据与 AI
G
Go
Google 推出的简洁高效系统语言