{"id":20560328,"url":"https://github.com/andreaskoch/dotman","last_synced_at":"2025-03-06T07:43:17.752Z","repository":{"id":57523182,"uuid":"14124783","full_name":"andreaskoch/dotman","owner":"andreaskoch","description":"A tool to bootstrap your system configuration files","archived":false,"fork":false,"pushed_at":"2013-11-16T19:09:36.000Z","size":260,"stargazers_count":5,"open_issues_count":0,"forks_count":0,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-01-16T19:05:25.958Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/andreaskoch.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":"2013-11-04T21:57:51.000Z","updated_at":"2020-05-05T11:41:23.000Z","dependencies_parsed_at":"2022-08-28T11:21:10.262Z","dependency_job_id":null,"html_url":"https://github.com/andreaskoch/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/andreaskoch%2Fdotman","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/andreaskoch%2Fdotman/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/andreaskoch%2Fdotman/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/andreaskoch%2Fdotman/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/andreaskoch","download_url":"https://codeload.github.com/andreaskoch/dotman/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":242168487,"owners_count":20083092,"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":[],"created_at":"2024-11-16T03:54:14.112Z","updated_at":"2025-03-06T07:43:17.732Z","avatar_url":"https://github.com/andreaskoch.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# dotman\n\ndotman is a tool to bootstrap your system configuration files.\n\n## Build Status\n\n[![Build Status](https://travis-ci.org/andreaskoch/dotman.png)](https://travis-ci.org/andreaskoch/dotman)\n\n## Motivation\n\nGet up and running within seconds on a new system with all your favorite vim plugins, bash-scripts and tweaks that make you at home and productive.\n\ndotman is inspired by [modman](https://github.com/colinmollenhour/modman) and allows you to easily manage your dotfile repositories.\n\nCreate a git repository which contains all your dotfiles such as your bash and vim configuration (e.g. [dotfiles-public](https://bitbucket.org/andreaskoch/dotfiles-public)):\n\n\tdotfiles-public/\n\t├── bash\n\t│   ├── bash-git-prompt\n\t│   │   ├── gitprompt.fish\n\t│   │   ├── gitprompt.png\n\t│   │   ├── gitprompt.sh\n\t│   │   ├── gitstatus.py\n\t│   │   └── README.md\n\t│   ├── bashrc\n\t│   ├── dotman\n\t│   └── scripts\n\t│       ├── contribue-source-to-target.sh\n\t│       ├── public-ip.sh\n\t│       ├── synchronize-source-to-target.sh\n\t│       └── vim-setup.sh\n\t└── vim\n\t    ├── dotman\n\t    ├── fontconfig\n\t    │   └── 10-powerline-symbols.conf\n\t    ├── fonts\n\t    │   └── PowerlineSymbols.otf\n\t    ├── vim\n\t    │   ├── autoload\n\t    │   └── bundle\n\t    └── vimrc\n\nAdd submodules from awesome modules such as [bash-git-prompt](https://github.com/magicmonty/bash-git-prompt) and then create a **dotman** mapping file for each submodule which tells dotman where to copy the files.\n\nTake the `dotman` mapping for the vim-files listed above as an example:\n\n\tvimrc                                   ~/.vimrc\n\tvim/autoload                            ~/.vim/autoload\n\tvim/bundle                              ~/.vim/bundle\n\n\t#powerline fonts\n\tfonts/PowerlineSymbols.otf              ~/.fonts/PowerlineSymbols.otf\n\tfontconfig/10-powerline-symbols.conf    ~/.config/fontconfig/conf.d/10-powerline-symbols.conf\n\nThe file maps files and directories from your vim settings-repository directly into your home-directory.\n\n## Installation\n\nYou can download the latest release of dotman from the github release page [github.com/andreaskoch/dotman/releases](https://github.com/andreaskoch/dotman/releases) ...\n\n```bash\ncurl -L https://github.com/andreaskoch/dotman/releases/download/v0.1.1/dotman_0.1.1-dev_linux_amd64.tar.gz | tar xz\n```\n\n... or you can compile it yourself, if you have [go installed](http://golang.org/doc/install):\n\n```bash\ngo get github.com/andreaskoch/dotman\n```\n\n## Terminology\n\n### \"Module\"\n\nA dotman **module** is a folder which contains a plain-text file named `dotman`.\n\n### \"Repository\"\n\nA **repository** is a collection of one or more modules. You can have only one module which contains all your dotfiles, but sometimes things get a little less messy when you seperate your dotfiles into more separate modules. Examples:\n\n- git-configs\n- vim\n- bash\n- ...\n\n## Usage\n\n\tdotman [-whatif] \u003ccommand\u003e [\u003cfilter\u003e]\n\n**The -whatif flag**\n\nIf you want to **test** what a certain command you can precede it with the `-whatif` flag.\nThis will ensure that no files are modified or copied.\n\nExample:\n\n```bash\ndotman -whatif deploy\n```\n\n**Commands**\n\nThese are the available commands:\n\n- **clone**: Clone a dotfile repository.\n- **list**: Get a list of all modules in the current repository.\n- **import**: Import files based on your current dotman configurations.\n- **backup**: Backup your target files.\n- **deploy**: Deploy your modules.\n- **changes**: Show changed files.\n- **commit**: Commit all changes.\n- **push**: Push all commits to their remote repository.\n- **pull**: Pull changes from the remote repository.\n\n**Filter**\n\nIf you want to restrict the scope of the \"import\", \"list\", \"changes\" or \"deploy\" command to a specific module or a set of modules you can follow the command with a **module-filter**.\n\n```bash\ndotman import \u003cfilter\u003e\n```\n\nThe filter can be just the name of the module or a full-blown [(RE2 compliant) regular expression](https://code.google.com/p/re2/wiki/Syntax).\n\n### Getting help\n\nIf supply the `help` command to dotman (or any unknown command for that matter) it will print out the help dialog:\n\n```bash\ndotman help\n```\n\n\tv0.1.0 - Backup and bootstrap your dotfiles and system configuration.\n\n\tusage: dotman [-whatif] \u003ccommand\u003e [\u003cfilter\u003e]\n\n\tAvailable commands are:\n\t    clone     Clone a dotfile repository.\n\t    import    Import files based on your current dotman configurations.\n\t    list      Get a list of all modules in the current repository.\n\t    backup    Backup your target files.\n\t    changes   Show changed files.\n\t    deploy    Deploy your modules.\n\t    commit    Commit all changes.\n\t    push      Push all commits to their remote repository.\n\n\tOptions:\n\t    whatif    Enable the dry-run mode. Only print out what would happen.\n\n\tArguments:\n\t    filter    You can add a module filter expression to the import, list, changes and deploy commands.\n\n\tContribute: https://github.com/andreaskoch/dotman\n\n### Cloning a dotfile repository\n\nTo clone an existing dotfile repository to your current working directory use the `clone` command.\n\n```bash\ndotman clone \u003crepository-url\u003e\n```\n\nThis command will execute a `git clone --recursive` for the supplied repository url.\n\n### Creating a dotfile-repository with \"import\"\n\nIf you want to start a new dotfile-repository from scratch for example for your vim files you can follow these steps:\n\n#### 1. create a repository folder (e.g. \"dotfiles\")\n\n```bash\nmkdir -p ~/src/dotfiles/vim\n```\n\n#### 2. create a dotman file with mappings for your vim configuration\n\n```bash\ncat \u003c\u003c EOF \u003e ~/src/dotfiles/dotman\n# Your .vimrc file\nvimrc        \t\t~/.vimrc\n\n# Your .vim folder\nvim/autoload        ~/.vim/autoload\nvim/bundle          ~/.vim/bundle\nEOF\n```\n\n#### 3. import the file into your repository\n\n```bash\ncd ~/src/dotfiles\ndotman import\n```\n\nThis will copy your \".vimrc\", and the \".vim/autoload\" and \".vim/bundle\" folder into your new dotfile-repository - which gives you a good starting point for refining your personal dotfile repository.\n\n### Getting a list of all modules in your current dotfile-repository\n\nTo get a list of all dotman-modules in the current directory use the `list` command.\n\n```bash\ndotman list\n```\n\n### Backup your dotfiles\n\nTo backup all files files that are mapped in your current dotfile-repository you can use the `backup` command.\n\n```bash\ndotman backup\n```\n\nThis command will create a *.tar archive in the \".backup\" folder of your dotfile-repository which contains all mapped target files. This an easy way to backup your system configuration.\n\n### Showing changed files\n\nTo see which files have changed between your dotfile-repository and the target you can use the `changes` command.\n\n```bash\ndotman changes\n```\n\nThis command will print out a list of all files that have changed, grouped by module.\n\n### Deploy your dotfile-repository\n\nThe `deploy` comamnd will copy all mapped files from your dotfile-repository to the defined target locations.\n\n```bash\ndotman deploy\n```\n\n**Note**: If you are afraid what might happen when you execute this command you can add the `-whatif` flag. This way dotman will not copy any files but will show you what it would do:\n\n```bash\ndotman -whatif deploy\n```\n\n### Commit all changes to your dotfile-repository\n\nTo commit all changes to your dotfile-repository you can use the `commit` command followed by a commit message.\n\n```bash\ndotman commit \"\u003cyour commit message\u003e\"\n```\n\nThis will perform a `git add -A .` followed by a `git commit -m \"\u003cyour commit message\u003e\"` on each module of your dotfile-repository and then on your dotfile-repository itself.\n\n### Push all commits to their remote repository\n\nUse the `push` command to publish all commits to modules of your dotfile-repository and to your dotfile-repository itself to their respective remote repository.\n\n```bash\ndotman push\n```\n\nThis will perform a `git push` on each module of your dotfile-repository and then on your dotfile-repository itself.\n\n### Pull changes from your remote repository\n\nFor pulling changes for your dotfile-repository and all its sub-modules you can use the `pull` command.\n\n```bash\ndotman pull\n```\n\nThe pull command will perform a `git submodule foreach git pull` on your dotfile-repository.\n\n## Contribute\n\nIf you have an idea how to make this tool better please send me a message or a pull request.\nAll contributions are welcome.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fandreaskoch%2Fdotman","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fandreaskoch%2Fdotman","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fandreaskoch%2Fdotman/lists"}