Skip to content

open-crypto-broker/crypto-broker-cli-js

IMPORTANT NOTE: This application is NOT intended for use in a production environment.

Crypto Broker CLI (TS)

Usage

This Crypto Broker CLI is an example CLI app written in TypeScript to allow users to interact with a Crypto Broker Server using the crypto-broker-client-js library.

Development

This section covers how to contribute to the project and develop it further.

Pre-requisites

In order to develop and build the project locally, you need Node.js installed and run the installation with npm install.

This app depends on the published npm package of cryptobroker-client. If you want to develop locally, it is recommended to create a local link between the CLI app and your local cryptobroker-client repository:

npm link ~/projects/crypto-broker-client-js      # add global link for npm
cd ~/projects/cryptobroker-cli-js                # move to cli project
npm link @open-crypto-broker/cryptobroker-client # use the previously created link in this project

Note: npm install will override the link.

For running commands using the Taskfile tool, you need to have Taskfile installed. Please check the documentation on how to install Taskfile. If you don't have Taskfile support, you can directly use the commands specified in the Taskfile on your local terminal, provided you meet the requirements.

Please note, that the generated files are supposed to be committed to the repository.

Additionally, this repository uses husky as a pre-commit hook for the project. Make sure to run npm install at least once before committing to this repository.

The server repository is recommended in order to perform end-to-end testing.

Building

The source code is under the /src folder. This code is compiled and the output saved in the /dist folder. To compile the binaries you can use npm run build, or simply use the Taskfile:

task build

Note: If you want to use your local cryptobroker-client version you can provide USE_LOCAL_CLIENT=true to the task (not available for the build-docker task).

For building the Docker image, you need to have Docker/Docker Desktop or any other alternative (e.g. Podman) installed. Further, the installation of docker-buildx is recommended. Note: task tools will install this.

If you want to additionally invoke the local pipeline, you can run all of these commands with:

task ci

You can do a local end-to-end testing of the application yourself with the provided CLI. To run the CLI, you first need to have the Crypto Broker server running in your Unix localhost environment. Once done, you can run one of the following in another terminal:

task test-hash
# or
task test-sign

Note: For the sign command, you need to have the deployment repository in the same parent directory as this repository. Check the command definitions in the package.json file to run your own custom commands.

CLI Installation

After building, it might be preferable to install the CLI app on your local machine as a command line tool. This can be done with:

npm install -g

Note: This might need higher privileges and $PATH to be adjusted.

The CLI can then be used via the "cryptobroker-cli" command.

Note: The server application must be running locally.

Support, Feedback, Contributing

This project is open to feature requests/suggestions, bug reports etc. via GitHub issues. Contribution and feedback are encouraged and always welcome. For more information about how to contribute, the project structure, as well as additional contribution information, see our Contribution Guidelines.

Security / Disclosure

If you find any bug that may be a security problem, please follow our instructions at in our security policy on how to report it. Please do not create GitHub issues for security-related doubts or problems.

Code of Conduct

We as members, contributors, and leaders pledge to make participation in our community a harassment-free experience for everyone. By participating in this project, you agree to abide by its Code of Conduct at all times.

Licensing

Copyright 2025 SAP SE or an SAP affiliate company and Open Crypto Broker contributors. Please see our LICENSE for copyright and license information. Detailed information including third-party components and their licensing/copyright information is available via the REUSE tool.

About

A CLI test-app for the cryptobroker, written in TS.

Resources

License

Code of conduct

Contributing

Security policy

Stars

Watchers

Forks

Packages

 
 
 

Contributors