{"id":27615426,"url":"https://github.com/imposter-project/imposter-cli","last_synced_at":"2026-04-07T02:04:04.465Z","repository":{"id":54198304,"uuid":"400621000","full_name":"imposter-project/imposter-cli","owner":"imposter-project","description":"CLI for the Imposter mock engine, a scriptable, multipurpose mock server.","archived":false,"fork":false,"pushed_at":"2025-04-12T21:42:00.000Z","size":16975,"stargazers_count":16,"open_issues_count":4,"forks_count":3,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-04-12T22:31:11.644Z","etag":null,"topics":["api-mock","cli","mock","mock-responses","mock-server","openapi","rest-api","testing"],"latest_commit_sha":null,"homepage":"https://imposter.sh","language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/imposter-project.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE","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,"zenodo":null}},"created_at":"2021-08-27T19:54:14.000Z","updated_at":"2025-04-12T21:42:03.000Z","dependencies_parsed_at":"2023-12-21T00:02:30.064Z","dependency_job_id":"ac6f4dab-b40a-4fff-9f81-2f686777c9ea","html_url":"https://github.com/imposter-project/imposter-cli","commit_stats":null,"previous_names":["imposter-project/imposter-cli","gatehill/imposter-cli"],"tags_count":163,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/imposter-project%2Fimposter-cli","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/imposter-project%2Fimposter-cli/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/imposter-project%2Fimposter-cli/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/imposter-project%2Fimposter-cli/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/imposter-project","download_url":"https://codeload.github.com/imposter-project/imposter-cli/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":250366664,"owners_count":21418767,"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":["api-mock","cli","mock","mock-responses","mock-server","openapi","rest-api","testing"],"created_at":"2025-04-23T03:42:18.405Z","updated_at":"2026-04-07T02:04:04.453Z","avatar_url":"https://github.com/imposter-project.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Imposter: Scriptable, multipurpose mock server\n\nReliable, scriptable and extensible mock server for REST APIs, OpenAPI (and Swagger) specifications, SOAP/WSDL Web Services, Salesforce and HBase APIs.\n\n\u003e This project is the CLI tool for the [Imposter mock engine](https://www.imposter.sh).\n\nStart a live mock of an OpenAPI specification with just:\n\n```shell\n$ imposter up -s\n\nfound 1 OpenAPI spec(s)\nstarting server on port 8080...\n...\nmock server up and running at http://localhost:8080\n```\n\nYou now have a live mock of your OpenAPI spec running on localhost.\n\n---\n\nOr create a mock by proxying an exising endpoint:\n\n```shell\n$ imposter proxy https://example.com\n\nstarting proxy on port 8080\n...\nwrote response file /users.json for request GET /users\nwrote config file example.com-config.yaml\n```\n\nOnce you've recorded the HTTP exchanges, just run `imposter up` to start your mock. \n\n---\n\nOr create a mock from an existing OpenAPI file:\n\n```shell\n$ imposter scaffold\n\nfound 1 OpenAPI spec(s)\ngenerated 1 resources from spec\nwrote Imposter config: /Users/mary/example/petstore-config.yaml\n```\n\nJust run `imposter up` to start your mock.\n\n\u003cimg src=\"./docs/img/imposter-scaffold.gif\" alt=\"Screenshot of scaffold command\" width=\"67%\"\u003e\n\n---\n\n## Features\n\n- run standalone mocks in place of real systems\n- turn an OpenAPI/Swagger file into a mock API for testing or QA (even before the real API is built)\n- decouple your integration tests from the cloud/various back-end systems and take control of your dependencies\n- validate your API requests against an OpenAPI specification\n- capture data and validate later or use response templates to provide conditional responses\n- proxy an existing endpoint to replay its responses as a mock\n\nSend dynamic responses:\n\n- Provide mock responses using static files or customise behaviour based on characteristics of the request.\n- Power users can control mock responses with JavaScript or Java/Groovy script engines.\n- Advanced users can write their own plugins in a JVM language of their choice.\n\n## Getting started \u0026 documentation\n\nYou must have [Docker](https://docs.docker.com/get-docker/) installed and running, or if Docker is not available, you can run on the [JVM](./docs/engine_jvm.md) or use the [Golang](./docs/engine_golang.md) engine.\n\n### Installation\n\nSee the [Installation](./docs/install.md) instructions for your system or follow the quick-start instructions below:\n\n#### Homebrew\n\nIf you have Homebrew installed:\n\n    brew tap imposter-project/imposter\n    brew install imposter\n\n#### Shell script\n\nOr, use this one liner (macOS and Linux only):\n\n```shell\ncurl -L https://raw.githubusercontent.com/imposter-project/imposter-cli/main/install/install_imposter.sh | bash -\n```\n\n## Usage\n\nTop level command:\n\n```\nUsage:\n  imposter [command]\n\nAvailable Commands:\n  up                Start live mocks of APIs\n  scaffold          Create Imposter configuration from OpenAPI specs and WSDL files\n  engine pull       Pull the engine into the cache\n  engine list       List the engines in the cache\n  doctor            Check prerequisites for running Imposter\n  down              Stop running mocks\n  list              List running mocks\n  plugin install    Install plugin\n  plugin list       List installed plugins\n  plugin uninstall  Uninstall plugins\n  proxy             Proxy an endpoint and record HTTP exchanges\n  version           Print CLI version\n  remote config     Configure remote\n  remote deploy     Deploy active workspace\n  remote show       Show remote\n  remote status     Show remote status\n  workspace delete  Delete a workspace\n  workspace list    List all workspaces\n  workspace new     Create a workspace\n  workspace select  Set the active workspace\n  help              Help about any command\n```\n\n### Create and start mocks\n\nExample:\n\n    imposter up\n\nUsage:\n\n```\nStarts a live mock of your APIs, using their Imposter configuration.\n\nIf CONFIG_DIR is not specified, the current working directory is used.\n\nUsage:\n  imposter up [CONFIG_DIR] [flags]\n\nFlags:\n      --auto-restart              Automatically restart when config dir contents change (default true)\n      --debug-mode                Enable JVM debug mode and listen on port 8000\n      --deduplicate string        Override deduplication ID for replacement of containers\n      --enable-file-cache         Enable file cache (default true)\n      --enable-plugins            Enable plugins (default true)\n  -t, --engine-type string        Imposter engine type (valid: docker,jvm - default \"docker\")\n  -e, --env stringArray           Explicit environment variables to set\n  -h, --help                      help for up\n      --install-default-plugins   Install missing default plugins (default true)\n      --mount-dir stringArray     (Docker engine type only) Extra directory bind-mounts in the form HOST_PATH:CONTAINER_PATH (e.g. $HOME/somedir:/opt/imposter/somedir) or simply HOST_PATH, which will mount the directory at /opt/imposter/\u003cdir\u003e\n  -p, --port int                  Port on which to listen (default 8080)\n      --pull                      Force engine pull\n  -r, --recursive-config-scan     Scan for config files in subdirectories (default false)\n  -s, --scaffold                  Scaffold Imposter configuration for all OpenAPI and WSDL files\n  -v, --version string            Imposter engine version (default \"latest\")\n```\n\n### Generate Imposter configuration\n\nExample:\n\n    imposter scaffold\n\nUsage:\n\n```\nCreates Imposter configuration files. If one or more OpenAPI/Swagger\nspecification files are present, they are used as the basis for the generated\nresources. If no specification files are present, a simple REST mock is created.\n\nIf DIR is not specified, the current working directory is used.\n\nUsage:\n  imposter scaffold [DIR] [flags]\n\nFlags:\n  -f  --force-overwrite        Force overwrite of destination file(s) if already exist\n      --generate-resources     Generate Imposter resources from OpenAPI paths (default true)\n  -s  --script-engine string   Generate placeholder Imposter script (none|groovy|js) (default \"none\")\n```\n\n### Proxy HTTP(S) endpoint and record HTTP exchanges\n\nExample:\n\n    imposter proxy https://example.com\n\nUsage:\n\n```\nProxies an endpoint and records HTTP exchanges to file, in Imposter format.\n\nUsage:\n  imposter proxy [URL] [flags]\n\nFlags:\n      --capture-request-body        Capture the request body\n      --capture-request-headers     Capture the request headers\n      --flat                        Flatten the response file structure\n  -h, --help                        help for proxy\n  -i, --ignore-duplicate-requests   Ignore duplicate requests with same method and URI (default true)\n  -o, --output-dir string           Directory in which HTTP exchanges are recorded (default: current working directory)\n  -p, --port int                    Port on which to listen (default 8080)\n  -H, --response-headers strings    Record only these response headers\n  -r, --rewrite-urls                Rewrite upstream URL in response body to proxy URL\n```\n\n### Pull engine\n\nExample:\n\n    imposter engine pull\n\nUsage:\n\n```\nPulls a specified version of the engine binary/image into the cache.\n\nIf version is not specified, it defaults to 'latest'.\n\nUsage:\n  imposter engine pull [flags]\n\nFlags:\n  -t, --engine-type string    Imposter engine type (valid: docker,jvm - default \"docker\")\n  -h, --help                  help for pull\n  -f, --force                 Force engine pull\n  -v, --version string        Imposter engine version (default \"latest\")\n```\n\n### List installed engines\n\nExample:\n\n    imposter engine list\n\nUsage:\n\n```\nLists all versions of engine binaries/images in the cache.\n\nIf engine type is not specified, it defaults to all.\n\nUsage:\n  imposter engine list [flags]\n\nFlags:\n  -t, --engine-type string   Imposter engine type (valid: docker,jvm - default is all\n  -h, --help                 help for list\n```\n\n### Diagnose engine problems\n\n```\nChecks prerequisites for running Imposter, including those needed\nby the engines.\n\nUsage:\n  imposter doctor\n```\n\n### Stop all running mocks\n\nExample:\n\n    imposter down\n\nUsage:\n\n```\nStops running Imposter mocks for the current engine type.\n\nUsage:\n  imposter down [flags]\n\nFlags:\n  -a, --all                  Stop mocks for all engine types\n  -t, --engine-type string   Imposter engine type (valid: docker,golang,jvm - default \"docker\")\n  -h, --help                 help for down\n```\n\n### List all running mocks\n\nExample:\n\n    imposter list\n\nUsage:\n\n```\nLists running Imposter mocks for the current engine type\nand reports their health.\n\nUsage:\n  imposter list [flags]\n\nAliases:\n  list, ls\n\nFlags:\n  -a, --all                  List mocks for all engine types\n  -t, --engine-type string   Imposter engine type (valid: docker,golang,jvm - default \"docker\")\n  -x, --exit-code-health     Set exit code based on mock health\n  -h, --help                 help for list\n  -q, --quiet                Quieten output; only print ID\n```\n\n#### Using as a healthcheck\n\nYou can use the `list` command as a healthcheck for running mocks.\n\n```shell\n$ imposter list --quiet --exit-code-health\n```\n\nThis will return an exit code of `0` (success) if one or more mocks are running and healthy. If no mocks are running, or if one or more mock is unhealthy, a non-zero exit code will be returned.\n\n\u003e **Note**\n\u003e You can use the short versions of the arguments, so this can also be written:\n\u003e ```shell\n\u003e imposter list -qx\n\u003e ```\n\n### Install plugin\n\nExample:\n\n    imposter plugin install [PLUGIN_NAME_1] [PLUGIN_NAME_N...]\n\nUsage:\n\n```\nInstalls plugins for a specific engine version.\n\nIf version is not specified, it defaults to 'latest'.\n\nExample 1: Install named plugin\n\n        imposter plugin install store-redis\n\nExample 2: Install all plugins in config file\n\n        imposter plugin install\n\nUsage:\n  imposter plugin install [PLUGIN_NAME_1] [PLUGIN_NAME_N...] [flags]\n\nFlags:\n  -h, --help             help for install\n  -d, --save-default     Whether to save the plugin as a default\n  -v, --version string   Imposter engine version (default \"latest\")\n```\n\n### List plugins\n\nExample:\n\n    imposter plugin list\n\nUsage:\n\n```\nLists all versions of installed plugins.\n\nUsage:\n  imposter plugin list [flags]\n\nAliases:\n  list, ls\n\nFlags:\n  -v, --version string   Only show plugins for a specific engine version (default show all versions)\n  -h, --help             help for list\n```\n\n### Uninstall plugins\n\nExample:\n\n    imposter plugin uninstall store-redis\n\nUsage:\n\n```\nUninstalls plugins for a specific engine version.\n\nIf version is not specified, it defaults to 'latest'.\n\nExample 1: Uninstall named plugin\n\n        imposter plugin uninstall store-redis\n\nExample 2: Uninstall multiple plugins\n\n        imposter plugin uninstall store-redis js-graal\n\nExample 3: Uninstall plugin and remove from defaults\n\n        imposter plugin uninstall store-redis --remove-default\n\nUsage:\n  imposter plugin uninstall [PLUGIN_NAME_1] [PLUGIN_NAME_N...] [flags]\n\nAliases:\n  uninstall, rm, remove\n\nFlags:\n  -h, --help             help for uninstall\n  -d, --remove-default   Whether to remove the plugin from defaults\n  -v, --version string   Imposter engine version (default \"latest\")\n```\n\n### Help\n\n```\nProvides help for any command in the application.\nSimply type imposter help [path to command] for full details.\n\nUsage:\n  imposter help [command] [flags]\n```\n\n## Logging\n\nThe default log level is `debug`. You can override this by setting the `LOG_LEVEL` environment variable:\n\n    export LOG_LEVEL=info\n\n...or passing the `--log-level \u003cLEVEL\u003e` argument, for example:\n\n    imposter up --log-level trace\n\n## Configuration\n\nLearn more about [configuration](./docs/config.md).\n\n---\n\n## About Imposter\n\n[Imposter](https://www.imposter.sh) is a mock server for REST APIs, OpenAPI (and Swagger) specifications, SOAP web services (and WSDL files), Salesforce and HBase APIs.\n\n📖 **[Read the user documentation here](https://docs.imposter.sh)**\n\n![Imposter logo](https://raw.githubusercontent.com/imposter-project/imposter-jvm-engine/main/docs/images/composite_logo13_cropped.png)\n\n---\n\n## Contributing\n\nSuggestions and improvements to the CLI or documentation are welcome. Please raise pull requests targeting the `main` branch.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fimposter-project%2Fimposter-cli","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fimposter-project%2Fimposter-cli","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fimposter-project%2Fimposter-cli/lists"}