{"id":29866539,"url":"https://github.com/ficd0/autoyadm","last_synced_at":"2025-09-05T10:38:47.130Z","repository":{"id":262057479,"uuid":"886104203","full_name":"ficd0/autoyadm","owner":"ficd0","description":"Utility for better dotfle management with YADM. Automatic mirror of https://git.sr.ht/~ficd/autoyadm","archived":false,"fork":false,"pushed_at":"2025-05-25T01:52:56.000Z","size":23,"stargazers_count":2,"open_issues_count":0,"forks_count":1,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-07-30T13:08:53.243Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"https://git.sr.ht/~ficd/autoyadm","language":"Shell","has_issues":false,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/ficd0.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2024-11-10T07:49:25.000Z","updated_at":"2025-05-25T01:52:59.000Z","dependencies_parsed_at":"2025-02-18T19:44:12.321Z","dependency_job_id":"3ae06a34-6760-44e4-a7b2-0121b849aa4b","html_url":"https://github.com/ficd0/autoyadm","commit_stats":null,"previous_names":["ficcdaf/autoyadm","ficd0/autoyadm"],"tags_count":4,"template":false,"template_full_name":null,"purl":"pkg:github/ficd0/autoyadm","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ficd0%2Fautoyadm","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ficd0%2Fautoyadm/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ficd0%2Fautoyadm/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ficd0%2Fautoyadm/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ficd0","download_url":"https://codeload.github.com/ficd0/autoyadm/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ficd0%2Fautoyadm/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":273747271,"owners_count":25160649,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-09-05T02:00:09.113Z","response_time":402,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2025-07-30T12:39:43.647Z","updated_at":"2025-09-05T10:38:42.109Z","avatar_url":"https://github.com/ficd0.png","language":"Shell","funding_links":[],"categories":[],"sub_categories":[],"readme":"# AutoYADM\n\n\u003c!--toc:start--\u003e\n\n- [AutoYADM](#autoyadm)\n  - [Features](#features)\n  - [Installation](#installation)\n  - [Usage](#usage)\n    - [Tracking](#tracking)\n    - [Ignoring Certain Files](#ignoring-certain-files)\n    - [Committing \u0026 Pushing](#committing-pushing)\n    - [Calling AutoYADM Automatically](#calling-autoyadm-automatically)\n  - [Contributing](#contributing)\n\n\u003c!--toc:end--\u003e\n\n\u003e This is part of Daniel's [utility collection](https://sr.ht/~ficd/utils/).\n\nAutoYADM is a small shell utility to automate the process of managing dotfiles\nwith [YADM](https://github.com/yadm-dev/yadm) by allowing the user to define a\nlist of files \u0026 directories to be automatically added, committed and pushed\nwhenever the script is run. **Most notably, AutoYADM accounts for newly created\nfiles previously untracked by YADM.**\n\nThe benefits of this approach:\n\n1. Robust version control thanks to YADM and Git.\n2. You won't forget to commit new files in important folders.\n3. Maintain control over paths to auto-commit, and paths to only manually\n   commit.\n\nI have personally been using AutoYADM to sync my dotfiles between devices\nwithout any problems since October 2024.\n\n## Features\n\n- Configure a list of files \u0026 directories to be automatically tracked by YADM.\n- Tracked directories will also track any new files inside them!\n- Automatically add, commit, and push tracked paths.\n- `.ignore`/`.gitignore` support with `fd`.\n\n## Installation\n\nSimply clone the repository:\n\n```Bash\ngit clone https://git.sr.ht/~ficd/autoyadm\n```\n\nYou may consider adding aliases to your shell configuration:\n\n```Bash\nalias autoyadm=\"/path/to/autoyadm/autoyadm.sh\"\nalias yadmadd=\"/path/to/autoyadm/yadmadd.sh\"\n# To enable automatic pushing:\nalias autoyadm=\"AUTOYADMPUSH=1 /path/to/autoyadm/autoyadm.sh\"\n```\n\n**Dependencies**:\n\n- [YADM](https://github.com/yadm-dev/yadm)\n- `git`\n- `fd` (optional, but recommended)\n  - fallback to `find` otherwise\n- `openssh` (required for pushing)\n\n## Usage\n\n\u003e Note: The following assumes you have created shell aliases to the two scripts.\n\u003e You may, of course, simply call them directly.\n\n### Tracking\n\nAutoYADM maintains a list of files and directories for automatic tracking.\n_**All** children of tracked directories will be tracked, including newly\ncreated, previously untracked files._ For example, if you add your Neovim\nconfiguration at `~/.config/nvim` to tracking, then any new files you create\ninside that folder will automatically be added and committed by AutoYADM.\n\nThe tracking file is stored in `~/.config/yadm/tracked`. `$XDG_CONFIG_HOME` is\nrespected. The file will be automatically created if it doesn't already exist.\nYou can even add it to tracking: `yadmadd ~/.config/yadm/tracked`\n\n\u003e **Important**: Symlinks are _**not**_ added; this is to avoid conflicts with\n\u003e `yadm alt`\n\nThe tracking file contains the paths to tracked files \u0026 directories **relative\nto $HOME**. For example:\n\n```\n.bashrc\n.config/nvim\n```\n\nTo add paths to be tracked, you may use `yadmadd.sh`. Any valid absolute or\nrelative path should work.\n\n```Bash\n$ yadmadd ~/.bashrc\n$ yadmadd /home/username/.bashrc\n# Relative paths work too.\n$ yadmadd ../../.bashrc\n# You may supply any number of paths as arguments.\n$ yadmadd .bashrc .zshrc .config/nvim\n```\n\nTo remove a target from tracking, simply delete it from the `tracked` file.\n\n### Ignoring Certain Files\n\nIt's possible to ignore certain patterns inside a folder you're otherwise\ntracking with `yadmadd`. For example, suppose you've added `.config/foo`, but\nyou want to specifically ignore `.config/foo/bar.log`. You can use a\n`.ignore`/`.gitignore` file for this:\n\n```sh\necho \"bar.log\" \u003e ~/.config/foo/.ignore\n```\n\nThe `.ignore`/`.gitignore` file must be in the root of the directory you've\nadded with `yadmadd`. You also need `fd` available on your `$PATH` for ignoring\nto work.\n\n### Committing \u0026 Pushing\n\nTo automatically add and commit your tracking targets, use `autoyadm.sh`:\n\n```Bash\n$ autoyadm\n```\n\nBy default, automatic pushing is disabled. You can enable it with an environment\nvariable:\n\n```Bash\n$ export AUTOYADMPUSH=1\n$ autoyadm\n# Or you can combine these into one line:\n$ AUTOYADMPUSH=1 autoyadm\n```\n\n\u003e Note: For auto push to work, ssh-agent must be enabled, and the environment\n\u003e file needs to exist inside `~/.ssh`. Furthermore, you must have SSH setup with\n\u003e your git host.\n\n### Calling AutoYADM Automatically\n\nBy default, AutoYADM only runs when the user calls it explicitly. If you want to\nautomate this process, you are responsible for setting it up yourself. You may\nconsider configuring a cron job for this. The following example will run\nAutoYADM every 15 minutes, with automatic push enabled, appending its output to\na log file:\n\n```Bash\n*/15 * * * * AUTOYADMPUSH=1 /path/to/autoyadm/audoyadm.sh \u003e\u003e /path/to/log/file.log\n```\n\nIf you are on Arch Linux, you can follow these instructions to set up the cron\njob:\n\n```Bash\n# Install a cron daemon if you\n# don't already have one.\n$ sudo pacman -S cronie\n# This command will open your $EDITOR,\n# you may paste the above cron job configuration here\n# and save the file to apply your changes.\n$ crontab -e\n# Don't forget to enable cronie.service:\n$ systemctl enable cronie\n$ systemctl start cronie\n```\n\n## Contributing\n\nPlease submit patches, questions, and discussion points to the\n[~ficd/utils mailing list](https://lists.sr.ht/~ficd/utils), and consider\nvisiting the [public ticket tracker](https://todo.sr.ht/~ficd/utils).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fficd0%2Fautoyadm","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fficd0%2Fautoyadm","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fficd0%2Fautoyadm/lists"}