diff --git a/.ai/instructions.md b/.ai/instructions.md index 499e9b54..71fcd03b 100644 --- a/.ai/instructions.md +++ b/.ai/instructions.md @@ -19,6 +19,9 @@ pnpm lint:fix # ESLint with --fix --quiet # Format pnpm format # Prettier write on src/**/*.{js,ts} +# README +pnpm readme # after pnpm build; needs colour on (FORCE_COLOR=1 without a TTY, NO_COLOR unset) and COLUMNS unset + # Test (all) pnpm test # tsx + mocha, runs test/**/*.test.ts diff --git a/.gitattributes b/.gitattributes new file mode 100644 index 00000000..343dddb2 --- /dev/null +++ b/.gitattributes @@ -0,0 +1,2 @@ +# oclif readme finds its blocks only in an LF file; in a CRLF one it adds a second copy of each. +/README.md text eol=lf diff --git a/README.md b/README.md index 063fd949..511ab4d3 100644 --- a/README.md +++ b/README.md @@ -1,495 +1,491 @@ -@apimatic/cli -============= - -The official CLI for APIMatic. - -[![oclif](https://img.shields.io/badge/cli-oclif-brightgreen.svg)](https://oclif.io) -[![Version](https://img.shields.io/npm/v/@apimatic/cli.svg)](https://npmjs.org/package/@apimatic/cli) -[![Downloads/week](https://img.shields.io/npm/dw/@apimatic/cli.svg)](https://npmjs.org/package/@apimatic/cli) -[![License](https://img.shields.io/npm/l/@apimatic/cli.svg)](https://github.com/apimatic/apimatic-cli/blob/master/package.json) - -# Requirements - -Node.js 24 or newer, for every command. npm only warns when your Node is older, so the -install succeeds and the CLI then refuses to run, naming the version it found. - -# Getting Started - -To get started with APIMatic's CLI using a step by step wizard, run the following command: - -```sh-session -$ apimatic quickstart -``` - -# Usage - -```sh-session -$ npm install -g @apimatic/cli -$ apimatic COMMAND -running command... -$ apimatic (--version) -@apimatic/cli/1.3.1 win32-x64 node-v24.19.0 -$ apimatic --help [COMMAND] -USAGE - $ apimatic COMMAND -... -``` - - -# Commands - -* [`apimatic api transform`](#apimatic-api-transform) -* [`apimatic api validate`](#apimatic-api-validate) -* [`apimatic auth login`](#apimatic-auth-login) -* [`apimatic auth logout`](#apimatic-auth-logout) -* [`apimatic auth status`](#apimatic-auth-status) -* [`apimatic autocomplete [SHELL]`](#apimatic-autocomplete-shell) -* [`apimatic help [COMMAND]`](#apimatic-help-command) -* [`apimatic plugin generate`](#apimatic-plugin-generate) -* [`apimatic plugin publish`](#apimatic-plugin-publish) -* [`apimatic portal generate`](#apimatic-portal-generate) -* [`apimatic portal serve`](#apimatic-portal-serve) -* [`apimatic publishing profile list`](#apimatic-publishing-profile-list) -* [`apimatic quickstart`](#apimatic-quickstart) -* [`apimatic sdk generate`](#apimatic-sdk-generate) -* [`apimatic sdk publish`](#apimatic-sdk-publish) - -## `apimatic api transform` - -Transform API specifications between different formats - -``` -USAGE - $ apimatic api transform --format - apimatic|wadl2009|wsdl|swagger10|swagger20|swaggeryaml|oas3|openapi3yaml|apiblueprint|raml|raml10|postman10|postman2 - 0|graphqlschema [--file ] [--url ] [-d ] [-f] [-k ] - -FLAGS - -d, --destination= [default: ./] Directory to save the transformed file to - -f, --force overwrite changes without asking for user consent. - -k, --auth-key= override current authentication state with an authentication key. - --file= Path to the API specification file to transform - --format=