Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/withfig/autocomplete-tools
Command line tools for working with Fig autocomplete specs
https://github.com/withfig/autocomplete-tools
autocomplete cicd cli eslint fig hacktoberfest helpers tools
Last synced: about 9 hours ago
JSON representation
Command line tools for working with Fig autocomplete specs
- Host: GitHub
- URL: https://github.com/withfig/autocomplete-tools
- Owner: withfig
- License: mit
- Created: 2021-09-09T22:33:25.000Z (over 3 years ago)
- Default Branch: main
- Last Pushed: 2024-12-09T20:23:23.000Z (13 days ago)
- Last Synced: 2024-12-15T12:04:46.655Z (7 days ago)
- Topics: autocomplete, cicd, cli, eslint, fig, hacktoberfest, helpers, tools
- Language: TypeScript
- Homepage:
- Size: 5.46 MB
- Stars: 46
- Watchers: 5
- Forks: 30
- Open Issues: 31
-
Metadata Files:
- Readme: README.md
- Contributing: CONTRIBUTING.md
- License: LICENSE
Awesome Lists containing this project
README
# Fig Autocomplete-Tooling Repo
This repo contains the source for all of Fig tools related with [autocomplete](https://github.com/withfig/autocomplete).
1. You can see the list of Fig's packages on the NPM registry here: https://www.npmjs.com/~withfig
2. You can see the source code and related README for each package in the `./packages` folder
## Packages
- [`create-completion-spec`](cli/create-completion-spec/README.md)
- [`@fig/publish-spec`](cli/publih-spec-to-team/README.md)
- [`@withfig/autocomplete-tools`](cli/tools-cli/README.md)
- [`@fig/eslint-config-autocomplete`](eslint/config-autocomplete/README.md)
- [`@withfig/eslint-plugin-fig-linter`](eslint/plugin-fig-linter/README.md)
- [`@fig/autocomplete-generators`](generators/README.md)
- [`@fig/autocomplete-hooks`](hooks/README.md)
- [`@fig/autocomplete-helpers`](helpers/README.md)
- [`argparse_complete_fig`](integrations/argparse/README.md)
- [`cement_complete_fig`](integrations/cement/README.md)
- [`clap_complete_fig`](integrations/clap/README.md)
- [`click_complete_fig`](integrations/click/README.md)
- [`cobracompletefig`](integrations/cobra/README.md)
- [`@fig/complete-commander`](integrations/commander/README.md)
- [`@fig/complete-oclif`](integrations/oclif/README.md)
- [`swift-argument-parser`](integrations/swift-argument-parser/README.md)
- [`@fig/autocomplete-merge`](merge/README.md)
- [`@fig/autocomplete-shared`](shared/README.md)
- [`@withfig/autocomplete-types`](types/README.md)## To publish a package:
1) Update the `package.json` `version` propery
2) Commit the updated `package.json` file to the origin repo
3) Git tag the commit you have just made using the following format and push the tag to the origin repo
- The git tag should be: `@`
- Example: `git tag @fig/[email protected]`4) Run `pnpm publish ./`
> **IMPORTANT**: remember to tag the new package version following the current conventions (see the previous tags of a package)
> this is important for some workflows we are running and to keep track of when releases were done.> **IMPORTANT**: all packages need to be git tagged, not only npm ones!
e.g.
```bash
pnpm publish ./types
```> Note: `` is not the name of the folder, but the name specified inside the package.json of the package to publish.
## Conventions for new CLI integration
### Package (integration) name
- If namespaced it SHOULD be `@fig/complete[-_]($FRAMEWORK_NAME)`
- If not namespaced it SHOULD be `($FRAMEWORK_NAME)[-_]complete[-_]fig`According to language conventions you can use a dash or an underscore to separate the words.
Examples:
- `@fig/complete-commander`
- `@fig/complete-oclif`
- `clap_complete_fig`
- `cobracompletefig`### Name of the default subcommand added to the CLI
Most of our CLI integration tools allow to set the name of the subcommand added to the CLI but we also provide a default value for that.
That default name MUST be `generate-fig-spec` such that running `$CLI generate-fig-spec` prints the spec.### Function that adds the command
The functions exported from the integration can:
- Create a new framework subcommand which will print the spec when invoked
- Generate a spec and return itIn all the cases the names are standardized and SHOULD be:
- `addCompletionSpecCommand` or `createCompletionSpecCommand` for functions creating a new subcommand
- `generateCompletionSpec` for functions that return the spec as a stringAccording to language conventions these function names can be transformed to snake case, etc...
If the CLI tool integration gets added directly to the module of the CLI tool itself and the CLI tool is configured using chained methods (e.g. yargs), then the chain method name SHOULD be:
- `.figCompletion()`### Docs on `public-site-nextjs`
Docs MUST conform to the rules listed above too.