{"id":19307462,"url":"https://github.com/pa/dotman","last_synced_at":"2025-04-22T12:36:43.403Z","repository":{"id":57652137,"uuid":"441501628","full_name":"pa/dotman","owner":"pa","description":"dotman is a go based simple and light weight tool for managing dotfiles","archived":false,"fork":false,"pushed_at":"2022-03-07T09:59:22.000Z","size":78293,"stargazers_count":4,"open_issues_count":0,"forks_count":1,"subscribers_count":1,"default_branch":"main","last_synced_at":"2024-06-20T14:15:11.048Z","etag":null,"topics":["dotfiles-manager","dotman"],"latest_commit_sha":null,"homepage":"","language":"Go","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/pa.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}},"created_at":"2021-12-24T15:42:13.000Z","updated_at":"2024-06-20T14:15:11.051Z","dependencies_parsed_at":"2022-08-28T02:23:11.083Z","dependency_job_id":null,"html_url":"https://github.com/pa/dotman","commit_stats":null,"previous_names":[],"tags_count":2,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pa%2Fdotman","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pa%2Fdotman/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pa%2Fdotman/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pa%2Fdotman/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/pa","download_url":"https://codeload.github.com/pa/dotman/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":223896951,"owners_count":17221475,"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":["dotfiles-manager","dotman"],"created_at":"2024-11-10T00:11:07.605Z","updated_at":"2024-11-10T00:11:08.237Z","avatar_url":"https://github.com/pa.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"![Release with goreleaser](https://img.shields.io/github/workflow/status/pa/dotman/Release%20with%20goreleaser?label=Release%20with%20goreleaser\u0026logo=GitHub\u0026style=for-the-badge)\n![GitHub Release](https://img.shields.io/github/v/release/pa/dotman?label=dotman%20release\u0026logo=GitHub\u0026style=for-the-badge)\n![Go Version](https://img.shields.io/github/go-mod/go-version/pa/dotman?label=go%20version\u0026logo=go\u0026style=for-the-badge)\n\n# dotman - dot(files) man(ager)\n\ndotman is a [go](https://go.dev/) based simple and light weight tool for managing [dotfiles](https://en.wikipedia.org/wiki/Hidden_file_and_hidden_directory). This tool uses a [bare Git repository](https://www.atlassian.com/git/tutorials/dotfiles) that means your `$HOME` will be your git work tree. Also, it offers a plugin manager with rules to copy files from source git repo and even directory which most of the tools out there wouldn't support.\n\nI had been inspired by [Bhupesh's](https://github.com/Bhupesh-V) project [dotman](https://github.com/Bhupesh-V/dotman) after which I have named this tool.\n\n## Requirements\n- [Git](https://git-scm.com/) executable insatlled on your machine\n- A Git repo, where you version control your dotfiles. Create one from [here](https://github.com/new) if you want.\n\n## Installation\n\n### via Go\n```bash\ngo install github.com/pa/dotman@latest\n# you can also install specific verison instead of latest\n```\n\n### via Binary\nGo to the [release page](https://github.com/pa/dotman/releases), find the version you want and download the archive. Unpack it and put the binary to somewhere you want (on UNIX-y systems, /usr/local/bin or the like). Make sure to turn on the executable bits if you are using custom location.\n\n## Demo\nA quick demo of the tool,\n\nhttps://user-images.githubusercontent.com/44371915/149934976-4dda052b-81b3-42ad-9ad7-e406c4a3af66.mov\n\n## Configuration File\nCreate a config file named `.dotman-config.\u003csupported extention\u003e` under your `$HOME` directory. The dotman supports various config file formats JSON, TOML and YAML.\n\n.dotman-config.yaml\n```yaml\nautoCommit: \u003cboolean\u003e\nexternals:\n    \u003cparent path\u003e:\n        - url: \u003cgit repo url\u003e\n          paths:\n            - \u003csource path\u003e \u003ctarget path\u003e  # can be either directory or file\n            # soure path - directory or file path from git repo dir\n            # target path - target directory or file path\n```\n\nbelow is a example of dotman config\n\n```yaml\nautoCommit: true\nexternals:\n  .config/fish:\n    - url: https://github.com/IlanCosman/tide\n      paths:\n        - completions completions\n        - conf.d conf.d\n        - functions functions\n    - url: https://github.com/jethrokuan/z\n      paths:\n        - conf.d conf.d\n        - functions functions\n  .vim/pack/plugins/start:\n    - url: https://github.com/preservim/nerdtree.git\n```\n\n## Usage\n\n```\nUsage:\n  dotman [command]\n\nAvailable Commands:\n  add              Add file contents to the index\n  commit           Record changes to the repository\n  completion       Generate completion script\n  config           Set and read git configuration variables\n  diff             Show changes between commits, commit and working tree, etc\n  help             Help about any command\n  init             Clones dotfiles repo from remote git repository\n  pull             Fetch from and merge with another repository or a local branch\n  push             Update remote refs along with associated objects\n  reset            Reset current HEAD to the specified state\n  stash            Stash away changes\n  status           Show the working tree status\n  update-externals Downloads and updates git externals like plugins, etc\n```\n\n### Generate completion script\n\nyou can generate completion script by using below command.\n\n```bash\ndotman completion [bash|zsh|fish]\n```\n\n## Example\n```bash\n# dotman init\n❯ dotman init\nUsing config file: /Users/pa/.dotman-config.yaml\ngit repo url \u003cpass your dotfiles git repo url\u003e\n\n# dotman add\n❯ dotman add ~/.zshrc\nUsing config file: /Users/pa/.dotman-config.yaml\n\n# dotman status\n❯ dotman status\nUsing config file: /Users/pa/.dotman-config.yaml\nOn branch main\nChanges to be committed:\n  (use \"git restore --staged \u003cfile\u003e...\" to unstage)\n\tnew file:   ../../../.zshrc\n\nChanges not staged for commit:\n  (use \"git add \u003cfile\u003e...\" to update what will be committed)\n  (use \"git restore \u003cfile\u003e...\" to discard changes in working directory)\n\tmodified:   ../../../.config/fish/config.fish\n\nUntracked files not listed (use -u option to show untracked files)\n\n# dotman push\n❯ dotman push -u origin \u003cbranch name\u003e\n\n# dotman update-externals\n❯ dotman update-externals\nUsing config file: /Users/pa/.dotman-config.yaml\nCloning into '/Users/pa/.dotman/externals/tide'...\nremote: Enumerating objects: 6661, done.\nremote: Counting objects: 100% (866/866), done.\nremote: Compressing objects: 100% (173/173), done.\nremote: Total 6661 (delta 778), reused 713 (delta 688), pack-reused 5795\nReceiving objects: 100% (6661/6661), 6.16 MiB | 3.22 MiB/s, done.\nResolving deltas: 100% (4257/4257), done.\nCloning into '/Users/pa/.dotman/externals/z'...\nremote: Enumerating objects: 582, done.\nremote: Counting objects: 100% (112/112), done.\nremote: Compressing objects: 100% (68/68), done.\nremote: Total 582 (delta 57), reused 65 (delta 30), pack-reused 470\nReceiving objects: 100% (582/582), 92.20 KiB | 1.74 MiB/s, done.\nResolving deltas: 100% (313/313), done.\n```\n\n## Tips\n\nIf you want to use README in your dotfiles repo and don't want to store it in `$HOME` directly, then go ahead and create a `README.md` file under directory `.github` in your `$HOME` path.\n\n## TODO\n- Add more git native commands\n- Write unit tests\n- Add GitHub action to build and test\n- Release package to various distributions\n- Add support for Windows","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpa%2Fdotman","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fpa%2Fdotman","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpa%2Fdotman/lists"}