Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/bpmn-io/bpmn-js-cli
A command line interface for bpmn-js. BPMN 2.0 modeling that just works!
https://github.com/bpmn-io/bpmn-js-cli
bpmn-js
Last synced: 3 months ago
JSON representation
A command line interface for bpmn-js. BPMN 2.0 modeling that just works!
- Host: GitHub
- URL: https://github.com/bpmn-io/bpmn-js-cli
- Owner: bpmn-io
- License: mit
- Created: 2014-07-31T17:00:56.000Z (over 10 years ago)
- Default Branch: main
- Last Pushed: 2024-06-10T09:46:26.000Z (5 months ago)
- Last Synced: 2024-07-18T19:54:07.436Z (4 months ago)
- Topics: bpmn-js
- Language: JavaScript
- Homepage:
- Size: 1.82 MB
- Stars: 49
- Watchers: 13
- Forks: 12
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- License: LICENSE
Awesome Lists containing this project
- awesome-bpmn-io - bpmn-js-cli - Model diagrams without the mouse (Extensions)
README
> As of version `1.0.0` this library exposes [ES modules](http://exploringjs.com/es6/ch_modules.html#sec_basics-of-es6-modules). Use an ES module aware bundler such as [Webpack](https://webpack.js.org) or [Rollup](https://rollupjs.org) to bundle it for the browser.
# bpmn-js-cli
[![CI](https://github.com/bpmn-io/bpmn-js-cli/workflows/CI/badge.svg)](https://github.com/bpmn-io/bpmn-js-cli/actions?query=workflow%3ACI)
An extensible command line interface for [bpmn-js](https://github.com/bpmn-io/bpmn-js).
## Demo
Checkout [`demo.js`](./resources/demo.js) for the commands powering this demo.
## Features
* Model BPMN 2.0 diagrams in the browser, without a mouse
* Full undo and redo functionality
* Extensible through your own commands
* [Numerous built-in commands](#built-in-commands)## Built in Commands
Out of the box, the cli supports the following commands:
* `append source type [deltaPos]`
* `connect source target type`
* `create type position parent`
* `element id`
* `elements`
* `move shape delta [newParentId]`
* `undo`
* `redo`
* `save svg|bpmn`
* `setLabel element label`
* `setRoot element|elementId`
* `removeShape shape|elementId`
* `removeConnection connection|connectionId`## Quickstart
Get the list of available commands:
```
cli.help();
```Get the list of elements:
```
cli.elements();
```Export SVG or BPMN 2.0 xml
```
cli.save('svg' || 'bpmn');
```## Usage
Deploy the cli with [bpmn-js](https://github.com/bpmn-io/bpmn-js):
```
var BpmnModeler = require('bpmn-js/lib/Modeler'),
CliModule = require('bpmn-js-cli');var modeler = new BpmnModeler({
container: document.body,
additionalModules: [
CliModule
],
cli: {
bindTo: 'cli'
}
});modeler.importXML('some-bpmn-xml')
.then(({ warnings }) => {
// ...
})
.catch(err => {
console.error(err);
});
```Access the cli as `cli` in your developer console (open via `F12` in most browsers).
Use the cli to model BPMN 2.0 diagrams in your browser. Pain free.
## License
MIT