Skip to content

cli: add 'komposer check' for scripts and CI - #7

Merged
casablanque-code merged 1 commit into
mainfrom
sprint/check-cli
Oct 15, 2026
Merged

casablanque-code merged 1 commit into
mainfrom
sprint/check-cli

Conversation

@casablanque-code

@casablanque-code casablanque-code commented Oct 15, 2026 •

Copy link
Copy Markdown
Owner

komposer check [flags] [file] runs the editor's three validation layers without starting the TUI:

Errors komposer's own semantic checks
Warnings security / reliability advisories
Compose specification the official JSON schema

  • file defaults to the first of compose.yaml, compose.yml, docker-compose.yaml, docker-compose.yml (Docker Compose's own order)
  • --strict makes warnings fail the run
  • --format json emits a stable machine-readable report (empty lists are [], never null)
  • exit codes: 0 ok, 1 problems found, 2 bad arguments / unreadable file
  • flags may come before or after the file name
  • text output is colored through lipgloss only on a color-capable terminal (NO_COLOR honored); piped output is plain

Also adds 'komposer --help' / 'help' and documents the command in the README. The logic lives in internal/check so it is testable without the TUI; main.go only dispatches and supplies the styler.

What changed

How to test

Checklist

  • make lint / npm run lint passes
  • make test / npm test passes
  • Documentation updated (if needed)
  • Commits follow Conventional Commits

komposer check [flags] [file] runs the editor's three validation layers
without starting the TUI:

  Errors      komposer's own semantic checks
  Warnings    security / reliability advisories
  Compose specification   the official JSON schema

- file defaults to the first of compose.yaml, compose.yml,
  docker-compose.yaml, docker-compose.yml (Docker Compose's own order)
- --strict makes warnings fail the run
- --format json emits a stable machine-readable report (empty lists are
  [], never null)
- exit codes: 0 ok, 1 problems found, 2 bad arguments / unreadable file
- flags may come before or after the file name
- text output is colored through lipgloss only on a color-capable
  terminal (NO_COLOR honored); piped output is plain

Also adds 'komposer --help' / 'help' and documents the command in the
README. The logic lives in internal/check so it is testable without the
TUI; main.go only dispatches and supplies the styler.
@casablanque-code
casablanque-code merged commit 8ea8c0d into main Oct 15, 2026
4 checks passed
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.

1 participant