{"id":13650940,"url":"https://github.com/hirosystems/clarinet","last_synced_at":"2025-12-30T06:06:43.466Z","repository":{"id":37007399,"uuid":"271441648","full_name":"hirosystems/clarinet","owner":"hirosystems","description":"Write, test and deploy high-quality smart contracts to the Stacks blockchain and Bitcoin.","archived":false,"fork":false,"pushed_at":"2025-04-04T16:24:44.000Z","size":29298,"stargazers_count":320,"open_issues_count":183,"forks_count":145,"subscribers_count":39,"default_branch":"main","last_synced_at":"2025-04-06T00:27:48.669Z","etag":null,"topics":["blockchain","clarinet","clarity","smart-contracts"],"latest_commit_sha":null,"homepage":"https://hiro.so/clarinet","language":"Rust","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/hirosystems.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":".github/CONTRIBUTING.md","funding":null,"license":"LICENSE","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-06-11T03:22:16.000Z","updated_at":"2025-04-04T16:12:01.000Z","dependencies_parsed_at":"2023-12-05T15:54:20.600Z","dependency_job_id":"0f48552f-a0a8-46d4-b969-30c9aa2ce262","html_url":"https://github.com/hirosystems/clarinet","commit_stats":{"total_commits":1664,"total_committers":59,"mean_commits":"28.203389830508474","dds":0.6412259615384616,"last_synced_commit":"f0941f8818acb3f1e0a4558d7f7dbd4facbe0e65"},"previous_names":["lgalabru/clarinet"],"tags_count":123,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hirosystems%2Fclarinet","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hirosystems%2Fclarinet/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hirosystems%2Fclarinet/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hirosystems%2Fclarinet/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/hirosystems","download_url":"https://codeload.github.com/hirosystems/clarinet/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248804783,"owners_count":21164131,"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","clarinet","clarity","smart-contracts"],"created_at":"2024-08-02T02:00:42.841Z","updated_at":"2025-04-14T00:52:03.074Z","avatar_url":"https://github.com/hirosystems.png","language":"Rust","funding_links":[],"categories":["Clarity Resources","Rust","Getting Started"],"sub_categories":["Developer Tools","Development Environment Setup"],"readme":"# Clarinet\n\nClarinet is the fastest way to build, test, and deploy smart contracts on the Stacks blockchain. It gives you a local devnet, REPL, testing framework, and debugging tools to ship high-quality Clarity code with confidence.\n\n- 🧑‍💻 **Leverage a powerful CLI**  \n  Create new projects, manage your smart contracts and their dependencies using clarinet requirements, and interact with your code through the built-in REPL.\n\n- 🧪 **Write unit tests with the SDK**  \n  Use the Clarinet SDK to write unit tests in a familiar JS environment and validate contract behavior.\n\n- 🛠️ **Run a private blockchain environment**  \n  Spin up a local devnet with nodes, miners, and APIs so you can test and integrate your code.\n  \n- 🔍 **VSCode extension**:\n  Linter, step by step debugger, helps writing smart contracts (autocompletion, documentation etc)\n\n---\n\n### Documentation\n\n- [Clarinet CLI](https://docs.hiro.so/stacks/clarinet)  \n- [Clarinet JS SDK and testing framework](https://docs.hiro.so/stacks/clarinet-js-sdk)\n\n---\n\n### Quickstart\n\n```bash\n# Install Clarinet\nbrew install clarinet\n```\n\n\u003e To check out more installation methods, click [here](https://docs.hiro.so/stacks/clarinet#installation)\n\n```bash\n# Create a new project\nclarinet new hello-world\ncd hello-world\n```\n\n```bash\n# Create a new contract\nclarinet contract new counter\n```\n\n```clarity\n;; Add this to the `contracts/counter.clar`\n\n(define-map counters principal uint)\n\n(define-public (count-up)\n  (ok (map-set counters tx-sender (+ (get-count tx-sender) u1)))\n)\n\n(define-read-only (get-count (who principal))\n  (default-to u0 (map-get? counters who))\n)\n```\n\n```bash\n# Then test it out\n\n# Check the contract\nclarinet check\n\n# Launch the REPL\nclarinet console\n```\n\n```bash\n# Inside the console\n(contract-call? .counter count-up)\n(contract-call? .counter get-count tx-sender)\n```\n\n### Contributing\n\nContributions are welcome and appreciated. The following sections provide information on how you can contribute to Clarinet.\n\n#### Prerequisites\n\nBefore contributing to Clarinet, please ensure you meet the following requirements:\n\n- rust (\u003e=1.52.0)\n- cargo (\u003e=1.52.0)\n- node (\u003e=v14.16.0) - Used for git commit hook\n- npm (\u003e=7.18.0) - Used for git commit hook\n\n#### Guide\n\nThis repo follows the [Conventional Commit](https://www.conventionalcommits.org/en/v1.0.0/#summary) specification when writing commit messages.\n\n**Note**It is important that any pull requests you submit have commit messages that follow this standard.\n\nTo start contributing:\n\n1. Fork this repo and clone the fork locally.\n2. Create a new branch\n   ```bash\n   git checkout -b \u003cmy-branch\u003e\n   ```\n3. Run `npm i` in the local repo to install and initialize `husky` and `commitlint`.\n   ```bash\n   npm i\n   ```\n4. These tools will be used in a `git commit` hook to lint and validate your commit message. If the message is invalid, `commitlint` will alert you to try again and fix it.\n\nHere is an example of a bad message response:\n\n```bash\ngit commit -m \"bad message\"\n⧗   input: bad message\n✖   subject may not be empty [subject-empty]\n✖   type may not be empty [type-empty]\n\n✖   found 2 problems, 0 warnings\nⓘ   Get help: https://github.com/conventional-changelog/commitlint/#what-is-commitlint\n\nhusky - commit-msg hook exited with code 1 (error)\n```\n\nHere is an example of a good message response:\n\n```bash\ngit commit -m \"fix: added missing dependency\"\n[my-branch 4c028af] fix: added missing dependency\n1 file changed, 50 insertions(+)\n```\n\n5. After making your changes, ensure the following:\n   -  `cargo build` runs successfully.\n   -  `cargo tst` runs successfully.\n      -  `cargo tst` is an alias declared in `./cargo/config`, it runs [cargo-nextest](https://crates.io/crates/cargo-nextest)\n   -  You have formatted your code with `cargo fmt --all --`\n   -  All functional tests in the `examples` directory pass.\n      ```bash\n      for testdir in $(ls examples); do\n          pushd examples/${testdir}\n              ../../target/debug/clarinet check .\n          popd\n      done\n      ```\n6. Submit a pull request against the `develop` branch for review.\n\n### Code of Conduct\nPlease read our [Code of conduct](../../../.github/blob/main/CODE_OF_CONDUCT.md) since we expect project participants to adhere to it. \n\n## Community\n\nJoin our community and stay connected with the latest updates and discussions:\n\n- [Join our Discord community chat](https://discord.com/invite/pPwMzMx9k8) to engage with other users, ask questions, and participate in discussions.\n- [Visit hiro.so](https://www.hiro.so/) for updates and subscribing to the mailing list.\n- Follow [Hiro on X.](https://x.com/hirosystems)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhirosystems%2Fclarinet","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fhirosystems%2Fclarinet","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhirosystems%2Fclarinet/lists"}