chore(x): improve developer CLI with help, structure, and test filters#32665
Merged
bartlomieju merged 4 commits intodenoland:mainfrom Mar 12, 2026
Merged
chore(x): improve developer CLI with help, structure, and test filters#32665bartlomieju merged 4 commits intodenoland:mainfrom
bartlomieju merged 4 commits intodenoland:mainfrom
Conversation
Add thorough help text to each `./x` subcommand so that running `./x <command> --help` prints a detailed explanation of what the command does, when to use it, and what it runs under the hood. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Move all command definitions, help rendering, and CLI dispatch from the top-level `./x` script into `tools/x/main.ts`. The entrypoint is now a thin wrapper that passes `import.meta.dirname` to `main()`. Also consolidate the two-object pattern (separate functions + registry) into a single `buildCommands()` function, and replace manual ANSI escape codes with `@std/fmt/colors`. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Test commands (test-unit, test-node, test-compat, test-spec) now require a filter argument to select which tests to run, and support --list to print all available tests. This makes the commands more explicit and discoverable. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
dsherret
reviewed
Mar 12, 2026
Member
There was a problem hiding this comment.
Maybe it would be good to name this file tools/x.ts and just have it run the main? The ./x file is not very good for windows and this might be a good backup. Also instructing AI agents to use tools/x.ts would be better so they don't try ./x on Windows.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
--help/-hwith thorough descriptions (useful for LLMs and AI agents)./xintotools/x/main.tsfor maintainability@std/fmt/colorsbuildCommands()test-unit,test-node,test-compat,test-spec) now require a filter argument and support--listto discover available tests