{"id":13572438,"url":"https://github.com/joowani/dtags","last_synced_at":"2025-04-05T01:04:25.939Z","repository":{"id":44430901,"uuid":"48935698","full_name":"joowani/dtags","owner":"joowani","description":"Command-line tool for tagging directories.","archived":false,"fork":false,"pushed_at":"2022-01-29T10:54:17.000Z","size":995,"stargazers_count":369,"open_issues_count":2,"forks_count":13,"subscribers_count":16,"default_branch":"main","last_synced_at":"2025-03-29T00:12:00.219Z","etag":null,"topics":["bash","directory-management","productivity","python","tagging","zsh"],"latest_commit_sha":null,"homepage":"","language":"Python","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/joowani.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2016-01-03T05:50:21.000Z","updated_at":"2024-10-01T01:59:33.000Z","dependencies_parsed_at":"2022-09-07T03:33:16.766Z","dependency_job_id":null,"html_url":"https://github.com/joowani/dtags","commit_stats":null,"previous_names":[],"tags_count":32,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/joowani%2Fdtags","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/joowani%2Fdtags/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/joowani%2Fdtags/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/joowani%2Fdtags/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/joowani","download_url":"https://codeload.github.com/joowani/dtags/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247271519,"owners_count":20911587,"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","directory-management","productivity","python","tagging","zsh"],"created_at":"2024-08-01T14:01:23.211Z","updated_at":"2025-04-05T01:04:25.920Z","avatar_url":"https://github.com/joowani.png","language":"Python","funding_links":[],"categories":["Python"],"sub_categories":[],"readme":"# Dtags: Directory Tags for Lazy Programmers\n\n[![Build](https://github.com/joowani/dtags/actions/workflows/build.yaml/badge.svg)](https://github.com/joowani/dtags/actions/workflows/build.yaml)\n[![CodeQL](https://github.com/joowani/dtags/actions/workflows/codeql.yaml/badge.svg)](https://github.com/joowani/dtags/actions/workflows/codeql.yaml)\n[![codecov](https://codecov.io/gh/joowani/dtags/branch/main/graph/badge.svg?token=22PHXFEy61)](https://codecov.io/gh/joowani/dtags)\n[![PyPI version](https://badge.fury.io/py/dtags.svg)](https://badge.fury.io/py/dtags)\n[![GitHub license](https://img.shields.io/github/license/joowani/dtags?color=brightgreen)](https://github.com/joowani/dtags/blob/main/LICENSE)\n![Python version](https://img.shields.io/badge/python-3.6%2B-blue)\n\n**Dtags** is a command-line tool that lets you tag directories for \nfaster filesystem navigation and command execution.\n\n![Demo GIF](https://user-images.githubusercontent.com/2701938/111886599-1f63e800-898c-11eb-96e4-189af3401316.gif)\n\n## Requirements\n\n* Recent versions of Bash, Zsh or Fish\n* Python 3.6+\n\n## Installation\n\nInstall via [pip](https://pip.pypa.io):\n\n```shell\npip install dtags\n```\n\nFor Bash, add the following line in `~/.bashrc`:\n```shell\nsource \u003c(dtags-activate)\n```\n\nFor Zsh, add the following line in `~/.zshrc`:\n```shell\nautoload -U +X compinit \u0026\u0026 compinit\nautoload -U +X bashcompinit \u0026\u0026 bashcompinit\n\nsource \u003c(dtags-activate)\n```\n\nFor Fish, add the following line in `~/.config/fish/config.fish`:\n```shell\ndtags-activate fish | source\n```\n\nFor [Git Bash on Windows](https://git-scm.com/download/win), add the following lines \nin `~/.bashrc`:\n```shell\nexport DTAGS_GIT_BASH=1\nsource \u003c(dtags-activate)\n```\n\nRestart your shell. The following commands will be available after:\n```shell\ntag --help\nuntag --help\ntags --help\nd --help\nrun --help\n```\nTab-completion should work out-of-the-box.\n\n## Usage\n\nTag directories with `tag`:\n```shell\n# Tag directory ~/foo with \"work\" (tags are indicated with the \"@\" prefix)\n$ tag ~/foo -t work\n/home/user/foo +@work\n\n# If tag names are not specified, directory basenames are used instead\n$ tag ~/foo\n/home/user/foo +@foo\n\n# Tag directories ~/bar and ~/baz with \"app\" and \"work\" (many-to-many)\n$ tag ~/bar ~/baz -t app work\n/home/user/bar +@app +@work\n/home/user/baz +@app +@work\n```\nExecute commands in one or more directories with `run`:\n```shell\n# Run \"git status\" in all directories tagged \"work\"\n$ run work -c git status\n\n# Run \"git status\" in directories ~/foo and ~/bar\n$ run ~/foo ~/bar -c git status\n\n# Mix tags and directory paths\n$ run work ~/foo -c git status\n```\nChange directories by path or tag with `d`:\n```shell\n# Go to directory tagged \"work\" \n# If there are multiple directories, a selection prompt is displayed\n$ d work\n\n# Go to directory ~/foo (works just like cd)\n$ d ~/foo\n\n# Use -t/--tag to always assume the argument is a tag\n$ d -t foo\n```\nUntag directories with `untag`:\n```shell\n# Remove tags \"app\" and \"work\" from directory ~/foo and ~/bar\n$ untag ~/foo ~/bar -t app work\n\n# Remove all tags from directory ~/foo\n$ untag ~/foo\n\n# Remove tag \"app\" from all directories\n$ untag -t app\n```\nManage tags with `tags`:\n```shell\n# List all tags\n$ tags\n\n# List all tags in JSON format\n$ tags --json\n\n# Clean invalid directories\n$ tags --clean\n\n# Remove all tags\n$ tags --purge\n```\nUse `--help` to see more information on each command.\n\n## Technical Notes\n* Tags are saved in `~/.dtags` directory (created when a dtags command is first run). \n* The files in `~/.dtags` are not meant to be edited manually.\n* By default, directory paths take precedence over tags when name collisions occur.\n* Tag names are automatically slugified (e.g. \"foo bar\" to \"foo-bar\"). \n* Tag names are displayed with the \"@\" character prefix for easy identification.\n* Directory paths and tag names are ordered alphabetically.\n\n## Uninstallation\n\nRun the following commands to completely uninstall dtags:\n\n```shell\n$ pip uninstall dtags\n$ rm -rf ~/.dtags\n```\n\nThen remove the `dtags-activate` line from your shell runtime configuration.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjoowani%2Fdtags","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjoowani%2Fdtags","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjoowani%2Fdtags/lists"}