{"id":22785609,"url":"https://github.com/skriptfabrik/elements-cli","last_synced_at":"2026-01-20T11:08:59.885Z","repository":{"id":37544710,"uuid":"502133948","full_name":"skriptfabrik/elements-cli","owner":"skriptfabrik","description":"The missing CLI for beautiful, interactive API docs powered by with Stoplight Elements","archived":false,"fork":false,"pushed_at":"2025-04-04T14:33:15.000Z","size":1141,"stargazers_count":18,"open_issues_count":1,"forks_count":2,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-04-15T20:09:40.123Z","etag":null,"topics":["elements"],"latest_commit_sha":null,"homepage":"","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/skriptfabrik.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2022-06-10T17:52:47.000Z","updated_at":"2025-04-07T06:05:37.000Z","dependencies_parsed_at":"2022-07-14T00:50:29.025Z","dependency_job_id":"71afa163-309f-4918-8e2c-a1a210e639f9","html_url":"https://github.com/skriptfabrik/elements-cli","commit_stats":{"total_commits":130,"total_committers":6,"mean_commits":"21.666666666666668","dds":0.3076923076923077,"last_synced_commit":"0b7d2f2adf841b3581a491419728f0664dcf6ad0"},"previous_names":[],"tags_count":23,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/skriptfabrik%2Felements-cli","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/skriptfabrik%2Felements-cli/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/skriptfabrik%2Felements-cli/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/skriptfabrik%2Felements-cli/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/skriptfabrik","download_url":"https://codeload.github.com/skriptfabrik/elements-cli/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":249145303,"owners_count":21219966,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["elements"],"created_at":"2024-12-11T23:06:56.322Z","updated_at":"2026-01-20T11:08:59.826Z","avatar_url":"https://github.com/skriptfabrik.png","language":"JavaScript","readme":"# Elements CLI\n\n[![NPM Version](https://img.shields.io/npm/v/@skriptfabrik/elements-cli)](https://www.npmjs.com/package/@skriptfabrik/elements-cli)\n[![NPM Downloads](https://img.shields.io/npm/dt/@skriptfabrik/elements-cli)](https://www.npmjs.com/package/@skriptfabrik/elements-cli)\n[![Continuous Integration](https://img.shields.io/github/actions/workflow/status/skriptfabrik/elements-cli/ci.yml)](https://github.com/skriptfabrik/elements-cli/actions/workflows/ci.yml)\n\n\u003e The missing CLI for beautiful, interactive API docs powered by with [Stoplight Elements](https://github.com/stoplightio/elements)\n\n## Installation\n\nInstall using [npm](https://docs.npmjs.com/about-npm/) as global package:\n\n```bash\nnpm install -g @skriptfabrik/elements-cli\n```\n\n## Usage\n\n```bash\nelements --help\n```\n\n```text\nElements CLI\n\nUsage:\n  elements command [options] [arguments]\n\nOptions:\n  -h, --help     Display this help message\n  -v, --version  Print version number\n\nCommands:\n  export   Export rendered API docs\n  preview  Preview rendered API docs\n```\n\n### Export\n\n```bash\nelements export --help\n```\n\n```text\nElements CLI\n\nUsage:\n  elements export [options] \u003copenapi_json\u003e\n\nArguments:\n  openapi_json  The path or URL of the OpenAPI JSON file\n\nOptions:\n      --base-path=BASE_PATH                    Use the given base path [default: \"/\"]\n      --credentials-policy=CREDENTIALS_POLICY  Credentials policy for \"Try It\" feature: omit, include, same-origin [default: \"omit\"]\n      --cors-proxy=CORS_PROXY                  Provide CORS proxy\n  -f, --filter-internal                        Filter out any content which has been marked as internal with x-internal\n  -h, --help                                   Display this help message\n      --layout=LAYOUT                          Layout for Elements: sidebar, stacked [default: \"sidebar\"]\n      --logo=LOGO                              URL of an image that will show as a small square logo next to the title\n  -n  --no-try-it                              Hide the \"Try It\" panel (the interactive API console)\n      --router=ROUTER                          Determines how navigation should work: history, hash, memory, static [default: \"history\"]\n      --style=STYLE                            Additional style for Elements [default: \"flex: 1 0 0; overflow: hidden;\"]\n      --title=TITLE                            API docs title [default: \"My API Docs\"]\n      --variable=VARIABLE                      Variable to be replaced in the OpenAPI document\n  -v, --version                                Print version number\n\nExamples:\n  Export rendered API docs based on local openapi.json path as index.html:\n\n    elements export openapi.json \u003e index.html\n\n  Export rendered Swagger Petstore docs based on remote https://petstore.swagger.io/v2/swagger.json URL as index.html:\n\n    elements export --title=\"Swagger Petstore\" https://petstore.swagger.io/v2/swagger.json \u003e index.html\n```\n\n### Preview\n\n```bash\nelements preview --help\n```\n\n```text\nElements CLI\n\nUsage:\n  elements preview [options] \u003copenapi_json\u003e\n\nArguments:\n  openapi_json  The path or URL of the OpenAPI JSON file\n\nOptions:\n      --base-path=BASE_PATH                    Use the given base path [default: \"/\"]\n      --credentials-policy=CREDENTIALS_POLICY  Credentials policy for \"Try It\" feature: omit, include, same-origin [default: \"omit\"]\n  -c  --with-cors-proxy                        Enable CORS proxy capabilities\n  -f, --filter-internal                        Filter out any content which has been marked as internal with x-internal\n  -h, --help                                   Display this help message\n      --hostname=HOSTNAME                      Server hostname [default: \"localhost\"]\n      --layout=LAYOUT                          Layout for Elements: sidebar, stacked [default: \"sidebar\"]\n      --logo=LOGO                              URL of an image that will show as a small square logo next to the title\n  -n  --no-try-it                              Hide the \"Try It\" panel (the interactive API console)\n  -p, --poll                                   Use polling instead of file system events\n      --port=PORT                              Server port [default: 8000]\n      --router=ROUTER                          Determines how navigation should work: history, hash, memory, static [default: \"history\"]\n      --style=STYLE                            Additional style for Elements [default: \"flex: 1 0 0; overflow: hidden;\"]\n      --title=TITLE                            API docs title [default: \"My API Docs\"]\n      --variable=VARIABLE                      Variable to be replaced in the OpenAPI document\n  -v, --version                                Print version number\n  -w  --watch                                  Watch for changes and reload (only for local files)\n      --virtual-host=VIRTUAL_HOST              Reported hostname [default: localhost]\n      --virtual-port=VIRTUAL_PORT              Reported port [default: 8000]\n      --working-dir=PWD                        Use the given directory as working directory\n\nExamples:\n  Preview rendered API docs based on local openapi.json path:\n\n    elements preview openapi.json\n\n  Preview rendered Swagger Petstore docs based on remote https://petstore.swagger.io/v2/swagger.json URL:\n\n    elements preview --title=\"Swagger Petstore\" https://petstore.swagger.io/v2/swagger.json\n\n  Preview local API docs, enable CORS proxy and watch/reload on data changes:\n\n    elements preview -cw openapi.json\n```\n\n## Docker\n\n### Export\n\nExport rendered Swagger Petstore docs as `index.html`:\n\n```bash\ndocker run --rm skriptfabrik/elements-cli export --title=\"Swagger Petstore\" https://petstore.swagger.io/v2/swagger.json \u003e index.html\n```\n\n### Preview\n\nUse the following command to preview rendered API docs at `http://localhost:8080/` based on mounted `openapi.json` path:\n\n```bash\ndocker run --rm -p 8000:8000 -v `pwd`:/data:ro skriptfabrik/elements-cli preview openapi.json\n```\n\nPreview rendered Swagger Petstore docs at `http://localhost:8080/` based on remote URL:\n\n```bash\ndocker run --rm -p 8000:8000 skriptfabrik/elements-cli preview --title=\"Swagger Petstore\" https://petstore.swagger.io/v2/swagger.json\n```\n\nPreview mounted API docs at `http://localhost:8080/`, enable CORS proxy capabilities and watch/reload on data changes:\n\n```bash\ndocker run --rm -p 8000:8000 -v `pwd`:/data:ro skriptfabrik/elements-cli preview -cw openapi.json\n```\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fskriptfabrik%2Felements-cli","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fskriptfabrik%2Felements-cli","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fskriptfabrik%2Felements-cli/lists"}