{"id":21900868,"url":"https://github.com/phts/dtfls","last_synced_at":"2026-04-13T17:04:41.365Z","repository":{"id":57216821,"uuid":"134904339","full_name":"phts/dtfls","owner":"phts","description":"Back up and restore your config files","archived":false,"fork":false,"pushed_at":"2019-02-12T19:57:53.000Z","size":45,"stargazers_count":2,"open_issues_count":0,"forks_count":0,"subscribers_count":4,"default_branch":"master","last_synced_at":"2025-03-04T11:16:26.846Z","etag":null,"topics":["configs","dotfiles","npm-package"],"latest_commit_sha":null,"homepage":"https://www.npmjs.com/package/dtfls","language":"JavaScript","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/phts.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":"2018-05-25T21:00:08.000Z","updated_at":"2020-06-23T12:00:32.000Z","dependencies_parsed_at":"2022-08-28T21:01:40.714Z","dependency_job_id":null,"html_url":"https://github.com/phts/dtfls","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/phts%2Fdtfls","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/phts%2Fdtfls/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/phts%2Fdtfls/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/phts%2Fdtfls/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/phts","download_url":"https://codeload.github.com/phts/dtfls/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":244913330,"owners_count":20530817,"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":["configs","dotfiles","npm-package"],"created_at":"2024-11-28T15:11:06.025Z","updated_at":"2026-04-13T17:04:41.359Z","avatar_url":"https://github.com/phts.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# dtfls\n\n[![npm](https://img.shields.io/npm/v/dtfls.svg)](https://www.npmjs.com/package/dtfls)\n\nBack up and restore your config files.\n\nThis is a redevelopment of [dotfiles](https://github.com/phts/dotfiles) (which was written on shell script) to Node.js.\n\n## Requirements\n\n- Node v22 or higher\n\n## Install\n\n**via npm**:\n\n```\nnpm install -g dtfls\n```\n\n## Usage\n\n### CLI\n\n- Print difference between local and system configs\n\n  ```sh\n  dtfls diff \u003cAPP...\u003e\n  ```\n\n- Install local configs to the system\n\n  ```sh\n  dtfls install \u003cAPP...\u003e\n  ```\n\n- Print system installation path\n\n  ```sh\n  dtfls path \u003cAPP\u003e\n  ```\n\n- Run post-install scripts (it is being run automatically after install)\n\n  ```sh\n  dtfls postinstall \u003cAPP...\u003e\n  ```\n\n- Pull configs from the system to the local folder\n\n  ```sh\n  dtfls pull \u003cAPP...\u003e\n  ```\n\nUse `dtfls --help` to read a common usage information and\n`dtfls \u003ccommand\u003e --help` to read about a specific command.\n\n### `--cmd` option example\n\npath.user.json:\n\n```\n{\n  \"my-app\": \"remote-host@my-user:/\"\n}\n```\n\nand run:\n\n```sh\ndtfls pull --cmd=scp my-app\ndtfls install --cmd=scp my-app\n```\n\n### Folder structure\n\nEach set of configs should be placed in separate folders.\nNames of such folders should not contain spaces.\nThese folders should contain the same hierarchy which should be\nin the user folder (`~`) of the target system.\n\nMapping of local path to system path for particular configs can be changed\nwith a file [`path.user.json`](https://github.com/phts/dtfls/blob/master/examples/path.user.json.example).\n\nAdditionally there is a support for post-install scripts. They can be\nadded in [`postinstall.user`](https://github.com/phts/dtfls/blob/master/examples/postinstall.user.example) file.\n\n## Example\n\nLocal repo structure:\n\n```\nmy configs\n  \\_ git\n  |  \\_ .gitconfig\n  |\n  |_ profile\n  |  \\_ .profile\n  |\n  |_ sublime-text-3\n  |  \\_ .config\n  |     \\_ sublime-text-3\n  |        \\_ Packages\n  |           \\_ User\n  |              |_ Default (Linux).sublime-keymap\n  |              |_ Default (Linux).sublime-mousemap\n  |              \\_ Preferences.sublime-settings\n  |\n  |_ zsh\n  |  \\_ .zshrc\n  |\n  |_ path.user.json\n  \\_ postinstall.user\n```\n\nAnd a workflow example:\n\n```sh\ncd \"my configs\"\ngit pull                          \u003c--- pull changes from your repo with configs\ndtfls install git                 \u003c--- install git configs from the repo to system\ndtfls pull sublime-text-3         \u003c--- copy Sublime Text configs from system to the local repo\ngit commit -am \"Update Sublime Text configs\"    \u003c--- commit updated configs\ngit push                                        \u003c--- and push\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fphts%2Fdtfls","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fphts%2Fdtfls","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fphts%2Fdtfls/lists"}