{"id":16317685,"url":"https://github.com/zfletch/dotf","last_synced_at":"2025-09-11T22:38:41.615Z","repository":{"id":72191119,"uuid":"51160892","full_name":"zfletch/dotf","owner":"zfletch","description":"Dotfiles preprocessor","archived":false,"fork":false,"pushed_at":"2016-02-05T17:42:40.000Z","size":8,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-05-13T16:53:45.473Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Ruby","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/zfletch.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":"2016-02-05T17:03:07.000Z","updated_at":"2016-02-05T17:03:32.000Z","dependencies_parsed_at":"2023-04-27T21:16:38.967Z","dependency_job_id":null,"html_url":"https://github.com/zfletch/dotf","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/zfletch/dotf","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zfletch%2Fdotf","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zfletch%2Fdotf/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zfletch%2Fdotf/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zfletch%2Fdotf/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/zfletch","download_url":"https://codeload.github.com/zfletch/dotf/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zfletch%2Fdotf/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":274719114,"owners_count":25337237,"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-11T02:00:13.660Z","response_time":74,"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":"2024-10-10T22:09:01.824Z","updated_at":"2025-09-11T22:38:41.552Z","avatar_url":"https://github.com/zfletch.png","language":"Ruby","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Dotf\n\nPreprocessor for dotfiles. Manage dotfiles with machine-specific tags then compile and link them.\n\n## Example .bashrc (~/.dotf/dofiles/bashrc)\n\n```bash\n[ -z \"$PS1\" ] \u0026\u0026 return\n\n# ~~~ location /etc/bashrc server router ~~~\n\n# ~~~ only osx ~~~\nalias ls='ls -G'\nif [ -f `brew --prefix`/etc/bash_completion ]; then\n  source `brew --prefix`/etc/bash_completion\nfi\n# ~~~ only linux\nalias ls='ls --color=auto'\n# ~~~ include all\n\nalias grep='grep --color=auto'\n\n# ~~~ only red ~~~\nPS1='\\[\\033[01;37m\\]\\u@\\h$(__git_ps1)\\[\\033[01;31m\\] \\w\\[\\033[01;37m\\] \\$\\[\\033[00m\\] '\n# ~~~ only blue ~~~\nPS1='\\[\\033[01;37m\\]\\u@\\h$(__git_ps1)\\[\\033[01;34m\\] \\w\\[\\033[01;37m\\] \\$\\[\\033[00m\\] '\n# ~~~ include all ~~~\n\n# ~~~ exclude router ~~~\nalias vi=vim\n```\n\n## How to use\n\nFirst, run `dotf init`. This creates the `~/.dotf` directory. The structure of that directory is:\n\n```\n.dotf/\n  dotfiles/\n    vimrc\n    bashrc\n    etc.\n  .compiled/\n  key\n  tags\n```\n\nNow you can put your conf files in`./dotf/dotfiles` (and manage them with source control).\nRunning `dotf run` compiles and links all of the dotfiles.\n\n### Tags\n\nIf you run the command `dotf tags` you can see a list of tags for the current machine.\nBy default, every machine should have the tag `all`. You can add tags by running `dotf tags tag1 tag2 ...`.\nYou can also manually manage tags by modifying the file `~/./dotf/tags`.\n\n### Key\n\nRunning the command `dotf key` will show the current key. By default it's `~~~`. You can change it by\nrunning `dotf key new_key` or manually editing `~/.dotf/key`.\n\n### Compiling and linking\n\nThe command `dotf run` compiles and links all the files within `~/.dotf/dotfiles`.\nThe compiled files live in the `~/.dotf/.compiled/` directory.\nBy default, the linked location for `~/.dotf/dotfiles/\u003cfilename\u003e` is `~/.\u003cfilename\u003e`, but\nthat can be overridden with the `location` pragma (see below).\n\n### Pragmas (or pragmata?)\n\nWithin a dotfile, you can use the following pragmas to compile things differently on different machines.\nAll pragmas have to be surrounded by they `key` (by default `~~~`).\n\n#### Include\n\n* `~~~ include tag [tags ...] ~~~`\n* If the current machine has a tag matching any of the tags, then include this line and following lines in the compiled output.\n\n#### Exclude\n\n* `~~~ exclude tag [tags ...] ~~~`\n* If the current machine has a tag matching any of the tags, then exclude this line and following lines in the compiled output.\n\n#### Only\n\n* `~~~ only tag [tags ...] ~~~`\n* If the current machine has a tag matching any of the tags, then include this line and following lines in the compiled output. Otherwise, exclude this line and following lines from the compiled output.\n\n#### Location\n\n* If the current machine has a tag matching any of the tags, then link the compiled file to the given path.\n* `~~~ location path tag [tags ...] ~~~`\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fzfletch%2Fdotf","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fzfletch%2Fdotf","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fzfletch%2Fdotf/lists"}