Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
85 commits
Select commit Hold shift + click to select a range
db884cb
fix: remove simple-git dependency (#150)
aliasghar98 Aug 11, 2025
41a9298
Merge branch 'alpha' into dev
saeedjamshaid Aug 11, 2025
c25717b
feat: Added openfile method in file-service (#145)
sohail2721 Aug 12, 2025
98f0c46
fix: missing import for os and update node versions in gh action (#158)
aliasghar98 Aug 12, 2025
75232ea
fix: run build action on pull requests to dev branch (#159)
aliasghar98 Aug 12, 2025
f9f5534
feat: update copilot messages (#154)
Shield-Jaguar Aug 12, 2025
6d77cba
feat: refactor prompting service
Shield-Jaguar Aug 15, 2025
e0a5aaa
feat: update action result
Shield-Jaguar Aug 18, 2025
b415333
feat: fix calls
Shield-Jaguar Aug 18, 2025
302769e
refactor: update prompts
Shield-Jaguar Aug 19, 2025
9d92f58
feat: update text
Shield-Jaguar Aug 21, 2025
3de01b4
feat: refactor
Shield-Jaguar Aug 21, 2025
4bd8443
Merge branch 'dev' into Shield-Jaguar/refactor-prompt-framework
saeedjamshaid Aug 21, 2025
2fc3ab7
Merge branch 'dev' into Shield-Jaguar/refactor-prompt-framework
Shield-Jaguar Aug 22, 2025
9de5e7e
feat: made code compileable
Shield-Jaguar Aug 22, 2025
165c645
feat: integrated new prompt framework in quickstart and serve commands
aliasghar98 Aug 25, 2025
f73e38b
refactor: removed usage of var
aliasghar98 Aug 25, 2025
03c0e41
feat: implement prompt framework validate/transform (#183)
sohail2721 Aug 26, 2025
cb34103
wip: removed serve handler and incoporated some feedback for serve co…
aliasghar98 Aug 26, 2025
5d50c86
sonarqube
sohail2721 Aug 26, 2025
e98925f
Merge branch 'Shield-Jaguar/refactor-prompt-framework' of github.com:…
sohail2721 Aug 26, 2025
61d2fd1
refactor: incorporated first feedback in quickstart
aliasghar98 Aug 26, 2025
69f2476
refactor: moved constants back within class in portal scaffold service
aliasghar98 Aug 26, 2025
709a130
Merge branch 'Shield-Jaguar/refactor-prompt-framework' into aliasghar…
aliasghar98 Aug 26, 2025
5d1e261
refactor
Shield-Jaguar Aug 26, 2025
07d2605
feat: add prompt and refactor in auth (#186)
Shield-Jaguar Aug 26, 2025
37b5e0c
refactor: work in progress
Shield-Jaguar Aug 26, 2025
cbe1aef
feat: update serve prompting
Shield-Jaguar Aug 27, 2025
5639864
fix: portal serve command not closing properly and incorrect handling…
aliasghar98 Aug 27, 2025
aa01e97
chore: removed unintended changes in launch.json
aliasghar98 Aug 28, 2025
36dc9c2
chore: removed unintended comma in launch.json
aliasghar98 Aug 28, 2025
376512a
refactor: SDK generate (#185)
sohail2721 Aug 28, 2025
6d718e2
fix: removed changes in generate prompts
aliasghar98 Aug 28, 2025
4fc0e6d
fix: removed all changes from portal generate
aliasghar98 Aug 28, 2025
e82b990
fix: resolved serve issues with quickstart
aliasghar98 Aug 28, 2025
018d539
refactor: deleted empty service file and added two new services for s…
aliasghar98 Aug 28, 2025
ef974d9
refactor: created file watcher service, integration pending
aliasghar98 Aug 28, 2025
63c6713
refactor: integrated file-watcher-service in serve action
aliasghar98 Aug 29, 2025
c8de5ed
wip: refactor serve action into infra services
aliasghar98 Aug 29, 2025
216e545
feat: update before refactoring
Shield-Jaguar Aug 29, 2025
35cf3aa
feat: update cleanup
Shield-Jaguar Aug 29, 2025
c3a87e6
feat: update code
Shield-Jaguar Aug 29, 2025
fe55b96
Merge branch 'Shield-Jaguar/refactor-prompt-framework' into aliasghar…
aliasghar98 Sep 1, 2025
e989085
refactor: removed unused code
aliasghar98 Sep 1, 2025
a49310f
refactor
Shield-Jaguar Sep 1, 2025
fc0f22d
chore: added copilot-instructions to git ignore
aliasghar98 Sep 1, 2025
c2d07c4
fix: improved some areas and fixed serve integration with quickstart
aliasghar98 Sep 1, 2025
908cf69
refactor
Shield-Jaguar Sep 1, 2025
db9aa63
fix: improved code and resolved blocking issue in quickstart
aliasghar98 Sep 1, 2025
0bef14e
fix: fixed minor issues and compelted refactoring
aliasghar98 Sep 2, 2025
3dc044e
refactor: improved callback function name in serve
aliasghar98 Sep 2, 2025
05b304a
refactor: removed extra indentation
aliasghar98 Sep 2, 2025
982bd16
refactor portal serve
Shield-Jaguar Sep 2, 2025
6dad268
refactor: removed directory node and used directory instead
aliasghar98 Sep 2, 2025
23feb86
refactor: removed infra dependencies from quickstart prompts
aliasghar98 Sep 2, 2025
7ab40ba
refactor: removed usage of path and used resource input instead
aliasghar98 Sep 2, 2025
e94ecfa
refactor: removed redundant todo and comment
aliasghar98 Sep 2, 2025
8f92c22
feat: remove tree
Shield-Jaguar Sep 2, 2025
6538e38
refactor: moved all infra services from quickstart prompts to action …
aliasghar98 Sep 2, 2025
cc17b1b
fix: removed redundant loop
aliasghar98 Sep 2, 2025
57e9bf9
stash
Shield-Jaguar Sep 3, 2025
72241c3
feat: prompt framework for toc and recipe (#187)
sohail2721 Sep 3, 2025
4801fc0
refactor quickstart
Shield-Jaguar Sep 3, 2025
0b9f759
Merge branch 'Shield-Jaguar/refactor-prompt-framework' into aliasghar…
Shield-Jaguar Sep 3, 2025
2a117f4
feat: fix merge conflicts
Shield-Jaguar Sep 3, 2025
46be11f
feat: refactor
Shield-Jaguar Sep 3, 2025
0901540
feat: refactor to final version
Shield-Jaguar Sep 4, 2025
25657c0
feat: fix typo and unused
Shield-Jaguar Sep 4, 2025
45d01e9
resolved bug where recipe.js was not being saved correctly
sohail2721 Sep 4, 2025
8e0a7f0
session 1
Shield-Jaguar Sep 4, 2025
088a73a
toc bug fixes
sohail2721 Sep 4, 2025
2710aea
Merge branch 'aliasghar98/integrate-prompts-framework-in-quickstart-a…
sohail2721 Sep 4, 2025
659db58
fix: resolved portal generation problems while serving
aliasghar98 Sep 4, 2025
9f6445c
added extension to recipe file name
sohail2721 Sep 4, 2025
6298952
feat: updated messages
Shield-Jaguar Sep 4, 2025
241f1bb
refactor
Shield-Jaguar Sep 4, 2025
dfdba2c
fix: minor issues found during testing
aliasghar98 Sep 5, 2025
98f3395
fix: resolved security review warnings
aliasghar98 Sep 5, 2025
55d71cd
revert: regex changes
aliasghar98 Sep 5, 2025
68e0766
fix: removed fallback port message from quickstart
aliasghar98 Sep 5, 2025
cbf365c
chore: updated cli version to 1.1.0-alpha.22
aliasghar98 Sep 5, 2025
cd2e709
minor fixes
saeedjamshaid Sep 5, 2025
17478ae
make the format flag in api transform consistent
saeedjamshaid Sep 5, 2025
9320a07
update next step messages in quickstart and recipe command
saeedjamshaid Sep 5, 2025
44348ac
chore: updated readme and added annotations to ignore sonar warnings
aliasghar98 Sep 5, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -179,4 +179,5 @@ tmp/
test-source/
test-destination/
test-portal/
/.idea/
/.idea/
.github/copilot-instructions.md
134 changes: 78 additions & 56 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ $ npm install -g @apimatic/cli
$ apimatic COMMAND
running command...
$ apimatic (--version)
@apimatic/cli/1.1.0-alpha.21 win32-x64 node-v23.4.0
@apimatic/cli/1.1.0-alpha.22 win32-x64 node-v23.4.0
$ apimatic --help [COMMAND]
USAGE
$ apimatic COMMAND
Expand All @@ -51,39 +51,41 @@ USAGE

## `apimatic api transform`

Transform API specifications from one format to another. Supports [10+ different formats](https://www.apimatic.io/transformer/#supported-formats) including OpenApi/Swagger, RAML, WSDL and Postman Collections.
Transform API specifications between different formats.

```
USAGE
$ apimatic api transform --format <value> [--file <value>] [--url <value>] [-d <value>] [-f] [-k <value>]
$ apimatic api transform --format
apimatic|wadl2009|wsdl|swagger10|swagger20|swaggeryaml|oas3|openapi3yaml|apiblueprint|raml|raml10|postman10|postman2
0|graphqlschema [--file <value>] [--url <value>] [-d <value>] [-f] [-k <value>]

FLAGS
-d, --destination=<value> [default: ./] directory to download transformed file to
-d, --destination=<value> [default: ./] directory to save the transformed file to
-f, --force overwrite changes without asking for user consent.
-k, --auth-key=<value> override current authentication state with an authentication key.
--file=<value> path to the API specification file to transform
--format=<value> (required) specification format to transform API specification into
APIMATIC|WADL2009|WSDL|SWAGGER10|SWAGGER20|SWAGGERYAML|OAS3|OPENAPI3YAML|APIBLUEPRINT|RAML|
RAML10|POSTMAN10|POSTMAN20|GRAPHQLSCHEMA
--url=<value> URL to the API specification file to transform. Can be used in place of the --file option
if the API specification is publicly available.
--format=<option> (required) specification format to transform API specification into
<options: apimatic|wadl2009|wsdl|swagger10|swagger20|swaggeryaml|oas3|openapi3yaml|apibluep
rint|raml|raml10|postman10|postman20|graphqlschema>
--url=<value> URL to the API specification file to transform (publicly accessible)

DESCRIPTION
Transform API specifications from one format to another. Supports [10+ different
formats](https://www.apimatic.io/transformer/#supported-formats) including OpenApi/Swagger, RAML, WSDL and Postman
Collections.
Transform API specifications between different formats.

Transform API specifications from one format to another.
Supports multiple formats including OpenAPI/Swagger, RAML, WSDL, and Postman Collections.

EXAMPLES
$ apimatic api transform --format=OPENAPI3YAML --file="./specs/sample.json" --destination="D:/"
apimatic api transform --format=OPENAPI3YAML --file=./specs/sample.json --destination=./

$ apimatic api transform --format=RAML --url="https://petstore.swagger.io/v2/swagger.json" --destination="D:/"
apimatic api transform --format=RAML --url="https://petstore.swagger.io/v2/swagger.json" --destination=./
```

_See code: [src/commands/api/transform.ts](https://github.com/apimatic/apimatic-cli/blob/alpha/src/commands/api/transform.ts)_

## `apimatic api validate`

Validate the syntactic and semantic correctness of an API specification
Validate API specification for syntactic and semantic correctness.

```
USAGE
Expand All @@ -92,23 +94,24 @@ USAGE
FLAGS
-k, --auth-key=<value> override current authentication state with an authentication key.
--file=<value> Path to the API specification file to validate
--url=<value> URL to the specification file to validate. Can be used in place of the --file option if the
API specification is publicly available.
--url=<value> URL to the API specification file to validate (publicly accessible)

DESCRIPTION
Validate the syntactic and semantic correctness of an API specification
Validate API specification for syntactic and semantic correctness.

Validate your API specification to ensure it adheres to syntactic and semantic standards.

EXAMPLES
$ apimatic api validate --file="./specs/sample.json"
apimatic api validate --file=./specs/sample.json

$ apimatic api validate --url=https://petstore.swagger.io/v2/swagger.json
apimatic api validate --url="https://petstore.swagger.io/v2/swagger.json"
```

_See code: [src/commands/api/validate.ts](https://github.com/apimatic/apimatic-cli/blob/alpha/src/commands/api/validate.ts)_

## `apimatic auth login`

Login using your APIMatic credentials or an API Key
Login to your APIMatic account.

```
USAGE
Expand All @@ -118,12 +121,14 @@ FLAGS
-k, --auth-key=<value> Sets authentication key for all commands.

DESCRIPTION
Login to your APIMatic account.

Login using your APIMatic credentials or an API Key

EXAMPLES
$ apimatic auth login
apimatic auth login

$ apimatic auth login --auth-key={api-key}
apimatic auth login --auth-key={api-key}
```

_See code: [src/commands/auth/login.ts](https://github.com/apimatic/apimatic-cli/blob/alpha/src/commands/auth/login.ts)_
Expand All @@ -139,8 +144,10 @@ USAGE
DESCRIPTION
Clears the local login credentials.

Clears the local login credentials. This will also clear any cached credentials from the CLI.

EXAMPLES
$ apimatic auth logout
apimatic auth logout
```

_See code: [src/commands/auth/logout.ts](https://github.com/apimatic/apimatic-cli/blob/alpha/src/commands/auth/logout.ts)_
Expand All @@ -157,7 +164,7 @@ DESCRIPTION
View the currently logged in user.

EXAMPLES
$ apimatic auth status
apimatic auth status
```

_See code: [src/commands/auth/status.ts](https://github.com/apimatic/apimatic-cli/blob/alpha/src/commands/auth/status.ts)_
Expand Down Expand Up @@ -233,19 +240,19 @@ DESCRIPTION

Displays available API Copilots associated with your account and allows you to select which one to integrate with your
portal. Each APIMatic account includes one Copilot by default. The selected Copilot will be added to your
APIMATIC-BUILD.json file
'APIMATIC-BUILD.json' file

EXAMPLES
$ apimatic portal copilot --input="./"
apimatic portal copilot --input=./

$ apimatic portal copilot --input="./" --disable
apimatic portal copilot --input=./ --disable
```

_See code: [src/commands/portal/copilot.ts](https://github.com/apimatic/apimatic-cli/blob/alpha/src/commands/portal/copilot.ts)_

## `apimatic portal generate`

Generate an API Documentation portal. Requires an input directory containing API specifications, a config file and optionally, markdown guides. For details, refer to the [documentation](https://docs.apimatic.io/platform-api/#/http/guides/generating-on-prem-api-portal/build-file-reference)
Generate an API Documentation portal.

```
USAGE
Expand All @@ -260,86 +267,96 @@ FLAGS
--zip download the generated portal as a .zip archive

DESCRIPTION
Generate an API Documentation portal.

Generate an API Documentation portal. Requires an input directory containing API specifications, a config file and
optionally, markdown guides. For details, refer to the [documentation](https://docs.apimatic.io/platform-api/#/http/gu
ides/generating-on-prem-api-portal/build-file-reference)

EXAMPLES
$ apimatic portal generate
apimatic portal generate

$ apimatic portal generate --input="./" --destination="./portal"
apimatic portal generate --input="./" --destination="./portal"
```

_See code: [src/commands/portal/generate.ts](https://github.com/apimatic/apimatic-cli/blob/alpha/src/commands/portal/generate.ts)_

## `apimatic portal quickstart`

Create your first API Portal using APIMatic's Docs as Code offering.
Get started with your first API Portal in four easy steps.

```
USAGE
$ apimatic portal quickstart

DESCRIPTION
Get started with your first API Portal in four easy steps.

Create your first API Portal using APIMatic's Docs as Code offering.

EXAMPLES
$ apimatic portal quickstart
apimatic portal quickstart
```

_See code: [src/commands/portal/quickstart.ts](https://github.com/apimatic/apimatic-cli/blob/alpha/src/commands/portal/quickstart.ts)_

## `apimatic portal recipe new`

Add an API Recipe to your API Documentation portal.
Add an API Recipe to your API documentation portal.

```
USAGE
$ apimatic portal recipe new [--name <value>] [-i <value>]
$ apimatic portal recipe new [--name <value>] [-i <value>] [-f]

FLAGS
-f, --force overwrite changes without asking for user consent.
-i, --input=<value> [default: ./] path to the parent directory containing the 'src' directory, which includes API
specifications and configuration files.
--name=<value> name for the recipe

DESCRIPTION
Add an API Recipe to your API Documentation portal.
Add an API Recipe to your API documentation portal.

This command adds a new API Recipe file to your documentation portal.

To learn more about API Recipes, visit:
https://docs.apimatic.io/platform-api/#/http/guides/generating-on-prem-api-portal/api-recipes

EXAMPLES
$ apimatic portal recipe new
apimatic portal recipe new

$ apimatic portal recipe new --name="My API Recipe" --input="./"
apimatic portal recipe new --name="My API Recipe" --input="./"
```

_See code: [src/commands/portal/recipe/new.ts](https://github.com/apimatic/apimatic-cli/blob/alpha/src/commands/portal/recipe/new.ts)_

## `apimatic portal serve`

Generate and deploy a Docs as Code portal with hot reload.
Generate and serve an API Documentation Portal with hot reload.

```
USAGE
$ apimatic portal serve [-p <value>] [-i <value>] [-d <value>] [-o] [--no-reload] [-k <value>]
$ apimatic portal serve [-p 3000] [-i <value>] [-d <value>] [-o] [--no-reload] [-k <value>]

FLAGS
-d, --destination=<value> [default: <input>/portal] path where the portal will be generated.
-i, --input=<value> [default: ./] path to the parent directory containing the 'src' directory, which includes
API specifications and configuration files.
-k, --auth-key=<value> override current authentication state with an authentication key.
-o, --open Open the portal in the default browser.
-p, --port=<value> [default: 3000] port to serve the portal.
--no-reload Disable hot reload.
-o, --open open the portal in the default browser.
-p, --port=3000 [default: 3000] port to serve the portal.
--no-reload disable hot reload.

DESCRIPTION
Generate and deploy a Docs as Code portal with hot reload.
Generate and serve an API Documentation Portal with hot reload.

Requires an input directory with API specifications, a config file, and optionally markdown guides. Supports disabling
hot reload and opening the portal in the default browser.

EXAMPLES
$ apimatic portal serve
apimatic portal serve

$ apimatic portal serve --input="./" --destination="./portal" --port=3000 --open --no-reload
apimatic portal serve --input=./ --destination=./portal --port=3000 --open --no-reload
```

_See code: [src/commands/portal/serve.ts](https://github.com/apimatic/apimatic-cli/blob/alpha/src/commands/portal/serve.ts)_
Expand All @@ -353,7 +370,7 @@ USAGE
$ apimatic portal toc new [-d <value>] [-i <value>] [-f] [--expand-endpoints] [--expand-models]

FLAGS
-d, --destination=<value> [default: <input>/src/content] path where the 'toc.yml' will be generated.
-d, --destination=<value> [default: <input>/src/content] path where the toc.yml will be generated.
-f, --force overwrite changes without asking for user consent.
-i, --input=<value> [default: ./] path to the parent directory containing the 'src' directory, which includes
API specifications and configuration files.
Expand All @@ -374,11 +391,11 @@ DESCRIPTION
https://docs.apimatic.io/platform-api/#/http/guides/generating-on-prem-api-portal/overview-generating-api-portal

EXAMPLES
$ apimatic portal toc new --destination="./src/content/"
apimatic portal toc new --destination=./src/content/

$ apimatic portal toc new --input="./"
apimatic portal toc new --input=./

$ apimatic portal toc new --input="./" --destination="./src/content/"
apimatic portal toc new --input=./ --destination=./src/content/
```

_See code: [src/commands/portal/toc/new.ts](https://github.com/apimatic/apimatic-cli/blob/alpha/src/commands/portal/toc/new.ts)_
Expand All @@ -393,21 +410,26 @@ USAGE
[-k <value>]

FLAGS
-d, --destination=<value> [default: ./sdk/<language>] path where the sdk will be generated.
-d, --destination=<value> directory where the SDK will be generated
-f, --force overwrite changes without asking for user consent.
-k, --auth-key=<value> override current authentication state with an authentication key.
-l, --language=<option> (required) language for which the sdk will be generated.
-l, --language=<option> (required) programming language for SDK generation
<options: csharp|java|php|python|ruby|typescript|go>
--spec=<value> [default: ./src/spec] path to the folder containing the API specification file.
--zip download the generated SDK as a .zip archive.
--spec=<value> [default: ./src/spec] path to the folder containing the API specification file
--zip download the generated SDK as a .zip archive

DESCRIPTION
Generate an SDK for your API

Generate Software Development Kits (SDKs) from API specifications.
Supports multiple programming languages including Java, C#, Python, JavaScript, and more.

EXAMPLES
$ apimatic sdk generate --language=java
apimatic sdk generate --language=java

apimatic sdk generate --language=csharp --spec=./src/spec

$ apimatic sdk generate --language=csharp --spec="./src/spec"
apimatic sdk generate --language=python --destination=./sdk --zip
```

_See code: [src/commands/sdk/generate.ts](https://github.com/apimatic/apimatic-cli/blob/v1.1.0-alpha.21/src/commands/sdk/generate.ts)_
Expand Down
3 changes: 3 additions & 0 deletions eslint.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,9 @@ export default [
sourceType: "module",
globals: {
process: "readonly",
setTimeout: "readonly",
clearTimeout: "readonly",
URL: "readonly",
NodeJS: true,
},
},
Expand Down
Loading