[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"project-73333":3},{"id":4,"name":5,"fullName":6,"owner":7,"repo":5,"description":8,"homepage":9,"htmlUrl":10,"language":11,"languages":10,"totalLinesOfCode":10,"stars":12,"forks":13,"watchers":14,"openIssues":15,"contributorsCount":16,"subscribersCount":16,"size":16,"stars1d":17,"stars7d":18,"stars30d":19,"stars90d":16,"forks30d":16,"starsTrendScore":20,"compositeScore":21,"rankGlobal":10,"rankLanguage":10,"license":22,"archived":23,"fork":23,"defaultBranch":24,"hasWiki":25,"hasPages":25,"topics":26,"createdAt":10,"pushedAt":10,"updatedAt":45,"readmeContent":46,"aiSummary":47,"trendingCount":16,"starSnapshotCount":16,"syncStatus":17,"lastSyncTime":48,"discoverSource":49},73333,"tach","tach-org\u002Ftach","tach-org","A Python tool to visualize + enforce dependencies, using modular architecture 🌎 Open source 🐍 Installable via pip 🔧 Able to be adopted incrementally - ⚡ Implemented with no runtime impact ♾️ Interoperable with your existing systems 🦀 Written in rust","https:\u002F\u002Fdocs.gauge.sh\u002F",null,"Rust",2748,89,12,45,0,2,8,26,6,68.46,"MIT License",false,"main",true,[27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44],"ci","cli","code-quality","config","dependency-management","developer-tools","devops","framework","library","monorepo","open-source","package","productivity","programming","python","rust","static-code-analysis","terminal","2026-06-12 04:01:09","# Tach\n\n[![downloads](https:\u002F\u002Fstatic.pepy.tech\u002Fbadge\u002Ftach\u002Fmonth)](https:\u002F\u002Fpepy.tech\u002Fproject\u002Ftach)\n[![version](https:\u002F\u002Fimg.shields.io\u002Fpypi\u002Fv\u002Ftach.svg)](https:\u002F\u002Fpypi.Python.org\u002Fpypi\u002Ftach)\n[![license](https:\u002F\u002Fimg.shields.io\u002Fpypi\u002Fl\u002Ftach.svg)](https:\u002F\u002Fpypi.Python.org\u002Fpypi\u002Ftach)\n[![python](https:\u002F\u002Fimg.shields.io\u002Fpypi\u002Fpyversions\u002Ftach.svg)](https:\u002F\u002Fpypi.Python.org\u002Fpypi\u002Ftach)\n[![ci](https:\u002F\u002Fgithub.com\u002Fgauge-sh\u002Ftach\u002Factions\u002Fworkflows\u002Fci.yml\u002Fbadge.svg)](https:\u002F\u002Fgithub.com\u002Fgauge-sh\u002Ftach\u002Factions\u002Fworkflows\u002Fci.yml)\n[![basedpyright - checked](https:\u002F\u002Fimg.shields.io\u002Fbadge\u002Fbasedpyright-checked-ffc000)](https:\u002F\u002Fdocs.basedpyright.com)\n[![ruff](https:\u002F\u002Fimg.shields.io\u002Fendpoint?url=https:\u002F\u002Fraw.githubusercontent.com\u002Fastral-sh\u002Fruff\u002Fmain\u002Fassets\u002Fbadge\u002Fv2.json)](https:\u002F\u002Fgithub.com\u002Fastral-sh\u002Fruff)\n\nTach is a Python tool to enforce dependencies and interfaces, written in Rust.\n\nTach is inspired by the [modular monolith](https:\u002F\u002Fwww.milanjovanovic.tech\u002Fblog\u002Fwhat-is-a-modular-monolith) architecture.\n\n[Docs](https:\u002F\u002Fdocs.gauge.sh)\n\n\u003Cdiv align=\"center\">\n    \u003Cimg src=\"docs\u002Fassets\u002Flight_logo.png\" alt=\"gauge-logo\" width=\"30%\"  style=\"border-radius: 50%; padding-bottom: 20px\"\u002F>\n\u003C\u002Fdiv>\n\nhttps:\u002F\u002Fgithub.com\u002Fuser-attachments\u002Fassets\u002F11eec4a1-f80a-4f13-9ff3-91a9760133b6\n\n\n\nTach can enforce:\n\n- 📋 Imports only come from [declared dependencies](https:\u002F\u002Fdocs.gauge.sh\u002Fusage\u002Fconfiguration#modules)\n- 🤝 Cross-module calls use the [public interface](https:\u002F\u002Fdocs.gauge.sh\u002Fusage\u002Fconfiguration#interfaces)\n- ⛓️‍💥 [No cycles](https:\u002F\u002Fdocs.gauge.sh\u002Fusage\u002Fconfiguration) in the dependency graph\n\n\nTach is:\n\n- 🌎 Open source\n- 🐍 Installable via pip\n- 🔧 Able to be adopted incrementally\n- ⚡ Implemented with no runtime impact\n- ♾️ Interoperable with your existing systems\n\n## Getting Started\n\n### Installation\n\n```bash\npip install tach\n```\n\n### Setup\n\nTach will guide you through initial project setup.\n\nRun:\n```bash\n tach init\n```\n\nAfter an introductory message, you will see a file tree interface allowing you to interactively configure your project.\n\nUse the arrow keys to navigate, and mark each module boundary with 'Enter'. You can mark all of your top-level Python packages, or just a few that you want to track.\n\nFAQ: [What is a module?](https:\u002F\u002Fdocs.gauge.sh\u002Fusage\u002Ffaq#what-is-a-module%3F)\n\nIf your Python code lives below your project root, or if you are working in a monorepo with multiple Python packages, mark your Python [source roots](https:\u002F\u002Fdocs.gauge.sh\u002Fusage\u002Fconfiguration#source-roots) using the 's' key.\n\n### Enforcement\n\nTach comes with a cli command to enforce the boundaries that you just set up! From the root of your Python project, run:\n\n```bash\ntach check\n```\n\nYou will see:\n\n```bash\n✅ All modules validated!\n```\n\nYou can validate that Tach is working by:\n\n1. Removing an item from the `depends_on` key in `tach.toml`, or marking it as [deprecated](https:\u002F\u002Fdocs.gauge.sh\u002Fusage\u002Fdeprecate)\n2. By adding an import between modules that didn't previously import from each other.\n\nGive both a try and run `tach check` again. This will generate an error:\n\n```bash\n❌ tach\u002Fcheck.py[L8]: Cannot use 'tach.filesystem'. Module 'tach' cannot depend on 'tach.filesystem'.\n```\n\nEach error indicates an import which violates your dependencies. If your terminal supports hyperlinks, click on the file path to go directly to the error.\n\nWhen an error is detected, `tach check` will exit with a non-zero code. It can be easily integrated with CI\u002FCD, [Pre-commit hooks](https:\u002F\u002Fdocs.gauge.sh\u002Fusage\u002Fcommands#tach-install), and [VS Code](https:\u002F\u002Fmarketplace.visualstudio.com\u002Fitems?itemName=detachhead.dtach), and more!\n\n### Extras\n\nVisualize your dependency graph.\n\n```bash\ntach show [--web]\n```\n\nTach will generate a graph of your dependencies. Here's what this looks like for Tach:\n\n![tach show](docs\u002Fassets\u002Ftach_show.png)\n\nNote that this graph is generated remotely with the contents of your `tach.toml` when running `tach show --web`.\n\nIf you would like to use the [GraphViz DOT format](https:\u002F\u002Fgraphviz.org\u002Fabout\u002F) locally, simply running `tach show` will generate `tach_module_graph.dot` in your working directory.\n\nYou can view the dependencies and usages for a given path:\n\n```bash\ntach report my_package\u002F\n# OR\ntach report my_module.py\n```\n\ne.g.:\n\n```bash\n> tach report python\u002Ftach\u002Ffilesystem\n[Dependencies of 'python\u002Ftach\u002Ffilesystem']\npython\u002Ftach\u002Ffilesystem\u002Finstall.py[L6]: Import 'tach.hooks.build_pre_commit_hook_content'\npython\u002Ftach\u002Ffilesystem\u002Fproject.py[L5]: Import 'tach.constants.CONFIG_FILE_NAME'\n...\n-------------------------------\n[Usages of 'python\u002Ftach\u002Ffilesystem']\npython\u002Ftach\u002Fcache\u002Faccess.py[L8]: Import 'tach.filesystem.find_project_config_root'\npython\u002Ftach\u002Fcache\u002Fsetup.py[L7]: Import 'tach.filesystem.find_project_config_root'\n...\n```\n\nTach also supports:\n\n- [Public interfaces for modules](https:\u002F\u002Fdocs.gauge.sh\u002Fusage\u002Finterfaces\u002F)\n- [Deprecating individual dependencies](https:\u002F\u002Fdocs.gauge.sh\u002Fusage\u002Fdeprecate)\n- [Layered architecture](https:\u002F\u002Fdocs.gauge.sh\u002Fusage\u002Flayers)\n- [Incremental adoption](https:\u002F\u002Fdocs.gauge.sh\u002Fusage\u002Funchecked-modules)\n- [Generating JSON dependency maps](https:\u002F\u002Fdocs.gauge.sh\u002Fusage\u002Fcommands#tach-map)\n- [Monorepos and namespace packages](https:\u002F\u002Fdocs.gauge.sh\u002Fusage\u002Fconfiguration#source-roots)\n- [Domain ownership](https:\u002F\u002Fdocs.gauge.sh\u002Fusage\u002Fconfiguration#tach-domain-toml)\n- [Inline 'ignore' comments](https:\u002F\u002Fdocs.gauge.sh\u002Fusage\u002Ftach-ignore)\n- [Pre-commit hooks](https:\u002F\u002Fdocs.gauge.sh\u002Fusage\u002Fcommands#tach-install)\n\nMore info in the [docs](https:\u002F\u002Fdocs.gauge.sh\u002F). If you have any feedback, we'd love to talk!\n\nIf you have any questions or run into any issues, let us know by submitting a [Github Issue](https:\u002F\u002Fgithub.com\u002Fgauge-sh\u002Ftach\u002Fissues)!\n\n---\n\n### Contributors\n\n\u003Ca href=\"https:\u002F\u002Fgithub.com\u002Fgauge-sh\u002Ftach\u002Fgraphs\u002Fcontributors\">\n  \u003Cimg src=\"https:\u002F\u002Fcontrib.rocks\u002Fimage?repo=gauge-sh\u002Ftach\" \u002F>\n\u003C\u002Fa>\n","Tach 是一个用于可视化和强制执行依赖关系的 Python 工具，采用模块化架构。其核心功能包括确保导入仅来自声明的依赖项、跨模块调用使用公共接口以及避免依赖图中的循环。该工具使用 Rust 编写，具有零运行时影响，并且可以逐步采用。Tach 适用于需要提高代码质量和可维护性的场景，尤其是在大型项目或单体应用中，能够帮助开发者更好地管理和控制模块间的依赖关系。此外，它还支持通过 pip 安装，并且与现有系统无缝集成。","2026-06-11 03:45:04","high_star"]