{"id":26199835,"url":"https://github.com/kununu/pact-cli","last_synced_at":"2025-04-15T04:53:55.795Z","repository":{"id":17532025,"uuid":"80498575","full_name":"kununu/pact-cli","owner":"kununu","description":"A CLI Tool to start an API mock server via pact interaction files.","archived":true,"fork":false,"pushed_at":"2023-09-16T21:03:50.000Z","size":504,"stargazers_count":10,"open_issues_count":16,"forks_count":0,"subscribers_count":15,"default_branch":"master","last_synced_at":"2025-04-15T04:53:49.571Z","etag":null,"topics":["pact","pact-cli"],"latest_commit_sha":null,"homepage":"","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/kununu.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":"SECURITY.md","support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2017-01-31T07:00:45.000Z","updated_at":"2025-02-14T11:28:09.000Z","dependencies_parsed_at":"2025-03-12T03:10:27.487Z","dependency_job_id":null,"html_url":"https://github.com/kununu/pact-cli","commit_stats":null,"previous_names":[],"tags_count":2,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kununu%2Fpact-cli","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kununu%2Fpact-cli/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kununu%2Fpact-cli/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kununu%2Fpact-cli/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/kununu","download_url":"https://codeload.github.com/kununu/pact-cli/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":249010195,"owners_count":21197797,"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":["pact","pact-cli"],"created_at":"2025-03-12T03:00:17.537Z","updated_at":"2025-04-15T04:53:55.778Z","avatar_url":"https://github.com/kununu.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# pact-cli\n\nA CLI Tool to start a API mock server via pact interaction files.  \n\n## Installation\n- clone repository\n- `npm install`\n- `npm run build`\n- `npm link`\n\n## Development\n`npm run dev`\n\n## Sub-Commands\n\n### server\n```pact-cli server (start|add)```\n\n- `server add` starts an interactive serverwizard which creates a new serverfile or adds additional servers to it.\n  - optional arguments:\n    - `-f ./path-to-serverfile`\n\n- `server start` searches your directory for *.interaction.json files and starts an PACT Mock API Server\n  - optional arguments:\n    - `-f | --file ./path-to-serverfile`\n    - `-l | --log-path ./pact-cli-server.log` (path to logfile)\n    - `-c | --contract-dir ./pacts` (path for server-written pacts)\n    - `-d | --daemon` if set it will run mockservers in background\n\n### new\n```pact-cli new INTERACTION_NAME ```\n - optional arguments:\n    - `-f | --file ./path-to-serverfile`\n - Starts an step-by-step generator for creating an interactionfile, a Serverfile *is required*\n\n### config\n```pact-cli config```\n- Starts an step-by-step config generator (brokerserver url + auth)\n- Configfile will be stored in your `$HOME` directory (~/.pact-cli)\n\n### publish\n```pact-cli publish PACT_FILE```\n  - arguments:\n    - `PACTFILE` relative path to JSON file of pact\n  - optional arguments:\n    - `-v | --version x.x.x` (SEMVER)\n    - `-t | --tags tag1,tag2,tag3`\n    - `-b | --branch branch-name`\n  - will publish the given pact to the configured broker\n    - the given branch will be added to the branch list\n    - if no version is given it will try to get the version from the pact broker and bump it (minor or build number if prerelase):\n      - if no branch is given it fetches from latest,\n      - if branch is given it fetches the latest consumer/provider/pact and bumps it's version\n      - if branch is given and not master, but tag doesn't yet exists on broker. It get's the tag from master and bumps it to the next prerelase-minor-version.\n\n### verify\n```pact-cli verify PACT_FILE```\n  - required arguments:\n    - `-u | --states-url url` URL to fetch the provider states for the given provider API.\n    - `-s | --setup-url url` URL to send PUT requests to setup a given provider state.\n    - `-p | --provider-url` Running API provider host endpoint.\n\n# Docker\n\nTo run pact-cli within Docker please do the following:\n\n```bash\n# build the docker image\ndocker build -t pact-cli .\n# run the docker image\n## e.g. start mock servers\n## $PATH_TO_INTERACTIONS_DIR = dir with interactions and server files\ndocker run --rm -v $PATH_TO_INTERACTIONS_DIR:/pact -w /pact pact-cli server start\n```\n\n## TODO\n - Silent mode\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkununu%2Fpact-cli","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fkununu%2Fpact-cli","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkununu%2Fpact-cli/lists"}