Skip to content

--help leaves out .mts configs, DESIGN.md and inspect --format json #222

Closed

Description

@dgesteves

What happens

onsystem --help is behind the code in three places:

  • --config lists onsystem.config.{json,ts,mjs,js}, but onsystem.config.mts is read too.
  • --tokens says "DTCG .json or CSS", but a DESIGN.md is a token file too.
  • --format lists values for check and export only. inspect --format json works and is tested, but isn't listed, and inspect --format xml (or a typo) exits 0 with the text output, where check and export exit 2 on an unknown format.

Where

  • src/cli.ts:79, src/cli.ts:83 and src/cli.ts:87-88: the help lines
  • src/config.ts:294-300: CONFIG_FILES, which includes onsystem.config.mts
  • src/tokens/index.ts:69: .md token files
  • src/cli.ts:1107-1122: inspect, which only checks for json (and inspectWorkspace at :1263 the same)
  • src/cli.ts:357-361: how check rejects an unknown format
  • test/cli.test.ts:115-121 and :479-483: the usage-error and help tests

Done when

  • The help names .mts in the --config default, DESIGN.md in --tokens, and inspect: pretty | json under --format
  • inspect --format xml exits 2 with one line in the style of check's, at a monorepo root too
  • A test checks that --help names every extension in CONFIG_FILES, and the usage-error test covers inspect --format xml
  • pnpm test, pnpm lint and pnpm typecheck pass; a patch changeset

Hint

Check the format at the top of inspect() (src/cli.ts:1107), before loadTarget, so it covers the monorepo path too. CONFIG_FILES is exported from src/config.ts. #202 (in review) changes inspect's output a few lines further down: if it merges first, rebase onto it.

Out of scope

docs/configuration.md, which #202 also changes.

Status: ready for a contributor. Comment before you start.

Activity

  1. added
    documentationImprovements or additions to documentation
    area: cliThe onsystem CLI: check, inspect, init, export
    roadmapOn the public roadmap (ROADMAP.md)
    on Oct 22, 2026
  2. added a commit that references this issue on Oct 30, 2026
    452e5c0
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    area: cliThe onsystem CLI: check, inspect, init, exportdocumentationImprovements or additions to documentationgood first issueGood for newcomersroadmapOn the public roadmap (ROADMAP.md)

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions