{"id":21850476,"url":"https://github.com/circlefin/contract-cli","last_synced_at":"2025-04-14T14:56:04.685Z","repository":{"id":65526114,"uuid":"540092775","full_name":"circlefin/contract-cli","owner":"circlefin","description":"CLI for Managing Smart Contracts","archived":false,"fork":false,"pushed_at":"2024-06-28T22:31:23.000Z","size":1043,"stargazers_count":11,"open_issues_count":6,"forks_count":10,"subscribers_count":11,"default_branch":"master","last_synced_at":"2024-10-29T20:29:26.725Z","etag":null,"topics":["blockchain","nodejs","smart-contract-tools","smart-contracts"],"latest_commit_sha":null,"homepage":"","language":"TypeScript","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/circlefin.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":"SECURITY.md","support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2022-09-22T17:24:34.000Z","updated_at":"2024-06-28T22:31:27.000Z","dependencies_parsed_at":"2024-11-28T00:46:28.061Z","dependency_job_id":null,"html_url":"https://github.com/circlefin/contract-cli","commit_stats":{"total_commits":16,"total_committers":5,"mean_commits":3.2,"dds":0.4375,"last_synced_commit":"3ff45fdbf3d8cccc29a62e483a39ac52b8673b85"},"previous_names":[],"tags_count":3,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/circlefin%2Fcontract-cli","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/circlefin%2Fcontract-cli/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/circlefin%2Fcontract-cli/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/circlefin%2Fcontract-cli/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/circlefin","download_url":"https://codeload.github.com/circlefin/contract-cli/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248901957,"owners_count":21180537,"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":["blockchain","nodejs","smart-contract-tools","smart-contracts"],"created_at":"2024-11-28T00:17:45.965Z","updated_at":"2025-04-14T14:56:04.659Z","avatar_url":"https://github.com/circlefin.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# contract-cli\n\n## Introduction\n\nContract-cli is your configurable build tool for smart contracts. It makes management of your smart contracts, including compiling and testing easier and more consistent. With the contract-cli, you can:\n\n- configure a series of steps to execute against your smart contracts\n- create your own steps, or use provided defaults for common operations\n- execute your steps serially in a docker container and have the outputs available locally\n\n## Prerequisites\n\nBefore installing the contract-cli, the following requirements should be installed:\n\n- Docker Engine \u003e version 20.10.8\n- NodeJS \u003e version 16.16.0\n\nEarlier versions may work but have not been tested and are not considered officially supported.\n\n## Installation\n\n```\n$ npm i -g @circle-fin/contract-cli\n```\n\nNote: We use the `-g` flag for global installation here to enable operation from the command line.\n\n## Quick Usage\n\nIn the root directory of your contracts and/or contract tests, run:\n\n```\n$ contract-cli init\n```\n\nIf there are specific build steps you would like to include, you can specify those with the `--steps` flag. For example:\n\n```\n$ contract-cli init –steps ganache –steps truffle\n```\n\nThis will create your config file, and directories for each step you’ve created.\n\nYour directory may now look something like the following:\n\n```\n$ root_directory\n├── contracts\n├── tests\n├── ganache\n│   ├── package.json\n│   ├── install.sh\n│   └── execute.sh\n├── truffle\n│   ├── package.json\n│   ├── yarn.lock\n│   ├── truffle-config.js\n│   ├── install.sh\n│   └── execute.sh\n└── config.json\n```\n\nAt this time, you should read through and edit where necessary the `config.json` file. In particular, you may want to update the `contractsRoot` and `testsRoot` to locate your contracts and tests.\n\nYou may also want to look at the `install.sh` and `execute.sh` files in each step directory. Those specify how the step will be installed and/or executed.\n\nIf the step is known to the contract-cli, it will come with some defaults that you can review. If the step is unknown, you must provide custom installation and execution scripts.\n\nOnce you’ve reviewed the configuration, you can execute the cli which will run your build steps inside a container.\n\n```\n$ contract-cli execute\n```\n\n---\n\n## Development\n\nWe welcome pull requests adding new functionality to the CLI, or adding additional modules as steps. To get started, fork the repo, clone it locally and follow the directions below.\n\nIf you are interested in adding a new module as a known step for the contract-cli, additional information is available in [ADD_STEP_README](./docs/ADD_STEP_README.md)\n\n### Getting started\n\n1. Make sure [nvm](https://github.com/nvm-sh/nvm) is installed: `nvm ls` and you are using the correct version: `nvm use`.\n   - Please see [here](https://github.com/nvm-sh/nvm#installing-and-updating) for installation instructions.\n2. Install dependencies `yarn install`\n3. Build the project `yarn build`\n\n### Manual testing of the CLI\n\n- Rebuild the project to pick up any changes with `yarn build`\n- Run the CLI using `./bin/run \u003ccmd_name\u003e` e.g. `./bin/run help`\n- If the cmd_name is omitted, information will be displayed about commands the CLI understands\n\n### Automated Testing\n\n- To run tests: `yarn test`\n- With coverage output: `yarn test:cov`\n- Run a specific test: `yarn test {testFileName}`\n\n### Code Linting and Formatting\n\nThe project uses eslint for code linting and prettier for formatting. To easily work with these tools in VSCode, please install\nthe recommended extensions for the project.\n\n- To view/install these extensions, press `CMD+SHIFT+P` and type: `Extensions: Show Recommended Extensions`.\n- This will enable code error/warning highlighting and format on saves.\n- The linter can be run manually with `yarn lint` and can auto-fix problems with `yarn lint:fix`.\n- The linter will be automatically run on `git push` commands. This can be bypassed with the `no-verify` flag.\n\n## Join the team\nIf you’re energized by what we’re building at Circle, please consider joining our team by exploring [Careers @ Circle](http://circle.com/careers).\n\n## License\n\n[Apache-2.0](./LICENSE)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcirclefin%2Fcontract-cli","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcirclefin%2Fcontract-cli","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcirclefin%2Fcontract-cli/lists"}