Part of the 0.3.0 adoption roadmap — First-run UX.
Why (adoption impact)
The #1 beginner trap. A new user installs pylings, runs pylings, and — if they're not inside an initialized workspace — gets a ManifestError (exit 2). They have no idea they were supposed to run pylings init --path ... first. We lose them at the very first command.
Current state
pylings/cli.py main(): with no subcommand, args.command in (None, "watch", "start", "topics") calls run_tui(args.root, ...). args.root defaults to the current directory.
- If
args.root has no info.toml, manifest loading raises ManifestError → caught at the bottom of main() → prints pylings: <error> and returns 2.
- Workspace creation lives in
_cmd_init (pylings/core/...), invoked today only via the explicit init subcommand.
Scope / acceptance criteria
Where to look
pylings/cli.py (main, _cmd_init, _build_parser, the args.command in (None, ...) branch).
pylings/core/manifest.py (ManifestError, load).
Out of scope
Verify
- In a fresh empty dir,
pylings should get a beginner into exercise 1 (or a clear y/N prompt), not a traceback or bare ManifestError.
- Add/extend a CLI integration test under
tests/integration/ for the "no workspace" path (assert it inits or prompts, doesn't exit 2 silently).
Difficulty
enhancement · good first issue — contained CLI change, ~half a day with tests.
Part of the 0.3.0 adoption roadmap — First-run UX.
Why (adoption impact)
The #1 beginner trap. A new user installs pylings, runs
pylings, and — if they're not inside an initialized workspace — gets aManifestError(exit 2). They have no idea they were supposed to runpylings init --path ...first. We lose them at the very first command.Current state
pylings/cli.pymain(): with no subcommand,args.command in (None, "watch", "start", "topics")callsrun_tui(args.root, ...).args.rootdefaults to the current directory.args.roothas noinfo.toml, manifest loading raisesManifestError→ caught at the bottom ofmain()→ printspylings: <error>and returns2._cmd_init(pylings/core/...), invoked today only via the explicitinitsubcommand.Scope / acceptance criteria
pylingsruns with no workspace inargs.root, do NOT hard-error. Instead either:info.tomlhere", print a one-line explanation, auto-init a workspace in a sensible default location (e.g../pylings-workspaceorargs.root), and launch into the first exercise; orNo workspace found here. Create one in ./pylings-workspace? [Y/n]and proceed on yes.--rootis still respected.Where to look
pylings/cli.py(main,_cmd_init,_build_parser, theargs.command in (None, ...)branch).pylings/core/manifest.py(ManifestError,load).Out of scope
Verify
pylingsshould get a beginner into exercise 1 (or a clear y/N prompt), not a traceback or bareManifestError.tests/integration/for the "no workspace" path (assert it inits or prompts, doesn't exit 2 silently).Difficulty
enhancement·good first issue— contained CLI change, ~half a day with tests.