CLI Commands Reference for sintesi-monorepo-root
This document provides a comprehensive reference for all available CLI commands in the sintesi-monorepo-root project. The commands are designed to facilitate various tasks within the monorepo, enhancing development efficiency and project management.
Available Commands
1. check
The check command verifies that documentation is in sync with code by detecting drift.
Usage
sintesi checkDescription
- Performs a smart check to validate that the README and documentation are in sync with the codebase.
- Saves context for other commands to consume if drift is detected.
Options
--verbose: Provides detailed output of the checks performed.--base <branch>: Specifies the base branch for comparison (default ismain).--readme: Checks only for README drift.--documentation: Checks only for documentation drift.--strict: Exit with error code if drift detected (default: true).--output <path>: Specifies the output file path for README check (default isREADME.md).--output-dir <path>: Specifies the output directory for documentation check (default isdocs).
Usage Examples
sintesi check -- --verbose --base main
sintesi check -- --readme --no-strict --verbose
sintesi check -- --documentation --no-strict --verbose2. readme
The readme command generates or updates the README file for the project.
Usage
sintesi readmeDescription
- Creates or updates the README file based on the current project context.
- Integrates recent code changes and suggestions from previous checks.
- Skips generation if no relevant code changes are detected, unless forced.
- Diff-reset behavior: Using
--forceor if the output file is missing will bypass checks and always regenerate the README.
Options
--output <path>: Specifies the output path for the README file (default isREADME.md).--force: Forces a regeneration of README, bypassing existing checks.--verbose: Provides detailed output during the generation process.
Usage Examples
sintesi readme -- --output README.md --force3. changeset
The changeset command generates changesets from code changes using AI.
Usage
sintesi changesetDescription
- Analyzes git diff to find changed files.
- Uses AI to determine version type (major/minor/patch) and description.
- Generates a changeset file in the
.changesetdirectory. - Pre-flight Check: Verifies if
@changesets/cliis installed before proceeding. - Changeset generation priority:
- Manual flags (
--version-type,--description) override AI. --skip-aidisables AI entirely, falling back to default bump (patch) and generic description.- Default (no manual flags, AI enabled): AI determines version bump and description.
--interactiveenforces interactive package selection regardless of detection.
- Manual flags (
Options
--base-branch <branch>: Specifies the base branch for comparison (default ismain).--staged-only: Analyzes only staged changes.--package-name <name>: Package name for the changeset (auto-detected from package.json if not specified).--output-dir <path>: Specifies the output directory for the changeset file (default is.changeset).--skip-ai: Disables AI usage for version type and description.--version-type <type>: Manually specify version type (major,minor,patch).--description <text>: Manually specify description.--interactive: Enables interactive package selection.--verbose: Provides detailed output during the changeset generation process.--force-fetch: Fetches from the specified base branch when true.
Error Handling
- If
@changesets/cliis not installed, the command will fail with an error message indicating the need to install it.
Usage Examples
sintesi changeset -- --base-branch main --staged-only
sintesi changeset -- --skip-ai --version-type minor --description "New feature"4. documentation
The documentation command automates the generation of project documentation based on the current codebase.
Usage
sintesi documentationDescription
- Analyzes the project structure and generates documentation files.
- Skips generation if no relevant code changes are detected.
- Diff-reset behavior: Using
--forceor if the output directory is missing will bypass checks and always regenerate the documentation. - Note: If the
repositoryfield is missing inpackage.json, the command will automatically detect and populate the repository URL from the git configuration.
Options
--output-dir <path>: Specifies the output directory for the generated documentation (default isdocs).--verbose: Provides detailed output during the documentation process.--force: Forces a regeneration of documentation, bypassing existing checks.
Usage Examples
sintesi documentation -- --output-dir docs --verbose --forceConclusion
These CLI commands are integral to the development workflow of the sintesi-monorepo-root project. By utilizing these commands, developers can streamline their processes, maintain project integrity, and enhance productivity. For further assistance or to report issues, please refer to the project's documentation or contact the development team.