Skip to content

dx: add --verbose/--debug CLI flags and config validation command #141

@rohilsurana

Description

@rohilsurana

Problem

Several developer experience gaps in the CLI:

  1. No `--verbose`/`--debug` flags — when builds fail or config is wrong, there's no way to get detailed output. Config parse errors are silently swallowed by `loadConfig()`.
  2. No `chronicle validate` command — no way to check config validity without starting the server. Useful in CI pipelines.
  3. CLI version hardcoded to `'0.1.0'` in `src/cli/index.ts` — should be read from `package.json`.
  4. Dev server doesn't check port conflicts — starts without warning if the port is already in use.
  5. Build doesn't report bundle size — no output size summary or warnings for large bundles.

Suggested Fix

  • Add `--verbose` global flag that enables debug logging throughout the config loader, build, and dev server
  • Add a `chronicle validate` command that parses config, checks content dirs exist, validates API spec files are readable, and reports issues
  • Read version from `package.json` at build time
  • Check port availability before starting dev server, suggest next available port

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions