Skip to content

Add 'start' command that builds, watches, and serves the site#360

Merged
jaredwray merged 7 commits intomainfrom
claude/docula-build-serve-SiuXW
Mar 15, 2026
Merged

Add 'start' command that builds, watches, and serves the site#360
jaredwray merged 7 commits intomainfrom
claude/docula-build-serve-SiuXW

Conversation

@jaredwray
Copy link
Owner

The start command combines build + watch + serve into a single command,
making it easy to start a development session with docula start.

https://claude.ai/code/session_01KawTM1nkP1JXqFzUo1Qt4f

@gemini-code-assist
Copy link

Summary of Changes

Hello, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed!

This pull request significantly enhances the developer experience by introducing a new start command to the Docula CLI. This command simplifies the local development workflow by consolidating the build, watch, and serve operations into a single, convenient entry point. This change aims to reduce setup complexity and accelerate iteration cycles for users working on Docula projects.

Highlights

  • New 'start' command introduced: A new CLI command docula start has been added, which streamlines the development workflow by combining the build, watch, and serve functionalities into a single command.
  • Comprehensive documentation: The site/docs/cli.md file has been updated to include detailed documentation for the new start command, covering its purpose, usage, available flags (port, site, output, clean), and practical examples.
  • CLI integration and parsing: The src/console.ts file has been modified to register the start command in the help output and integrate it into the command-line argument parsing logic.
  • Core 'start' command logic: The src/docula.ts file now contains the implementation for the start command, orchestrating the build process, initiating file watching, and starting the local development server.
  • Robust test coverage: New test cases have been added in test/docula.test.ts to ensure the start command functions correctly, including scenarios for building, watching, serving, using the --clean flag, and specifying custom ports.
Changelog
  • site/docs/cli.md
    • Added "start" command to the CLI commands table.
    • Introduced a new section detailing the "start" command, its flags, and usage examples.
    • Updated existing examples to utilize the new "start" command for quick setup.
  • src/console.ts
    • Included the "start" command in the DoculaConsole help output.
    • Added specific arguments and their descriptions for the "start" command to the help message.
    • Integrated "start" into the command parsing logic.
  • src/docula.ts
    • Implemented the start command case within the execute method.
    • Added logic to handle the --clean flag for the start command, including cache cleaning.
    • Orchestrated the build, watch, and serve operations for the start command.
  • test/console.test.ts
    • Adjusted the expected number of help messages due to the addition of the "start" command.
    • Updated the command parsing test to include the "start" command.
  • test/docula.test.ts
    • Added a new describe block for "docula start" tests.
    • Implemented tests to verify the start command builds, watches, and serves the site.
    • Included a test case for the --clean flag functionality with the start command.
    • Added a test to confirm custom port functionality for the start command.
  • test/fixtures/changelog-site/.gitignore
    • Added .cache to the gitignore file.
  • test/fixtures/mega-page-site/.gitignore
    • Added .cache to the gitignore file.
Activity
  • No human activity (comments, reviews, etc.) has occurred on this pull request yet.
Using Gemini Code Assist

The full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips.

Invoking Gemini

You can request assistance from Gemini at any point by creating a comment using either /gemini <command> or @gemini-code-assist <command>. Below is a summary of the supported commands on the current page.

Feature Command Description
Code Review /gemini review Performs a code review for the current pull request in its current state.
Pull Request Summary /gemini summary Provides a summary of the current pull request in its current state.
Comment @gemini-code-assist Responds in comments when explicitly tagged, both in pull request comments and review comments.
Help /gemini help Displays a list of available commands.

Customization

To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a .gemini/ folder in the base of the repository. Detailed instructions can be found here.

Limitations & Feedback

Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for GitHub and other Google products, sign up here.

You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension.

Footnotes

  1. Review the Privacy Notices, Generative AI Prohibited Use Policy, Terms of Service, and learn how to configure Gemini Code Assist in GitHub here. Gemini can make mistakes, so double check it and use code with caution.

Copy link

@gemini-code-assist gemini-code-assist bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request introduces a convenient start command that combines building, watching, and serving the site, which simplifies the development workflow. The implementation is correct and well-tested. My review focuses on improving maintainability by addressing code duplication that was introduced. Specifically, I've suggested refactoring the command execution logic in docula.ts and the help message generation in console.ts to reduce repetition and make the code easier to manage in the future.

Copy link

@chatgpt-codex-connector chatgpt-codex-connector bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 77f9b0f6f3

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment on lines +195 to +196
case "start": {
return "start";

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Parse command only from positional CLI argument

getCommand iterates across every argv token, so adding the new "start" branch makes option values accidentally select the command; for example, docula --site start now resolves to the start workflow (build+watch+serve) instead of the default build path. This is a regression introduced by this change and affects any invocation where a flag value is literally start, so command detection should be limited to the positional command token rather than all arguments.

Useful? React with 👍 / 👎.

@codecov
Copy link

codecov bot commented Mar 14, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 99.94%. Comparing base (cb0eb80) to head (acc7087).
⚠️ Report is 8 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##             main     #360   +/-   ##
=======================================
  Coverage   99.94%   99.94%           
=======================================
  Files           7        7           
  Lines        1796     1805    +9     
  Branches      524      527    +3     
=======================================
+ Hits         1795     1804    +9     
  Misses          1        1           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@jaredwray jaredwray merged commit 3730aaa into main Mar 15, 2026
7 checks passed
@jaredwray jaredwray deleted the claude/docula-build-serve-SiuXW branch March 15, 2026 01:37
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