{"id":23131901,"url":"https://github.com/theobrigitte/trk","last_synced_at":"2025-07-03T13:06:49.250Z","repository":{"id":268248053,"uuid":"903543724","full_name":"TheoBrigitte/trk","owner":"TheoBrigitte","description":"Git wrapper with encryption and dotfiles capabilities","archived":false,"fork":false,"pushed_at":"2025-02-16T18:31:19.000Z","size":66,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-04-04T07:34:08.888Z","etag":null,"topics":["bash","dotfiles","dotfiles-manager","encryption-decryption","git","git-filter","gitattributes","openssl"],"latest_commit_sha":null,"homepage":"","language":"Shell","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/TheoBrigitte.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"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-12-14T21:46:09.000Z","updated_at":"2025-02-16T18:31:23.000Z","dependencies_parsed_at":"2024-12-15T14:34:25.711Z","dependency_job_id":"dc24dd10-6388-4f1f-9ef2-e0d16643cb66","html_url":"https://github.com/TheoBrigitte/trk","commit_stats":null,"previous_names":["theobrigitte/trk"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/TheoBrigitte/trk","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/TheoBrigitte%2Ftrk","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/TheoBrigitte%2Ftrk/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/TheoBrigitte%2Ftrk/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/TheoBrigitte%2Ftrk/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/TheoBrigitte","download_url":"https://codeload.github.com/TheoBrigitte/trk/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/TheoBrigitte%2Ftrk/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":263331774,"owners_count":23450155,"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":["bash","dotfiles","dotfiles-manager","encryption-decryption","git","git-filter","gitattributes","openssl"],"created_at":"2024-12-17T11:16:15.901Z","updated_at":"2025-07-03T13:06:49.206Z","avatar_url":"https://github.com/TheoBrigitte.png","language":"Shell","readme":"\u003cp align=\"center\"\u003e\n    \u003cimg src=\"assets/trk.jpg\" alt=\"trk\" height=\"100px\"\u003e\n\u003c/p\u003e\n\n# trk\n\nTrk (or track) is a Git wrapper to managed repositories and encrypt files.\n\nIt can be used to manage regular Git repositories or to manage a global repository like a [dotfiles](https://wiki.archlinux.org/title/Dotfiles) repository.\n\nIt is shamelessly inspired from [yadm](https://github.com/yadm-dev/yadm) and [transcrypt](https://github.com/elasticdog/transcrypt).\n\nEncryption is done via OpenSSL and leverage [Git clean/smudge filters](https://git-scm.com/book/ms/v2/Customizing-Git-Git-Attributes#filters_a) to encrypt and decrypt files seamlessly, meaning that encrypted files are stored in the repository and decrypted on the fly when checked out.\n\n## Quick start\n\nGrab the script and install it in your path:\n\n```\nwget https://raw.githubusercontent.com/TheoBrigitte/trk/refs/heads/main/trk\ninstall -D -m 755 trk ~/.local/bin/trk\n```\n\n### From scratch\n\n```\ntrk init\n```\n\n### From existing repository\n\n```\ntrk setup\n```\n\n### From a remote repository\n\n```\ntrk clone \u003curl\u003e\n```\n\n## Encryption\n\nTrk encrypts files on the fly when added to the repository.\nTo define which files should be encrypted, you can set a file or pattern (see `man gitignore` for more information) with the following command:\n\n```\ntrk mark \u003cfile\u003e\nor\ntrk mark '\u003cpattern\u003e' # Don't forget the quotes, otherwise the shell will expand the pattern\n```\n\nEncryption is done via OpenSSL and the key is stored in the GIT_DIR/config file. The key is generated when the repository is initialized. The key is then used to encrypt and decrypt files on the fly when they are added to the repository or checked out.\nOpenSSL cipher and arguments can be viewed and modified using the following commands:\n\n```\ntrk openssl get-args\ntrk openssl set-args \u003cargs\u003e\n```\n\nYou can then work with the repository as you would with a regular Git repository and encryption will happen seamlessly.\n\n### Check content stored in Git\n\nYou can verify that the content stored in Git is encrypted by running the following commands:\n\n```\ntrk rev-list --objects -g --no-walk --all\ntrk cat-file -p \u003chash\u003e\n```\n\n## Global / dotfile repository\n\nTrk can be used to manage a global repository, like a dotfiles repository. This happens with you use the `--worktree` option with the `init` and `clone` commands.\n\nGlobal repository is created in a unique location and can be used to manage all files in the given worktree without having to create the Git repository there. For example creating a Git directory in your home directory is probably not a good idea as it will clutter your home directory with Git files and you may accidentally commit files that you don't want to when working on other projects where you forgot to initialize a Git repository.\n\n### From scratch\n\n```\ntrk init --worktree \u003cpath\u003e\n```\n\n### From a remote repository\n\n```\ntrk clone --worktree \u003cpath\u003e \u003curl\u003e\n```\n\nYou can then work with the repository using `trk` as you would with a regular Git repository, encryption works the same way.\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftheobrigitte%2Ftrk","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ftheobrigitte%2Ftrk","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftheobrigitte%2Ftrk/lists"}