Questions, flags, and defaults

Understand where each answer comes from, so you can run any command in a terminal, a script, or an agent.

Every command that sets something up needs answers: which kind of project, which agents, which skills, what to do with a file you edited. This page explains where each answer comes from, so you can predict whether a command will ask you, use a default, or stop, and which flag to pass when it stops.

Running a command applies it

The CLI has no yes-or-no confirmations. When you run create, init, add, update, or a skills command that writes, you have already decided to do it. The command shows the planned changes as a file tree, with the install commands it will run, and applies them.

A question appears only for one of two reasons: the command needs information that neither your flags nor the project's record supply, or a change would replace a file you edited and the CLI needs to know whether to keep your version. To look before you change anything, run jfdevelops skills, jfdevelops skills --check, jfdevelops skills outdated, or jfdevelops add --list. They only report.

Where an answer comes from

For each question, the first of these that applies wins:

  1. A flag or argument. --kind app answers the project kind, and create my-app answers the name. Flags answer their questions in a terminal too, so the CLI never asks for something you already passed.
  2. The project's record or detection. When the CLI already knows the answer, it uses it. The record in jfdevelops.json wins for some questions and detection wins for others; see What the project remembers.
  3. A question, asked only in a terminal and only without --yes.
  4. The question's default, used with --yes or without a terminal. A choice with exactly one option is its own default.
  5. A failure, when the question has no default. The command stops and, when the question has a flag, names the flag that answers it. Changes that earlier steps already applied and package installs that already ran stay; in update, that is the CLI upgrade and the steps that finished before the question. See Cancelling.

The same command can end in three different ways depending on what you pass:

npx @jfdevelops/cli create my-app
npx @jfdevelops/cli create my-app --yes
npx @jfdevelops/cli create my-app --kind app --yes

In a terminal, the first command asks whether the project is an app or a library, then asks the remaining questions. The second command answers every open question with its default, but "What kind of project are you creating?" has none, so it fails. The third passes the kind, so every other question takes its default: a single app on pnpm, formatted with Prettier, set up for every coding agent, with Git initialized and no remote.

What the project remembers

On a project with jfdevelops.json, the choices init reuses depend on the flags and whether it can ask questions. Recorded target kinds are used outright, and so is the package manager when none is detected. The init step of update always uses defaults.

Recorded choiceUsed when
Target kinds (app or library)init takes the recorded kind of each target before it uses detection
Package managerinit cannot detect one
Coding agentsThe command runs with defaults; a terminal preselects them
Enabled skillsinit runs with defaults on a configured project
Integrationsinit uses defaults and --addons is omitted. Interactive init without --addons preselects every detected integration

With --yes or without a terminal, omitting --addons keeps exactly the configured project's recorded integrations. On a project without jfdevelops.json, the same invocation adopts every detected integration. The init step of update always uses these defaults. To add one integration while keeping the others, run jfdevelops add addon <name>. To choose a new set, run jfdevelops init interactively or pass --addons with every detected integration you want to keep or adopt. Recorded addons that are no longer detected stay enabled. See Configuration for the recorded fields.

Terminals

The CLI asks questions only when both standard input and standard output are terminals and you omit --yes. Piping output or redirecting input makes the CLI use defaults and print plain text. CI runners and agent shells that allocate a pseudo-terminal can receive prompts. Pass --yes to use defaults there too.

--yes

-y, --yes answers every question your flags leave open with its default, even in a terminal. It is never required: without a terminal, the CLI behaves as if you had passed it. Conflicts are questions too, so under --yes every file you edited is kept unless you pass --conflicts overwrite.

Two removal choices have different defaults when the CLI cannot ask. In a terminal, sync preselects missing-source skills for removal, and update recommends removing workspace scripts that duplicate Vite+ tasks. With --yes or without a terminal, sync warns and keeps those skills, and update keeps those scripts. Use --remove-missing on skills sync, skills update, or update to select missing-source skills for removal. Use update --scripts replace to select removal of duplicate scripts.

Conflicts and --conflicts

When a change would replace or delete a file you edited, the CLI shows a diff and asks how to handle that file, with keep as the default. --conflicts keep or --conflicts overwrite answers that question for every such file at once, with or without --yes, in a terminal or not. Two kinds of conflict are never overwritten and are always kept: a path another setup owns, and a path that is a directory or link. See Conflicts.

Cancelling

You can cancel at any question, for example with Ctrl+C, and the command exits with code 0. For a command with one set of planned changes, nothing has been written before they are applied. Changes that earlier steps already applied and package installs that already ran stay: an addon install, the source package upgrades of skills update, and, in update, the CLI upgrade and the steps that finished before the question.

When a question has no default

A question with no default stops the command and exits with code 1. The message names the flag that answers the question, or, when the question has no flag, says to choose in a terminal:

No default answers "<question>". Pass <flag>, or run the command in a terminal without --yes.
No default answers "<question>". Run the command in a terminal without --yes to choose.

These questions have no default:

CommandQuestionFlag that answers it
createWhat kind of project are you creating? Asked only when --kind is omitted and no layout flag implies the kind--kind <app|library>
initWhich package manager does this project use? Asked only when it is neither detected nor recorded--package-manager <name>
initIs a target an app or a library? Asked only for a target with no recorded or detected kind--targets <path>=<app|library>
add skillWhich source provides the skill, when several packages or versions do--source <package[@version]>
addWhat would you like to add, when more than one kind is available. With one available kind, add chooses it under defaults, but the item questions that follow, "Select skills to add" and "Package name" have no default, and "Which addon should be added?" takes its only option when exactly one addon is available, but has no default otherwiseA kind and a name, such as add skill <name>
add addonWhich version to use, when an addon skill is installed in several versionsNone; run it in a terminal to choose
create skillsWhich package owns the skills, when several could--package <name>
create skillsWhen you scaffold a skill: when an agent should use it--description <text>

Each command's entry in the command reference lists its questions with their defaults.

Next steps