{"id":29332622,"url":"https://github.com/cinoss/cupl","last_synced_at":"2025-07-08T02:02:11.693Z","repository":{"id":42897428,"uuid":"253149925","full_name":"cinoss/cupl","owner":"cinoss","description":"Easily manage Cucumber Gherkin files using PlantUML activity diagrams","archived":false,"fork":false,"pushed_at":"2023-07-18T21:35:09.000Z","size":482,"stargazers_count":34,"open_issues_count":17,"forks_count":5,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-06-04T10:56:26.375Z","etag":null,"topics":["activity-diagram","bdd","cucumber","gherkin","plantuml"],"latest_commit_sha":null,"homepage":"https://cinoss.github.io/cupl/","language":"TypeScript","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/cinoss.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":"2020-04-05T03:44:56.000Z","updated_at":"2024-12-19T11:56:32.000Z","dependencies_parsed_at":"2024-11-15T22:38:26.326Z","dependency_job_id":"1cd7143f-3ef8-44d7-bb2e-8acc25ba6e37","html_url":"https://github.com/cinoss/cupl","commit_stats":{"total_commits":33,"total_committers":1,"mean_commits":33.0,"dds":0.0,"last_synced_commit":"e884f82654b228085b534cd4465bc488ae5119c1"},"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/cinoss/cupl","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cinoss%2Fcupl","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cinoss%2Fcupl/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cinoss%2Fcupl/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cinoss%2Fcupl/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/cinoss","download_url":"https://codeload.github.com/cinoss/cupl/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cinoss%2Fcupl/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":264043189,"owners_count":23548518,"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":["activity-diagram","bdd","cucumber","gherkin","plantuml"],"created_at":"2025-07-08T02:01:00.725Z","updated_at":"2025-07-08T02:02:11.686Z","avatar_url":"https://github.com/cinoss.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Cupl\n\nA CLI tool for automatic **CU**cumber gherkin feature files generation from **PL**antuml activity diagram.\n\n[![Version](https://img.shields.io/npm/v/cupl.svg)](https://npmjs.org/package/cupl)\n[![CircleCI](https://circleci.com/gh/cinoss/cupl/tree/master.svg?style=shield)](https://circleci.com/gh/cinoss/cupl/tree/master)\n[![Codecov](https://codecov.io/gh/cinoss/cupl/branch/master/graph/badge.svg)](https://codecov.io/gh/cinoss/cupl)\n[![Downloads/week](https://img.shields.io/npm/dw/cupl.svg)](https://npmjs.org/package/cupl)\n[![License](https://img.shields.io/npm/l/cupl.svg)](https://github.com/cinoss/cupl/blob/master/package.json)\n[![oclif](https://img.shields.io/badge/cli-oclif-brightgreen.svg)](https://oclif.io)\n\n\u003c!-- [![Appveyor CI](https://ci.appveyor.com/api/projects/status/github/cinoss/cupl?branch=master\u0026svg=true)](https://ci.appveyor.com/project/cinoss/cupl/branch/master) --\u003e\n\nCupl will help you transform `.puml` file of this diagram.\n\n![ATM Activity Diagram](https://raw.githubusercontent.com/cinoss/cupl/master/examples/ATM.png)\n\nInto this Gherkin feature description\n\n```gherkin\nFeature: Simple ATM withdrawal\n  No PIN retry, No Amount re-enter\n\n  Scenario: Successful transaction\n    Given Entered Correct PIN number\n      And Balance is sufficient\n    When enter amount\n    Then dispense notes\n      And print receipt\n      And eject the card\n\n  @important\n  Scenario: Not enough money\n    Given Entered Correct PIN number\n      And Insufficient balance\n    When enter amount\n    Then display \"Insufficient balance\"\n      And eject the card\n\n  Scenario Outline: PIN is incorrect\n    Given User's PIN is \u003cpin\u003e\n    When insert card\n      And User enters \u003cinput\u003e\n    Then display \"incorrect PIN\"\n      And eject the card\n\n    Examples:\n      | pin    | input  |\n      | 123456 | 325212 |\n      | 123456 |        |\n```\n\n\u003c!-- toc --\u003e\n\n- [Cupl](#cupl)\n- [Usage](#usage)\n  - [Conventions](#conventions)\n  - [Basic](#basic)\n  - [Install globally](#install-globally)\n- [Syntax Support](#syntax-support)\n  - [Gherkin](#gherkin)\n  - [PlantUML Activity Diagram (New Syntax)](#plantuml-activity-diagram-new-syntax)\n  \u003c!-- tocstop --\u003e\n\n# Usage\n\n## Conventions\n\n- User/Core activity must start with `@` symbol, these will go to `When` steps of Gherkin file.\n- If condition must be a statement that end with `?`, the question mark will be drop while parsing.\n\n\u003e :x: `is PIN correct?`\n\n\u003e :white_check_mark: `PIN is correct?`\n\n- Else branch must be descriptive.\n\n\u003e :x: `no`\n\n\u003e :x: `false`\n\n\u003e :white_check_mark: `PIN is incorrect`\n\n- Activity must not contain (!), if it ends with !, the activity will be consider as an `Given`.\n\n## Basic\n\n\u003c!-- usage --\u003e\n\n1. create a `.puml` file and run\n\n```sh-session\n$ npx cupl FILE.puml\nFeature: ...\n...\n```\n\n2. a `.cupl.json` file will be generated to allow you to\n\n- Rename `Scenario` ( by `name` field).\n- Rename rename steps ( by `alias` dictionary) and insert parameters.\n- Rename add `@tag` to `Scenario` and steps (by `tags` field - array of strings).\n- Rename change Gherkin dialect.\n- Provide examples.\n\nExample:\n\n```json\n{\n  \"$schema\": \"https://raw.githubusercontent.com/cinoss/cupl/master/src/config.schema.json\",\n  \"global\": {\n    \"alias\": {\n      \"PIN is correct\": \"Entered Correct PIN number\"\n    },\n    \"dialect\": \"en\"\n  },\n  \"paths\": {\n    \"PIN is correct|Balance is sufficient\": {\n      \"name\": \"Successful transaction\"\n    },\n    \"PIN is correct|Insufficient balance\": {\n      \"name\": \"Not enough money\",\n      \"tags\": [\"important\"]\n    },\n    \"PIN is incorrect\": {\n      \"alias\": {\n        \"PIN is incorrect\": \"User's PIN is \u003cpin\u003e\",\n        \"enter PIN\": \"User enters \u003cinput\u003e\"\n      },\n      \"examples\": [\n        [\"pin\", \"input\"],\n        [\"123456\", \"325212\"],\n        [\"123456\", \"\"]\n      ]\n    }\n  }\n}\n```\n\n3. Run `cupl` again with `-w` flag to generate a file.\n\n```sh-session\n$ npx cupl -w FILE.puml\nFeature: ...\n...\nGenerated [FILE].feature successfully!\n```\n\n## Install globally\n\n```sh-session\n$ npm install -g cupl\n$ cupl FILE\nrunning command...\n...\n```\n\n\u003c!-- usagestop --\u003e\n\n# Syntax Support\n\n## Gherkin\n\n- [x] Feature\n- [x] Example (or Scenario)\n- [x] Given, When, Then, And, But for steps (or \\*)\n- [x] Tags\n- [x] Examples\n- [ ] Background\n- [ ] Scenario Outline (or Scenario Template)\n- [ ] Data Tables\n- [ ] Rule\n- [ ] Doc Strings\n- [ ] Comments\n\n## PlantUML Activity Diagram (New Syntax)\n\n- [x] `start`, `stop`, `end`\n- [x] `if`, `elseif`, `endif`\n- [x] `title`, `end title`\n- [x] `note`, `end note`\n- [x] SDL (`|`, `\u003c`, `\u003e`, `/`, `]`, `}`)\n- [ ] `repeat`, `repeat while`, `backward`, `while`, `end while`\n- [ ] `fork`, `end fork`\n- [ ] Colors\n- [ ] Arrow\n- [ ] Connector\n- [ ] Grouping\n- [ ] Swimlanes\n- [ ] Detach\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcinoss%2Fcupl","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcinoss%2Fcupl","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcinoss%2Fcupl/lists"}