Skip to content

Conversation

@mphstudios
Copy link
Member

@mphstudios mphstudios commented Jan 18, 2026

Pull-Request Stacked on #1149

Purpose

The Quire CLI has four users groups, or audiences, for whom there are overlapping use cases and for whom the cli needs to provide an understandable and effective interface. These audiences/users are:

  • less or non-technical users who will create, edit, and build outputs
  • technical users & developers who will create and/or modify quire projects
  • maintainers who work directly on the quire code base
  • a programmatic user (arguably a technical use-case rather than a user but distinct from the previous three groups)

The changes in this pull-request address concerns across all four of these user groups and the overlapping workflows in order to make the CLI a more effective and reliable tool for each.

Added

  • Common workflows for Quire (using the CLI) are documented in three layers:
    • A short "Common Workflows" section of the CLI help (quire help) output
    • Verbose workflow documentation in docs/workflows.md
    • A quire help workflows subcommand replaced in PR Feature: Help Topics System #1162

Changed

  • Hides the --11ty option from build and preview command help output; this is an internal implementation detail option that should not be shown to most users.
  • Standardizes command lifecycle hook signature per Commander.js documentation;
    the preAction method signature is (thisCommand, actionCommand) and while the actionCommand parameter is unused by most commands it is included for API consistency with Commander.js hooks.
  • Renames the quire conf command to quire settings, which benefits non-developers;
  • Renames the commands/conf modules to commands/config
    The registered command name remains 'settings' and the command modules are renamed in the code to align with other cli tools.
  • Renames version command to use and hides this command;
    Having a command named version and a quire --version option was confusing.
    The quire version command is incomplete functionality, while quire-11ty is installed directly into a project directory alongside content there is not a path for users to change the quire-11ty version after starting a project and ensure non-breaking changes or loss of user customization. Quire v1 hides the cli command to change the project quire-11ty version is hidden.
  • Renames epub and pdf command option --lib to --engine;
    The option name --lib is less clear for both non-technical users and developers familiar with other tools, --engine is more idiomatic; the --lib option is deprecated but hidden, making the renamed option a non-breaking change.

@mphstudios mphstudios marked this pull request as ready for review January 19, 2026 01:20
@mphstudios mphstudios changed the title CLI UX improvements Feature: cli user-experience improvements Jan 19, 2026
@mphstudios mphstudios force-pushed the feature/log-output-refined branch from 9671b3e to a9c1fe0 Compare January 21, 2026 02:45
@mphstudios mphstudios force-pushed the feature/cli-ux-improvements branch from efdee12 to 2c9bd2e Compare January 21, 2026 04:49
@mphstudios mphstudios changed the title Feature: cli user-experience improvements CLI user-experience improvements Jan 21, 2026
@mphstudios mphstudios force-pushed the feature/log-output-refined branch from a9c1fe0 to 5a57dcf Compare January 22, 2026 21:22
@mphstudios mphstudios force-pushed the feature/cli-ux-improvements branch from 2c9bd2e to 54623ff Compare January 22, 2026 22:29
Base automatically changed from feature/log-output-refined to main January 23, 2026 18:28
Implementation of a simple abstraction for console output for improved separation of concerns and testing.
The instanceof condition will never be true for string literals,
test typeof alias is a String instead.
Commander.js  preAction method signature is (thisCommand, actionCommand)
while the actionCommand parameter is unused by most commands it is
included for API consistency with Commander.js hooks.
The quire version command is incomplete functionality, while quire-11ty
is installed directly into a project directory alongside content there
is not a path for users to change the quire-11ty version after starting
a project and ensure non-breaking changes or loss of user customization.
Quire v1 hides the cli command to change the project quire-11ty version
is hidden.
Though version command is renamed to 'use' the command remains hidden.
Encapsulate parsing options defined using the array-syntax to transform
them into an Option object that can be passed to the addOption method.
When the --build is set and build outputs are missig build will be run
first, before generating epub or pdf output. This flag expands possible
programmatic uses of the quire-cli.
The regesitered command name remains 'settings' to benefit non-developer
audience while the command module renaming aligns with many other cli
tools (git, npm, et cetera) and benefits developers.
TODO plan a more comprehensive implementation of the quire help <topic>
The isQuire function was moved to lib/project/detect.js and the tests
were duplicated there. The orphaned test file imported a non-existent
source file, causing CI failures.
@mphstudios mphstudios force-pushed the feature/cli-ux-improvements branch from eb9450d to 2b9bc08 Compare January 23, 2026 18:47
These files were replaced by lib/logger/index.js in the squash merge
of feature/log-output-refined into main. The rebase incorrectly
replayed a commit that added these files.
Update esmock configuration to use #lib/logger/index.js instead of
the removed #src/lib/logger.js path.
The rebase incorrectly replaced the MissingBuildOutputError with a
manual error construction. This restores the proper error class usage
and updates the test to expect the correct error code.
Same fix as epub command - the rebase incorrectly replaced the
MissingBuildOutputError with manual error construction.
Implementation was missing PDF path information. Now returns:
- pdf.exists: boolean indicating if any PDF output exists
- pdf.paths: array of existing PDF file paths
- pdf.mtime: most recent modification time among PDF files
TODO: the quire serve command should run a local http server for the
build output.
@mphstudios mphstudios merged commit 6226fc5 into main Jan 23, 2026
7 checks passed
@mphstudios mphstudios deleted the feature/cli-ux-improvements branch January 23, 2026 22:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants