Title: [Breaking Change] Add `usethis hook` command and `--hook/--no-hook` to `usethis init` by Copilot · Pull Request #1454 · usethis-python/usethis-python · GitHub
Open Graph Title: [Breaking Change] Add `usethis hook` command and `--hook/--no-hook` to `usethis init` by Copilot · Pull Request #1454 · usethis-python/usethis-python
X Title: [Breaking Change] Add `usethis hook` command and `--hook/--no-hook` to `usethis init` by Copilot · Pull Request #1454 · usethis-python/usethis-python
Description: Higher-level interface for managing git hooks, analogous to usethis lint, usethis typecheck, etc. Uses pre-commit as the underlying framework for now.
Changes
New usethis hook command — top-level command under "Manage Tooling" with standard --remove, --how, --offline, --frozen, --backend options
_toolset/hook.py: wraps use_pre_commit()
_ui/interface/hook.py: CLI interface
Registered in app.py
usethis init flag rename — --pre-commit/--no-pre-commit → --hook/--no-hook (default: False)
Internal wiring updated to use use_hook_framework() from the toolset layer instead of importing use_pre_commit directly from _core
Architecture — hook added to .importlinter ui_interface contract
Docs — usethis hook added to docs/cli/overview.md, docs/cli/reference.md, and README.md
docs/cli/reference.md: new ## usethis hook section added and --pre-commit renamed to --hook under usethis init
Usage
$ usethis hook # Add pre-commit framework
$ usethis hook --remove # Remove it
$ usethis init --hook # Include hook framework in project init
Original prompt
This section details on the original issue you should resolve
Open Graph Description: Higher-level interface for managing git hooks, analogous to usethis lint, usethis typecheck, etc. Uses pre-commit as the underlying framework for now. Changes New usethis hook command — top-level ...
X Description: Higher-level interface for managing git hooks, analogous to usethis lint, usethis typecheck, etc. Uses pre-commit as the underlying framework for now. Changes New usethis hook command — top-level ...
Opengraph URL: https://github.com/usethis-python/usethis-python/pull/1454
X: @github
Domain: github.com
| route-pattern | /:user_id/:repository/pull/:id/files(.:format) |
| route-controller | pull_requests |
| route-action | files |
| fetch-nonce | v2:c818ed47-f6f8-2d7b-c3ef-0a686cd0ab8c |
| current-catalog-service-hash | ae870bc5e265a340912cde392f23dad3671a0a881730ffdadd82f2f57d81641b |
| request-id | CEA6:2630A2:1ABAD17:2589E5F:6A4CC519 |
| html-safe-nonce | 7d8d5c01f92537fab9fa039ad681bd7e98b3c5c9d740696ba3f1d4a40eea48a5 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJDRUE2OjI2MzBBMjoxQUJBRDE3OjI1ODlFNUY6NkE0Q0M1MTkiLCJ2aXNpdG9yX2lkIjoiMjcyMTMzNzU0MTYyMTc2MTMwNSIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9 |
| visitor-hmac | 4dd13137688b3fe706f93518edd538ccb4c2eae409f9f86a2b33a33d6fe7c5b2 |
| hovercard-subject-tag | pull_request:3430395436 |
| github-keyboard-shortcuts | repository,pull-request-list,pull-request-conversation,pull-request-files-changed,copilot |
| google-site-verification | Apib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I |
| octolytics-url | https://collector.github.com/github/collect |
| analytics-location | / |
| fb:app_id | 1401488693436528 |
| apple-itunes-app | app-id=1477376905, app-argument=https://github.com/usethis-python/usethis-python/pull/1454/files |
| twitter:image | https://avatars.githubusercontent.com/in/1143301?s=400&v=4 |
| twitter:card | summary_large_image |
| og:image | https://avatars.githubusercontent.com/in/1143301?s=400&v=4 |
| og:image:alt | Higher-level interface for managing git hooks, analogous to usethis lint, usethis typecheck, etc. Uses pre-commit as the underlying framework for now. Changes New usethis hook command — top-level ... |
| og:site_name | GitHub |
| og:type | object |
| hostname | github.com |
| expected-hostname | github.com |
| None | 3d11bb817438277de2a940854450e83a7d32b6aeb5014e9e6b00a6423900251c |
| turbo-cache-control | no-preview |
| diff-view | unified |
| go-import | github.com/usethis-python/usethis-python git https://github.com/usethis-python/usethis-python.git |
| octolytics-dimension-user_id | 216362695 |
| octolytics-dimension-user_login | usethis-python |
| octolytics-dimension-repository_id | 842189705 |
| octolytics-dimension-repository_nwo | usethis-python/usethis-python |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 842189705 |
| octolytics-dimension-repository_network_root_nwo | usethis-python/usethis-python |
| turbo-body-classes | logged-out env-production page-responsive full-width |
| disable-turbo | true |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | d0da0eb92994395299ed4450bf67b0373005be36 |
| ui-target | canary-2 |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
Viewport: width=device-width