Add configurable port and directory options for demo command#2
Merged
robdimarco-atxp merged 1 commit intomainfrom Sep 9, 2025
Conversation
- Move argument parsing from run-demo.ts to index.ts for better separation of concerns - Add --port/-p option to specify custom demo port (default: 8016) - Add --dir/-d option to specify custom demo directory (default: ~/.cache/atxp/demo) - Refactor runDemo() to accept DemoOptions parameter for type safety - Update all helper functions to use passed parameters instead of global state - Add comprehensive documentation in help text and README files - Support path resolution for relative directory paths New usage examples: - npx atxp demo --port 3000 - npx atxp demo --dir ./my-demo - npx atxp demo --port 9000 --dir ~/projects/demo --verbose Resolves port conflicts and allows flexible demo installation locations. 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
run-demo.tstoindex.tsfor better separation of concernsChanges
--port, -pto specify custom demo port (default: 8016)--dir, -dto specify custom demo directory (default: ~/.cache/atxp/demo)index.tsDemoOptionsinterfaceNew Usage Examples
Test plan
npx atxpshows updated help with new optionsnpx atxp demoworks with default settings--portoption allows custom port specification--diroption allows custom directory specificationBenefits
Related to ATXP-243: Allow users to specify what port and working directory to use for the demo
🤖 Generated with Claude Code