{"id":13651751,"url":"https://github.com/chevdor/srtool-cli","last_synced_at":"2025-04-08T04:16:44.135Z","repository":{"id":46284920,"uuid":"374573072","full_name":"chevdor/srtool-cli","owner":"chevdor","description":"This cli utility helps you harness the srtool docker image witout breaking a sweat. ","archived":false,"fork":false,"pushed_at":"2025-02-27T10:02:41.000Z","size":446,"stargazers_count":21,"open_issues_count":10,"forks_count":10,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-04-04T18:52:39.509Z","etag":null,"topics":["2021","blockchain","chevdor","cli","kusama","polkadot","runtime","rust","srtool","substrate","tooling"],"latest_commit_sha":null,"homepage":"","language":"Rust","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/chevdor.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.adoc","funding":null,"license":null,"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":"2021-06-07T07:24:49.000Z","updated_at":"2025-03-26T00:23:42.000Z","dependencies_parsed_at":"2024-01-24T04:10:01.714Z","dependency_job_id":"cf22604c-5f3f-410a-9559-22badd78182c","html_url":"https://github.com/chevdor/srtool-cli","commit_stats":{"total_commits":66,"total_committers":4,"mean_commits":16.5,"dds":"0.18181818181818177","last_synced_commit":"dc28ec5a094f1c9eae3911cec75b81a04ce1f9f1"},"previous_names":[],"tags_count":16,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/chevdor%2Fsrtool-cli","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/chevdor%2Fsrtool-cli/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/chevdor%2Fsrtool-cli/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/chevdor%2Fsrtool-cli/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/chevdor","download_url":"https://codeload.github.com/chevdor/srtool-cli/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247773720,"owners_count":20993639,"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":["2021","blockchain","chevdor","cli","kusama","polkadot","runtime","rust","srtool","substrate","tooling"],"created_at":"2024-08-02T02:00:52.036Z","updated_at":"2025-04-08T04:16:44.129Z","avatar_url":"https://github.com/chevdor.png","language":"Rust","readme":"# srtool cli\n\n\u003cfigure\u003e\n\u003cimg src=\"resources/srtool-cli_512px.png\" alt=\"srtool cli 512px\" /\u003e\n\u003c/figure\u003e\n\nThis project is NOT the `srtool` docker image that is actually used to build Substrate Wasm Runtime. This utility requires docker to be installed and running and will invoke the `srtool` image to help you build a Substrate runtime.\n\nThis project is a cli interface to docker to simplify using the `srtool` docker image. With this executable, you no longer need\nto set and maintain a long and complex alias, as currently described in the `srtool` documentation.\n\n## Install\n\nIf you previously defined `srtool` as an alias, you will first need to remove it first.\n\n### Clean up\n\nIf you used `srtool` in the past, you previously used an `srtool` alias. You can check with:\n\n    type srtool\n\nIf you see some output mentioning \"srtool is an alias for docker run…​\", you have an alias set and we need to remove it:\n\n    unalias srtool\n\nThis alias is likely set in your `.bash_profile` or `.zshrc`, make sure to remove this alias there as well.\n\n### Install\n\n    cargo install --git https://github.com/chevdor/srtool-cli\n\n## Usage\n\nhelp\n\n    srtool is cli allowing to control the srtool docker image\n\n    Usage: srtool [OPTIONS] \u003cCOMMAND\u003e\n\n    Commands:\n      pull     Simply pull the srtool image and do not run anything else\n      build    Start a new srtool container to build your runtime\n      info     Provide information about the srtool container and your repo\n      version  Show the versions of the srtool container. Use --version if you want the version of this executable\n      help     Print this message or the help of the given subcommand(s)\n\n    Options:\n      -i, --image \u003cIMAGE\u003e\n              Choose an alternative image. Beware to choose an image that is compatible with the original srtool image. Using a random image, you take the risk to NOT produce exactly the same deterministic result as srtool\n\n              [default: docker.io/paritytech/srtool]\n\n      -j, --json\n              This option is DEPRECATED and has no effect\n\n      -n, --no-cache\n              Do not use the local cached tag value\n\n      -e, --engine \u003cENGINE\u003e\n              By default, srtool-cli auto-detects whether you use Podman or Docker. You can force the engine if the detection does not meet your expectation. The default is auto and defaults to Podman.\n\n              NOTE: Using Podman currently forces using --no-cache\n\n              [env: ENGINE=]\n              [default: auto]\n\n      -h, --help\n              Print help (see a summary with '-h')\n\n      -V, --version\n              Print version\n\nversion\n\n    Show the versions of the srtool container. Use --version if you want the version of this executable\n\n    Usage: srtool version [OPTIONS]\n\n    Options:\n      -i, --image \u003cIMAGE\u003e\n              Choose an alternative image. Beware to choose an image that is compatible with the original srtool image. Using a random image, you take the risk to NOT produce exactly the same deterministic result as srtool\n\n              [default: docker.io/paritytech/srtool]\n\n      -e, --engine \u003cENGINE\u003e\n              By default, srtool-cli auto-detects whether you use Podman or Docker. You can force the engine if the detection does not meet your expectation. The default is auto and defaults to Podman.\n\n              NOTE: Using Podman currently forces using --no-cache\n\n              [env: ENGINE=]\n              [default: auto]\n\n      -h, --help\n              Print help (see a summary with '-h')\n\n      -V, --version\n              Print version\n\ninfo\n\n    Provide information about the srtool container and your repo\n\n    Usage: srtool info [OPTIONS] --package \u003cPACKAGE\u003e [PATH]\n\n    Arguments:\n      [PATH]\n              By default, srtool will work in the current folder. If your project is located in another location, you can pass it here\n\n              [default: .]\n\n    Options:\n      -i, --image \u003cIMAGE\u003e\n              Choose an alternative image. Beware to choose an image that is compatible with the original srtool image. Using a random image, you take the risk to NOT produce exactly the same deterministic result as srtool\n\n              [default: docker.io/paritytech/srtool]\n\n      -p, --package \u003cPACKAGE\u003e\n              Provide the runtime such as kusama-runtime, polkadot-runtime, etc...\n\n              [env: PACKAGE=]\n\n      -r, --runtime-dir \u003cRUNTIME_DIR\u003e\n              If your runtime is not in the standard location runtime/\u003cchain_name\u003e you can pass this args to help srtool find it\n\n              [env: RUNTIME_DIR=]\n\n      -e, --engine \u003cENGINE\u003e\n              By default, srtool-cli auto-detects whether you use Podman or Docker. You can force the engine if the detection does not meet your expectation. The default is auto and defaults to Podman.\n\n              NOTE: Using Podman currently forces using --no-cache\n\n              [env: ENGINE=]\n              [default: auto]\n\n      -h, --help\n              Print help (see a summary with '-h')\n\n      -V, --version\n              Print version\n\npull\n\n    Simply pull the srtool image and do not run anything else\n\n    Usage: srtool pull [OPTIONS]\n\n    Options:\n      -i, --image \u003cIMAGE\u003e\n              Choose an alternative image. Beware to choose an image that is compatible with the original srtool image. Using a random image, you take the risk to NOT produce exactly the same deterministic result as srtool\n\n              [default: docker.io/paritytech/srtool]\n\n      -e, --engine \u003cENGINE\u003e\n              By default, srtool-cli auto-detects whether you use Podman or Docker. You can force the engine if the detection does not meet your expectation. The default is auto and defaults to Podman.\n\n              NOTE: Using Podman currently forces using --no-cache\n\n              [env: ENGINE=]\n              [default: auto]\n\n      -h, --help\n              Print help (see a summary with '-h')\n\n      -V, --version\n              Print version\n\nbuild\n\n    Start a new srtool container to build your runtime\n\n    Usage: srtool build [OPTIONS] --package \u003cPACKAGE\u003e [PATH]\n\n    Arguments:\n      [PATH]\n              By default, srtool will work in the current folder. If your project is located in another location, you can pass it here\n\n              [default: .]\n\n    Options:\n      -i, --image \u003cIMAGE\u003e\n              Choose an alternative image. Beware to choose an image that is compatible with the original srtool image. Using a random image, you take the risk to NOT produce exactly the same deterministic result as srtool\n\n              [default: docker.io/paritytech/srtool]\n\n      -p, --package \u003cPACKAGE\u003e\n              Provide the runtime such as kusama-runtime, polkadot-runtime, etc...\n\n              [env: PACKAGE=]\n\n      -j, --json\n              Enable json output, same than the global --json option\n\n      -a, --app\n              Enable the \"app\" mode which is a mix of json output and outputting progress during the build. This flag is recommended for CI. the json output will be provided as a single line at the end in compact mode\n\n      -e, --engine \u003cENGINE\u003e\n              By default, srtool-cli auto-detects whether you use Podman or Docker. You can force the engine if the detection does not meet your expectation. The default is auto and defaults to Podman.\n\n              NOTE: Using Podman currently forces using --no-cache\n\n              [env: ENGINE=]\n              [default: auto]\n\n      -r, --runtime-dir \u003cRUNTIME_DIR\u003e\n              If your runtime is not in the standard location runtime/\u003cchain_name\u003e you can pass this args to help srtool find it\n\n              [env: RUNTIME_DIR=]\n\n          --build-opts \u003cBUILD_OPTS\u003e\n              You may pass options to cargo directly here. WARNING, if you pass this value, the automatic build options for Kusama and Polkadot will not be passed and you need to take care of them manually. In general, you should never use this option unless you HAVE to\n\n              [env: BUILD_OPTS=]\n\n          --default-features \u003cDEFAULT_FEATURES\u003e\n              Passing this is less involved than passing BUILD_OPTS. It allows changing the list of default features while keeping the automatic features detection. This value is useless if BUILD_OPTS is set\n\n              [env: DEFAULT_FEATURES=]\n\n          --profile \u003cPROFILE\u003e\n              The default profile to build runtimes is always `release`. You may override the default with this flag\n\n              [env: PROFILE=]\n              [default: release]\n\n          --no-cache\n              Passing this flag allows completely disabling caching. As a result, no cargo-home will be mounted to the srtool image. There is no known issue with having the cache ON, this is why it is the default\n\n          --root\n              Run container image as root, this helps on Linux based systems\n\n          --verbose\n              Run the build script using the verbose option\n\n          --no-wasm-std\n              Passing this flag solves the issue when there are no standard library sources found in WASM runtime compilation\n\n      -h, --help\n              Print help (see a summary with '-h')\n\n      -V, --version\n              Print version\n\n## Contributing\n\nIf you landed here, you likely want to contribute the project. Let me thank you already.\nThere are several ways you can help. Please start with the few notes below.\n\n### Features and issues\n\nWhether you are reporting an issue you ran into or requesting a new feature, please [open an issue here](https://github.com/chevdor/srtool-cli/issues/new).\n\nYou know the drill: please try to provide some context information, the version you used, your OS, how to reproduce. That will greatly help solving your issue quicker.\n\n### Documentation\n\nThe documentation of this project is mainly done using [AsciiDoc](https://asciidoc.org/). Unfortunately, it takes [litterally ages](https://github.com/github/markup/issues/1095) for Github to support THE feature that makes AsciiDoc shine.\nAs a result, for now, this project is generating the markdwown from AsciiDoc. In short that means that you should NOT modify any `.md` file but change the `.adoc` ones and run `just md` to generate all the markdown.\n\n### Tooling\n\nThis project is mainly using Rust so you will need to install the Rust compiler. Make sure everything works with the latest **stable** version of Rust.\n\nYou will find a `justfile` in the root of the repo. This is to be used with [just](https://github.com/casey/just) so you may want to install that as well. Just type `just` 😁 to discover how it can help you.\n\nBefore submitting your code, do a `cargo clippy` stop to make sure everything works fine. Don’t forget to `cargo fmt --all` as well if you want to be friend with the CI. No surprise, the test can be ran using `cargo test`.\n\nYou may activate the **logs** for the project using `RUST_LOG=debug` for instance.\n\n### Pull Requests\n\nPRs are welcome. Feel free to open them early before putting too much effort (you may start with a draft). This way you can ping me ([@chevdor](https://github.com/chevdor)) if you want my opinion on what and how you are putting your change together.\n","funding_links":[],"categories":["Tools"],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fchevdor%2Fsrtool-cli","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fchevdor%2Fsrtool-cli","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fchevdor%2Fsrtool-cli/lists"}