quarto-dev / quarto-dev/quarto-cli

Hard to figure out how to call `quarto create project`

Open
#10,578 1 comment 1 reaction 0 assignees View on GitHub

Nobody has claimed this yet.

documentation
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 project that does not trigger additional user interaction. In particular, it seems like title is required, which I didn't expect based on what I see at https://quarto.org/docs/projects/quarto-projects.html#creating-projects.
  • Should title default to name? Should (project) type default to "default"?
  • Could quarto create project support 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 the name, 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

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. 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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.