Commits
* add benchmarks
* add benchmarks to ci
* using process.execPath
* important update
* lint
* boolean opts
* noop func
* signitures
* boolean flags
* prettier
* update
* init
* update
* new implementation
* prettier
* feat: autocomplete clis executing through a package manager (#26)
* init
* prettier
* update
* cli completions
* pnpm install
* fix: handle complete command manually
* fix: completion-handler __complete => complete
* fix: remove examples form package.json
* fix: generateCompletionScript function
* move the package manager completion logic directly into the parse method
* prettier
* tab -> t wip
* before some ai changes
* huge wip
* grammar issues
* prettier
---------
Co-authored-by: Mohammad Bagher Abiyat <37929992+Aslemammad@users.noreply.github.com>
* fix espace args
* update
* prettier
* update
* prettier
* throw error
* update
* feat: add fish.ts & bash.ts
* fix: format
* cleanup: remove unused type definition
* apply suggestions from @43081j review
* fix: format
* moar cleanup
* fix: add missing serve command to demo.cac.ts to correct CLI test snapshots
* fix: add serve command and use snapshot testing for shells
- Add missing serve command to demo.cac.ts to correct CLI test snapshots
- Implement suggestion to use toMatchSnapshot() for fish shell tests
- Update snapshots to include proper completions
Adds completion config support and moves some things to the shared
module.
There will be a better way to share logic between these two even more
but it hasn't yet clicked in my head.
* feat: add Commander adapter for CLI commands with tab completion
* chore: clean up whitespace and formatting in commander files
* chore: upgrade eslint config to flat config
Migrates the config to be a flat config file (`eslint.config.js`).
To facilitate this, also updates a couple of packages:
- `typescript-eslint` (and drops the `@typescript-eslint/*` packages)
- prettier
- prettier ESLint config
We also removed `eslint-plugin-prettier` since the `format:check` script
achieves the same, and the ESLint config disables all stylistic rules.
* pnpm install
* demo.citty
* using void operator
---------
Co-authored-by: AmirSa12 <amirhosseinpr184@gmail.com>
Adds the ability to pass a config object to the citty entry point in
order to specify handlers for options/commands.
Defining them inline like this means you no longer have to iterate the
parsed commands/options.
It also means you can safely have options named the same for different
sub-commands, and have separate handlers.
tsup currently (and correctly) warns that our `types` exports come after
our module exports, so are never read.
If we place them first, they will be resolved for both the import and
require, and the warnings will go away.
Co-authored-by: Paul Valladares <85648028+dreyfus92@users.noreply.github.com>
The `type-check` script expectes `tsc` to exist, but we don't actually
install typescript yet as a direct dependency.
This adds typescript as a dev dependency so the type-check script works
again.
CI somehow does discover `tsc` before this change, but local installs do
not.
* feat: add short flag support for CLI options and enhance completion handling
* init
* update
* new implementation
* prettier
* feat: autocomplete clis executing through a package manager (#26)
* init
* prettier
* update
* cli completions
* pnpm install
* fix: handle complete command manually
* fix: completion-handler __complete => complete
* fix: remove examples form package.json
* fix: generateCompletionScript function
* move the package manager completion logic directly into the parse method
* prettier
* tab -> t wip
* before some ai changes
* huge wip
* grammar issues
* prettier
---------
Co-authored-by: Mohammad Bagher Abiyat <37929992+Aslemammad@users.noreply.github.com>
* feat: add fish.ts & bash.ts
* fix: format
* cleanup: remove unused type definition
* apply suggestions from @43081j review
* fix: format
* moar cleanup
* fix: add missing serve command to demo.cac.ts to correct CLI test snapshots
* fix: add serve command and use snapshot testing for shells
- Add missing serve command to demo.cac.ts to correct CLI test snapshots
- Implement suggestion to use toMatchSnapshot() for fish shell tests
- Update snapshots to include proper completions
* chore: upgrade eslint config to flat config
Migrates the config to be a flat config file (`eslint.config.js`).
To facilitate this, also updates a couple of packages:
- `typescript-eslint` (and drops the `@typescript-eslint/*` packages)
- prettier
- prettier ESLint config
We also removed `eslint-plugin-prettier` since the `format:check` script
achieves the same, and the ESLint config disables all stylistic rules.
* pnpm install
* demo.citty
* using void operator
---------
Co-authored-by: AmirSa12 <amirhosseinpr184@gmail.com>
Adds the ability to pass a config object to the citty entry point in
order to specify handlers for options/commands.
Defining them inline like this means you no longer have to iterate the
parsed commands/options.
It also means you can safely have options named the same for different
sub-commands, and have separate handlers.