quarto-dev / quarto-dev/quarto-cli
Hard to figure out how to call `quarto create project`
Nobody has claimed this yet.
- Dominant language
- JavaScript
- Stars
- 6k
- Forks
- 458
- Avg merge
- 1d 9h
- Merged PRs (30d)
- 41
Description
What would you like to do?
Give feedback or suggest an improvement
Description
I had some trouble figuring out how to call quarto create project -- especially non-interactively or with --no-prompt. I give some details below these are the main points:
- Would be helpful to document an exact, working call to
quarto create projectthat does not trigger additional user interaction. In particular, it seems liketitleis required, which I didn't expect based on what I see at https://quarto.org/docs/projects/quarto-projects.html#creating-projects. - Should
titledefault toname? Should (project)typedefault to "default"? - Could
quarto create projectsupport the POSIX-y way of passing arguments by name, meaning--name=value? The existing usage and help already puts my mind in that mode. Then it feels like sensible defaults could take over in non-interactive settings and even interactively you could specify just thename, for example (quarto create project --name=whatever).
Here's what I currently see for how to use quarto create project:
~/rrr/usethis % quarto create project --help
Usage: quarto create [type] [commands...]
Version: 1.5.47
Description:
Create a Quarto project or extension
Options:
-h, --help - Show this help.
--open [editor] - Open new artifact in this editor (vscode,rstudio)
--no-open - Do not open in an editor
--no-prompt - Do not prompt to confirm actions
--log <file> - Path to log file
--log-level <level> - Log level (info, warning, error, critical)
--log-format <format> - Log format (plain, json-stream)
--quiet - Suppress console output.
--profile - Active project profile(s)
Commands:
help [command] - Show this help or the help of a sub-command.
I'm not sure what the [commands...] bit should be. I figured it out by successively adding inputs and noticing what I was being prompted for.
~/tmp % quarto create blah
Unknown type blah - please select from the following:
? Create
❯ project
extension
# (ok `type` should be `project`)
~/tmp % quarto create project blah
? Type
❯ default
website
blog
manuscript
book
confluence
# (a new type appears! morally `--project-type=default`)
~/tmp % quarto create project default blah
# (now I get a prompt to specify a project title)
Culminating in this successful call:
~/tmp % quarto create project default blah1 blah2
Creating project at /Users/jenny/tmp/blah1:
- Created _quarto.yml
- Created blah2.qmd
So I think it's:
quarto create project [project-type] [project-folder-name] [?project-title?]
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with the Quarto projects documentation page and run quarto create project --help to compare the documented syntax with the command's prompts. Clarify a working non-interactive invocation, explain the positional arguments and required title, and document what --no-prompt does; treat the proposed defaults and --name=value syntax as separate feature questions.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- javascript
- Domain
- cli, documentation
- Issue type
- Documentation
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100