Title: Support on_project_first_start lifecycle hook (tmuxinator parity) · Issue #1028 · tmux-python/tmuxp · GitHub
Open Graph Title: Support on_project_first_start lifecycle hook (tmuxinator parity) · Issue #1028 · tmux-python/tmuxp
X Title: Support on_project_first_start lifecycle hook (tmuxinator parity) · Issue #1028 · tmux-python/tmuxp
Description: Feature Request tmuxinator supports on_project_first_start — a lifecycle hook that fires only on first session creation, not on subsequent starts when the session already exists. tmuxinator reference From ~/study/ruby/tmuxinator/lib/tmux...
Open Graph Description: Feature Request tmuxinator supports on_project_first_start — a lifecycle hook that fires only on first session creation, not on subsequent starts when the session already exists. tmuxinator referen...
X Description: Feature Request tmuxinator supports on_project_first_start — a lifecycle hook that fires only on first session creation, not on subsequent starts when the session already exists. tmuxinator referen...
Opengraph URL: https://github.com/tmux-python/tmuxp/issues/1028
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Support on_project_first_start lifecycle hook (tmuxinator parity)","articleBody":"## Feature Request\n\ntmuxinator supports `on_project_first_start` — a lifecycle hook that fires **only** on first session creation, not on subsequent starts when the session already exists.\n\n### tmuxinator reference\n\nFrom `~/study/ruby/tmuxinator/lib/tmuxinator/hooks/project.rb:17-20` and `template.erb:16-22`:\n\n```erb\n\u003c%- if append? || !tmux_has_session?(name) -%>\n # First start path — on_project_first_start fires here\n \u003c%= hook_on_project_first_start %>\n # ... create session ...\n\u003c%- else -%>\n # Restart path — on_project_restart fires here\n\u003c% end %>\n```\n\nThe hook fires when `!tmux_has_session?(name)` — i.e., only when the session doesn't already exist.\n\n### Use case\n\n```yaml\non_project_first_start: rake db:create && rake db:migrate\non_project_restart: rake db:migrate\non_project_start: echo \"starting\"\n```\n\n- First `tmuxinator start`: runs `db:create && db:migrate` (first start) + `echo starting` (always)\n- Subsequent `tmuxinator start`: runs `db:migrate` (restart) + `echo starting` (always)\n\n### Current state\n\n- The tmuxinator importer now passes `on_project_first_start` through with a warning (commit `da089cc6`)\n- The builder does not yet implement this hook\n- tmuxp has `on_project_start` (fires always) and `on_project_restart` (fires when session exists)\n\n### Implementation\n\nIn `src/tmuxp/cli/load.py`, the session-exists check at line 716 already distinguishes new vs existing sessions. The `on_project_first_start` hook should fire in the \"new session\" path (line 744) but NOT in the \"session exists\" path (line 716).\n\n### Files\n\n- `src/tmuxp/cli/load.py` — fire hook in new-session path only\n- `src/tmuxp/workspace/loader.py` — add to hook expansion list\n- `src/tmuxp/workspace/importers.py` — remove warning (already passes through)","author":{"url":"https://github.com/tony","@type":"Person","name":"tony"},"datePublished":"2026-03-21T21:52:48Z","url":"https://github.com/tmux-python/tmuxp/issues/1028"}
| react-profiling | 0 |
| react-import-map | react,react-dom,react-dom/client,react-dom/profiling,react-is,react/compiler-runtime,react/jsx-dev-runtime,react/jsx-runtime,scheduler@b8488ee2c322 |
| route-pattern | /_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format) |
| route-controller | voltron_issues_fragments |
| route-action | issue_layout |
| fetch-nonce | v2:95bf214e-7cd7-993e-d434-d6dc745395d1 |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | D078:3E8F5A:2CA76E:3DCF44:6B008899 |
| html-safe-nonce | ee43fe0b5d404c893e1fa7cd711c02850df810c5fdbb3cb2dc115c789a6134d0 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJEMDc4OjNFOEY1QToyQ0E3NkU6M0RDRjQ0OjZCMDA4ODk5IiwidmlzaXRvcl9pZCI6IjYxMDgzNTI5MTczNzc0MTk0MTciLCJyZWdpb25fZWRnZSI6ImlhZCIsInJlZ2lvbl9yZW5kZXIiOiJpYWQifQ== |
| visitor-hmac | ef421872a64cfd1c737568de55a9333414db554fafe15dbf74cebc33bcdfddf3 |
| hovercard-subject-tag | issue:4113963173 |
| github-keyboard-shortcuts | repository,issues,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/_view_fragments/issues/show/tmux-python/tmuxp/1028/issue_layout |
| twitter:image | https://opengraph.githubassets.com/a3e04df03a2007e8b39fac3bd6f0605dbf704bb1aab2bba5423935a546c01e1c/tmux-python/tmuxp/issues/1028 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/a3e04df03a2007e8b39fac3bd6f0605dbf704bb1aab2bba5423935a546c01e1c/tmux-python/tmuxp/issues/1028 |
| og:image:alt | Feature Request tmuxinator supports on_project_first_start — a lifecycle hook that fires only on first session creation, not on subsequent starts when the session already exists. tmuxinator referen... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | tony |
| hostname | github.com |
| expected-hostname | github.com |
| None | 4d3d8e50f02c1d7bf86d5acfa1d3bfe9366abd6528a6b429eb07a168429d2b61 |
| turbo-cache-control | no-preview |
| go-import | github.com/tmux-python/tmuxp git https://github.com/tmux-python/tmuxp.git |
| octolytics-dimension-user_id | 37234308 |
| octolytics-dimension-user_login | tmux-python |
| octolytics-dimension-repository_id | 12398170 |
| octolytics-dimension-repository_nwo | tmux-python/tmuxp |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 12398170 |
| octolytics-dimension-repository_network_root_nwo | tmux-python/tmuxp |
| turbo-body-classes | logged-out env-production page-responsive |
| disable-turbo | false |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | db758f8e02b8257935fb03edf81a3e76eb3abd11 |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
| react-app-name | issues |
Links:
Viewport: width=device-width