Research
Security News
Malicious npm Packages Inject SSH Backdoors via Typosquatted Libraries
Socket’s threat research team has detected six malicious npm packages typosquatting popular libraries to insert SSH backdoors.
@apimatic/cli
Advanced tools
The official CLI for APIMatic.
$ npm install -g @apimatic/cli@1.0.1-alpha.3
$ apimatic COMMAND
running command...
$ apimatic (-v|--version|version)
@apimatic/cli/0.0.0-alpha.3 linux-x64 node-v16.13.0
$ apimatic --help [COMMAND]
USAGE
$ apimatic COMMAND
...
apimatic api:transform
apimatic api:validate
apimatic auth:login
apimatic auth:logout
apimatic auth:status
apimatic autocomplete [SHELL]
apimatic help [COMMAND]
apimatic portal:generate
apimatic sdk:generate
apimatic api:transform
Transform API specifications from one format to another. Supports 10+ different formats including OpenApi/Swagger, RAML, WSDL and Postman Collections.
USAGE
$ apimatic api:transform
OPTIONS
-f, --force overwrite if same file exist in the destination
--auth-key=auth-key override current authentication state with an authentication key
--destination=destination [default: /home/runner/work/apimatic-cli/apimatic-cli/cli] directory to download
transformed file to
--file=file path to the API specification file to transform
--format=format (required) specification format to transform API specification into
APIMATIC|WADL2009|WSDL|SWAGGER10|SWAGGER20|SWAGGERYAML|OAS3|OPENAPI3YAML|APIBLUEPRINT|RAML|
RAML10|POSTMAN10|POSTMAN20|GRAPHQLSCHEMA
--url=url URL to the API specification file to transform. Can be used in place of the --file option
if the API specification is publicly available.
EXAMPLES
$ apimatic api:transform --format="OpenApi3Json" --file="./specs/sample.json" --destination="D:/"
Success! Your transformed file is located at D:/Transformed_OpenApi3Json.json
$ apimatic api:transform --format=RAML --url="https://petstore.swagger.io/v2/swagger.json" --destination="D:/"
Success! Your transformed file is located at D:/swagger_raml.yaml
See code: src/commands/api/transform.ts
apimatic api:validate
Validate the syntactic and semantic correctness of an API specification
USAGE
$ apimatic api:validate
OPTIONS
--auth-key=auth-key override current authentication state with an authentication key
--file=file Path to the API specification file to validate
--url=url URL to the specification file to validate. Can be used in place of the --file option if the API
specification is publicly available.
EXAMPLES
$ apimatic api:validate --file="./specs/sample.json"
Specification file provided is valid
$ apimatic api:validate --url=https://petstore.swagger.io/v2/swagger.json
Specification file provided is valid
See code: src/commands/api/validate.ts
apimatic auth:login
Login using your APIMatic credentials or an API Key
USAGE
$ apimatic auth:login
OPTIONS
--auth-key=auth-key Set authentication key for all commands
EXAMPLES
$ apimatic auth:login
Please enter your registered email: apimatic-user@gmail.com
Please enter your password: *********
You have successfully logged into APIMatic
$ apimatic auth:login --auth-key=xxxxxx
Authentication key successfully set
See code: src/commands/auth/login.ts
apimatic auth:logout
Clear local login credentials
USAGE
$ apimatic auth:logout
EXAMPLE
$ apimatic auth:logout
Logged out
See code: src/commands/auth/logout.ts
apimatic auth:status
View current authentication state
USAGE
$ apimatic auth:status
EXAMPLE
$ apimatic auth:status
Currently logged in as apimatic-client@gmail.com
See code: src/commands/auth/status.ts
apimatic autocomplete [SHELL]
display autocomplete installation instructions
USAGE
$ apimatic autocomplete [SHELL]
ARGUMENTS
SHELL shell type
OPTIONS
-r, --refresh-cache Refresh cache (ignores displaying instructions)
EXAMPLES
$ apimatic autocomplete
$ apimatic autocomplete bash
$ apimatic autocomplete zsh
$ apimatic autocomplete --refresh-cache
See code: @oclif/plugin-autocomplete
apimatic help [COMMAND]
display help for apimatic
USAGE
$ apimatic help [COMMAND]
ARGUMENTS
COMMAND command to show help for
OPTIONS
--all see all commands in CLI
See code: @oclif/plugin-help
apimatic portal:generate
Generate and download a static API Documentation portal. Requires an input directory containing API specifications, a config file and optionally, markdown guides. For details, refer to the documentation
USAGE
$ apimatic portal:generate
OPTIONS
-f, --force overwrite if a portal exists in the destination
--auth-key=auth-key override current authentication state with an authentication key
--destination=destination [default: /home/runner/work/apimatic-cli/apimatic-cli/cli] path to the downloaded portal
--folder=folder [default: ./] path to the input directory containing API specifications and config files
--zip download the generated portal as a .zip archive
EXAMPLE
$ apimatic portal:generate --folder="./portal/" --destination="D:/"
Your portal has been generated at D:/
See code: src/commands/portal/generate.ts
apimatic sdk:generate
Generate SDK for your APIs
USAGE
$ apimatic sdk:generate
OPTIONS
-f, --force overwrite if an SDK already exists in the destination
--auth-key=auth-key override current authentication state with an authentication key
--destination=destination [default: /home/runner/work/apimatic-cli/apimatic-cli/cli] directory to download the
generated SDK to
--file=file path to the API specification to generate SDKs for
--platform=platform (required) language platform for sdk
Simple: CSHARP|JAVA|PYTHON|RUBY|PHP|TYPESCRIPT
Legacy: CS_NET_STANDARD_LIB|CS_PORTABLE_NET_LIB|CS_UNIVERSAL_WINDOWS_PLATFORM_LIB|
JAVA_ECLIPSE_JRE_LIB|PHP_GENERIC_LIB|PYTHON_GENERIC_LIB|RUBY_GENERIC_LIB|
TS_GENERIC_LIB
--url=url URL to the API specification to generate SDKs for. Can be used in place of the --file
option if the API specification is publicly available.
--zip download the generated SDK as a .zip archive
EXAMPLES
$ apimatic sdk:generate --platform="CSHARP" --file="./specs/sample.json"
Generating SDK... done
Downloading SDK... done
Success! Your SDK is located at swagger_sdk_csharp
$ apimatic sdk:generate --platform="CSHARP" --url=https://petstore.swagger.io/v2/swagger.json
Generating SDK... done
Downloading SDK... done
Success! Your SDK is located at swagger_sdk_csharp
See code: src/commands/sdk/generate.ts
FAQs
The official CLI for APIMatic.
The npm package @apimatic/cli receives a total of 15 weekly downloads. As such, @apimatic/cli popularity was classified as not popular.
We found that @apimatic/cli demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 4 open source maintainers collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Research
Security News
Socket’s threat research team has detected six malicious npm packages typosquatting popular libraries to insert SSH backdoors.
Security News
MITRE's 2024 CWE Top 25 highlights critical software vulnerabilities like XSS, SQL Injection, and CSRF, reflecting shifts due to a refined ranking methodology.
Security News
In this segment of the Risky Business podcast, Feross Aboukhadijeh and Patrick Gray discuss the challenges of tracking malware discovered in open source softare.