What
pn init my_app currently scaffolds into the current directory and only uses my_app as the project name in pythonnative.toml. Most scaffolding tools (npx create-react-app my_app, cargo new my_app, django-admin startproject my_app) create a new my_app/ directory, and our own docs read that way too, so newcomers are surprised when pn init my_app fills their working directory instead.
Proposed behavior
- pn init (no name): scaffold into the current directory, named after it (current behavior).
- pn init my_app: create ./my_app/, scaffold into it, and refuse to proceed if the directory already exists and isn't empty (unless --force is passed).
- Update the final hint output so the next steps include cd my_app.
Where to look
- src/pythonnative/cli/pn.py: init_project() (around line 105) does the scaffolding; _build_parser() (around line 868) defines the name and --force arguments.
- tests/test_cli.py has existing CLI tests to extend.
- Grep the docs for pn init and update any walkthroughs that assume the old behavior.
Acceptance criteria
- pn init my_app creates and populates my_app/ with app/main.py, pythonnative.toml, and .gitignore.
- Existing no-name behavior is unchanged.
- Tests cover both forms plus the "directory already exists" refusal.
- ./scripts/check.sh passes.
Notes for contributors
See CONTRIBUTING.md for setup. Suggested PR title: feat(cli): create project directory in pn init <name>.
Reactions are currently unavailable
What
pn init my_app currently scaffolds into the current directory and only uses my_app as the project name in pythonnative.toml. Most scaffolding tools (npx create-react-app my_app, cargo new my_app, django-admin startproject my_app) create a new my_app/ directory, and our own docs read that way too, so newcomers are surprised when pn init my_app fills their working directory instead.
Proposed behavior
Where to look
Acceptance criteria
Notes for contributors
See CONTRIBUTING.md for setup. Suggested PR title: feat(cli): create project directory in pn init <name>.