{"id":23437635,"url":"https://github.com/skylor-tang/zshrc-sync","last_synced_at":"2025-04-09T18:54:17.546Z","repository":{"id":238128440,"uuid":"795942202","full_name":"Skylor-Tang/zshrc-sync","owner":"Skylor-Tang","description":"A zsh plugin that automatically detects changes to the .zshrc file and syncs it to the GitHub repository when zsh exits.","archived":false,"fork":false,"pushed_at":"2024-05-06T12:08:02.000Z","size":6,"stargazers_count":3,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-02-15T11:36:52.453Z","etag":null,"topics":["zplug","zsh-plugin","zshrc"],"latest_commit_sha":null,"homepage":"","language":"Shell","has_issues":true,"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/Skylor-Tang.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}},"created_at":"2024-05-04T13:11:55.000Z","updated_at":"2024-06-23T02:59:52.000Z","dependencies_parsed_at":"2024-05-11T08:47:35.649Z","dependency_job_id":"eef30bc3-edca-4917-82de-5602c080dd34","html_url":"https://github.com/Skylor-Tang/zshrc-sync","commit_stats":null,"previous_names":["skylor-tang/zshrc-sync"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Skylor-Tang%2Fzshrc-sync","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Skylor-Tang%2Fzshrc-sync/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Skylor-Tang%2Fzshrc-sync/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Skylor-Tang%2Fzshrc-sync/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Skylor-Tang","download_url":"https://codeload.github.com/Skylor-Tang/zshrc-sync/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248093828,"owners_count":21046758,"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","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":["zplug","zsh-plugin","zshrc"],"created_at":"2024-12-23T14:31:27.828Z","updated_at":"2025-04-09T18:54:17.522Z","avatar_url":"https://github.com/Skylor-Tang.png","language":"Shell","funding_links":[],"categories":[],"sub_categories":[],"readme":"# zshrc-sync\n\nA zsh plugin that automatically detects changes to the `.zshrc` file and syncs it to the GitHub repository when zsh exits.\n\n## Features\n\n- Check if the remote .zshrc file is different from the local one, and if so, pull the latest version from the remote repository and overwrite the local configuration.\n- Automatically detects changes to the `.zshrc` file and syncs it to the GitHub repository.\n- Automatically syncs the `.zshrc` file when zsh exits.\n- Backs up the current `.zshrc` file to `$HOME/.zshrc-bak`.\n- Uses a symbolic link to link the `.zshrc` file to the copy in the GitHub repository.\n\n## Installation\n\n1. Ensure that Git is installed.\n2. Set the following variables in your `.zshrc` file:\n   - `ZSHRC_REPO_URL`: The URL of your GitHub repository.\n   - `ZSHRC_FILE_PATH`: The full path to your `.zshrc` file.\n\n    For example:\n    ```zsh\n    export ZSHRC_REPO_URL='git@github.com:usename/myzshrc.git'\n    export ZSHRC_FILE_PATH=\"$HOME/.zshrc\"\n    ```\n\n3. Install the plugin using `zplug`:\n\n   ```zsh\n   zplug \"Skylor-Tang/zshrc-sync\", use:zshrc-sync.zsh, from:github, at:main\n   ```\n\n4. Reload the zsh configuration file:\n\n   ```zsh\n   source ~/.zshrc\n   ```\n\n## Usage\n\nThe plugin will automatically detects changes to the `.zshrc` file and syncs it to the GitHub repository when zsh exits.\n\nYou can manually call the `sync_zshrc()` function to immediately sync the `.zshrc` file.\n\n## Notes\n\n- Ensure that the `ZSHRC_REPO_URL` and `ZSHRC_FILE_PATH` variables are set correctly before zplug tries to load the zshrc-sync plugin.\n- The plugin will create a Git repository in the `$HOME/.zshrc-sync` directory, so make sure this directory is writable.\n- The plugin will back up the current `.zshrc` file to `$HOME/.zshrc-bak`.\n\n## License\n\nThis project is licensed under the MIT License.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fskylor-tang%2Fzshrc-sync","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fskylor-tang%2Fzshrc-sync","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fskylor-tang%2Fzshrc-sync/lists"}