{"id":15646195,"url":"https://github.com/pubkey/solidity-cli","last_synced_at":"2025-04-30T11:15:23.482Z","repository":{"id":57365926,"uuid":"133991157","full_name":"pubkey/solidity-cli","owner":"pubkey","description":"Compile solidity-code faster, easier and more reliable","archived":false,"fork":false,"pushed_at":"2018-11-30T17:25:50.000Z","size":93,"stargazers_count":50,"open_issues_count":1,"forks_count":2,"subscribers_count":6,"default_branch":"master","last_synced_at":"2025-04-19T01:31:47.258Z","etag":null,"topics":["blockchain","dapp","ethereum","smart-contracts","solc","solidity","typescript","web3","web3js"],"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/pubkey.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":null,"support":null}},"created_at":"2018-05-18T18:34:44.000Z","updated_at":"2023-06-10T17:45:13.000Z","dependencies_parsed_at":"2022-08-23T19:01:05.658Z","dependency_job_id":null,"html_url":"https://github.com/pubkey/solidity-cli","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pubkey%2Fsolidity-cli","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pubkey%2Fsolidity-cli/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pubkey%2Fsolidity-cli/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pubkey%2Fsolidity-cli/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/pubkey","download_url":"https://codeload.github.com/pubkey/solidity-cli/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":251687616,"owners_count":21627601,"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","dapp","ethereum","smart-contracts","solc","solidity","typescript","web3","web3js"],"created_at":"2024-10-03T12:11:46.175Z","updated_at":"2025-04-30T11:15:23.450Z","avatar_url":"https://github.com/pubkey.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"\u003cp align=\"center\"\u003e\n  \u003ca href=\"https://github.com/pubkey/Solidity-Cli\"\u003e\n    \u003cimg src=\"https://cdn.rawgit.com/pubkey/solidity-cli/c2e68782/docs/solidity.svg\" width=\"150px\" /\u003e\n  \u003c/a\u003e\n\u003c/p\u003e\n\n\u003ch1 align=\"center\"\u003eSolidity-Cli\u003c/h1\u003e\n\u003cp align=\"center\"\u003e\n  \u003cstrong\u003eCompile solidity-code faster, easier and more reliable\u003c/strong\u003e\n\u003c/p\u003e\n\n\u003cp align=\"center\"\u003e\n    \u003ca alt=\"travis\" href=\"https://travis-ci.org/pubkey/solidity-cli\"\u003e\n        \u003cimg src=\"https://travis-ci.org/pubkey/solidity-cli.svg?branch=master\" /\u003e\u003c/a\u003e\n    \u003ca href=\"https://twitter.com/intent/follow?screen_name=pubkeypubkey\"\u003e\n        \u003cimg src=\"https://img.shields.io/twitter/follow/pubkeypubkey.svg?style=social\u0026logo=twitter\"\n            alt=\"follow on Twitter\"\u003e\u003c/a\u003e\n\u003c/p\u003e\n\n\u003cbr/\u003e\n\n* * *\n\n## Features\n\n-   **Caching**\n\n    When you run the compilation as one step of your build-process, it could waste you much time always compiling the same contracts again and again. Solidity-Cli caches the compilation output and only recompiles when the code of your contract actually has changed.\n\n-   **Multi-Threading**\n\n    Compiling multiple contracts can take very long when done on a single process in series. Solidity-Cli compiles multiple contracts with a dedicated process per contract.\n\n-   **Version-Discovery**\n\n    Often you have different contracts with different solidity-versions. It is a struggle to install multiple compiler-versions in the same project. Solidity-Cli detects the version by the contracts code `pragma solidity 0.X.X;` and automatically installs it if needed.\n\n-   **Imports**\n\n    Solidity-Cli automatically manages the import-statements of your code. `import \"./OtherContract.sol\";` just works.\n\n-   **Typescript-Support**\n\n    When you use typescript, you no longer have to manually add typings to the compilation output. Solidity-Cli generates a javascript and a typescript-file which only has to be imported.\n\n## Usage\n\n### CLI\n\n`npm install -g solidity-cli`\n\nCompile all `*.sol` files from one folder into the destination.\n\n`solidity -i './test/contracts/*.sol' -o ./test/compiled/`\n\nIt's recommended to use solidity-cli inside of a script in your `package.json`\n\n`npm install solidity-cli --save-dev`\n\n```json\n{\n    \"scripts\": {\n      \"pretest\": \"solidity-cli -i './contracts/*.sol' -o ./compiled\"\n    },\n    \"dependencies\": {\n        \"solidity-cli\": \"X.X.X\"\n    }\n}\n```\n\n### Programmatically\n\nCompile the given solidity-code.\n\n```js\nimport * as SolidityCli from 'solidity-cli';\nconst compiled = await SolidityCli.compileCode(myCode);\n```\n\nCompile the the given solidity-file.\n\n```js\nimport * as SolidityCli from 'solidity-cli';\nconst compiled = await SolidityCli.compileFile('/home/foobar/myProject/contracts/Basic.sol');\n```\n\nCompile all files from one folder and write the output to another.\n\n```js\nimport * as SolidityCli from 'solidity-cli';\nawait SolidityCli.runCli({\n    sourceFolder: '/home/foobar/myProject/contracts/*.sol',\n    destinationFolder: '/home/foobar/myProject/compiled/*.sol'\n});\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpubkey%2Fsolidity-cli","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fpubkey%2Fsolidity-cli","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpubkey%2Fsolidity-cli/lists"}