From 584a44a5169465d2679e55a45740c29a2e182a0a Mon Sep 17 00:00:00 2001 From: Timmy Date: Thu, 26 Mar 2026 11:05:12 +0000 Subject: [PATCH] storkit: create 399_story_cli_port_flag_with_project_toml_persistence --- ...port_flag_with_project_toml_persistence.md | 24 ++++++++++++------- 1 file changed, 16 insertions(+), 8 deletions(-) diff --git a/.storkit/work/1_backlog/399_story_cli_port_flag_with_project_toml_persistence.md b/.storkit/work/1_backlog/399_story_cli_port_flag_with_project_toml_persistence.md index 9bd64644..36953010 100644 --- a/.storkit/work/1_backlog/399_story_cli_port_flag_with_project_toml_persistence.md +++ b/.storkit/work/1_backlog/399_story_cli_port_flag_with_project_toml_persistence.md @@ -10,14 +10,22 @@ As a developer, I want to set the server port via a --port CLI flag that persist ## Acceptance Criteria -- [ ] storkit --help shows a --port option -- [ ] storkit --port 4000 starts the server on port 4000 -- [ ] After first run with --port, the port is saved to project.toml -- [ ] On subsequent runs without --port, the port from project.toml is used -- [ ] CLI --port overrides the value in project.toml -- [ ] Default port is 3001 when neither --port nor project.toml port is set -- [ ] STORKIT_PORT env var continues to work as lowest-priority fallback +- [ ] `storkit --help` shows a `--port` option +- [ ] `storkit --port 4000` starts the server on port 4000 +- [ ] After first run with `--port`, the port is saved to `project.toml` +- [ ] On subsequent runs without `--port`, the port from `project.toml` is used +- [ ] CLI `--port` overrides the value in `project.toml` +- [ ] Default port is 3001 when neither `--port` nor `project.toml` port is set +- [ ] `STORKIT_PORT` env var is removed — no longer read or respected +- [ ] `.storkit_port` lock file mechanism is removed (`write_port_file` / `remove_port_file`) ## Out of Scope -- TBD +- Docker compose changes (can update `STORKIT_PORT` references separately) +- Adding other CLI flags beyond `--port` + +## Technical Notes + +Port resolution priority: `--port` flag > `project.toml` `port` field > default 3001 + +The port should be written to `project.toml` on startup so subsequent runs remember it. Use the existing `config.rs` / `ProjectConfig` struct — add a `port` field.