{"id":20144933,"url":"https://github.com/blurgyy/tinytools","last_synced_at":"2025-03-03T00:11:56.463Z","repository":{"id":57669908,"uuid":"382107978","full_name":"blurgyy/tinytools","owner":"blurgyy","description":"🛠 A collection of tools that enhance your experience in shell.","archived":false,"fork":false,"pushed_at":"2023-03-02T06:17:49.000Z","size":78,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-02-28T05:57:43.825Z","etag":null,"topics":["cli","rust","shell","tool"],"latest_commit_sha":null,"homepage":"https://crates.io/crates/tinytools","language":"Rust","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/blurgyy.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":"2021-07-01T17:23:32.000Z","updated_at":"2023-03-02T05:28:00.000Z","dependencies_parsed_at":"2025-01-13T10:43:57.125Z","dependency_job_id":"d572cbde-ba35-481b-be17-844dc947836f","html_url":"https://github.com/blurgyy/tinytools","commit_stats":{"total_commits":37,"total_committers":1,"mean_commits":37.0,"dds":0.0,"last_synced_commit":"dd88bf496a69ea4f912400a0915014f255c3b34f"},"previous_names":[],"tags_count":4,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/blurgyy%2Ftinytools","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/blurgyy%2Ftinytools/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/blurgyy%2Ftinytools/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/blurgyy%2Ftinytools/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/blurgyy","download_url":"https://codeload.github.com/blurgyy/tinytools/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":241587858,"owners_count":19986628,"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":["cli","rust","shell","tool"],"created_at":"2024-11-13T22:12:49.742Z","updated_at":"2025-03-03T00:11:56.446Z","avatar_url":"https://github.com/blurgyy.png","language":"Rust","funding_links":[],"categories":[],"sub_categories":[],"readme":"# tinytools\n\nA collection of tools that enhance your experience in shell.  This provides an\nexecutable named `tt`, which in turn provides the following utilities (more to\nbe added):\n\n- [`bak`][bak]: Append a tilde \\(\\~\\) to the names of given files/directories.\n- [`debak`][debak]: Pop a tilde \\(\\~\\) from the names of given files/directories.\n- [`gr`][gr]: Get the nearest git root above current working directory (if it exists).\n\n## Installation\n\nInstalling with `cargo`:\n\n```shell\n$ cargo install tinytools\n```\n\n## Utilities\n\n### `bak`\n\nSometimes you want to quickly backup some file, this is typically done by\nsuffixing the file with a tilde \\(\\~\\).  When there are multiple files to be\nrenamed, `bak` helps you to do this at ease:\n\n```shell\n$ alias bak=\"tt bak\"\n$ touch testfile\n$ mkdir testdir\n$ ls\ntestdir/  testfile\n$ bak testdir testfile\nrenamed \"testfile\" -\u003e \"testfile~\"\nrenamed \"testdir\" -\u003e \"testdir~\"\n```\n\n`bak` aborts if the path after appending a tilde exists in the filesystem.\n\n### `debak`\n\n`debak` is the inverse of `bak` (see: [`bak`][bak]).  It does nothing (and\naborts) when any of the given path does not end with a tilde.\n\n### `gr`\n\nSometimes you want to quickly go to nearest git root of current project.  Add\nthis shell alias to your shell's initialization script:\n\n```shell\n$ alias cg='cd ${$(tt gr 2\u003e/dev/null):-$PWD}'\n```\n\nThen, call `cg` to quickly jump from your cwd to git root:\n\n```shell\n$ pwd\n[...]/tinytools/src/modules\n$ cg\n$ pwd\n[...]/tinytools\n$ cd -\n$ pwd\n[...]/tinytools/src/modules\n```\n\n[bak]: #user-content-bak\n[debak]: #user-content-debak\n[gr]: #user-content-gr\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fblurgyy%2Ftinytools","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fblurgyy%2Ftinytools","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fblurgyy%2Ftinytools/lists"}