{"id":18263309,"url":"https://github.com/safe-global/safe-cli","last_synced_at":"2025-05-16T09:03:27.693Z","repository":{"id":37963102,"uuid":"223751088","full_name":"safe-global/safe-cli","owner":"safe-global","description":"Command line utility for Safe","archived":false,"fork":false,"pushed_at":"2025-04-21T14:37:36.000Z","size":1184,"stargazers_count":237,"open_issues_count":14,"forks_count":82,"subscribers_count":16,"default_branch":"main","last_synced_at":"2025-04-25T15:07:02.937Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/safe-global.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":".github/CODEOWNERS","security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2019-11-24T13:46:21.000Z","updated_at":"2025-04-24T06:00:08.000Z","dependencies_parsed_at":"2023-09-28T13:43:27.233Z","dependency_job_id":"46621e55-2c6c-4141-8cd6-6f40059d9444","html_url":"https://github.com/safe-global/safe-cli","commit_stats":null,"previous_names":["gnosis/safe-cli","5afe/safe-cli"],"tags_count":22,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/safe-global%2Fsafe-cli","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/safe-global%2Fsafe-cli/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/safe-global%2Fsafe-cli/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/safe-global%2Fsafe-cli/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/safe-global","download_url":"https://codeload.github.com/safe-global/safe-cli/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":254501554,"owners_count":22081528,"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":[],"created_at":"2024-11-05T11:10:44.474Z","updated_at":"2025-05-16T09:03:27.674Z","avatar_url":"https://github.com/safe-global.png","language":"Python","funding_links":[],"categories":["Python"],"sub_categories":[],"readme":"[![PyPI version](https://badge.fury.io/py/safe-cli.svg)](https://badge.fury.io/py/safe-cli)\n[![Build Status](https://github.com/safe-global/safe-cli/actions/workflows/ci.yml/badge.svg)](https://github.com/safe-global/safe-cli/actions/workflows/ci.yml)\n[![Coverage Status](https://coveralls.io/repos/github/safe-global/safe-cli/badge.svg?branch=main)](https://coveralls.io/github/safe-global/safe-cli?branch=main)\n![Python 3.10](https://img.shields.io/badge/Python-3.10-blue.svg)\n![Python 3.11](https://img.shields.io/badge/Python-3.11-blue.svg)\n![Python 3.12](https://img.shields.io/badge/Python-3.12-blue.svg)\n[![Docker Image Version (latest semver)](https://img.shields.io/docker/v/safeglobal/safe-cli?label=Docker\u0026sort=semver)](https://hub.docker.com/r/safeglobal/safe-cli)\n\n# Safe CLI\n\nSafe CLI is a command-line utility for Safe contracts. You can use it to manage your Safe account from the command line.\n\nIt does not rely on Safe{Core} API and can also be used in networks where Safe services are unavailable. Learn more through the [documentation](https://docs.safe.global/advanced/cli-overview).\n\n## Using Docker\n\n**Prerequisite:** Install [Docker Desktop](https://www.docker.com/products/docker-desktop/).\n\nOnce Docker is installed on your system, run the following command to create new Safe accounts:\n\n```bash\ndocker run -it safeglobal/safe-cli safe-creator\n```\n\nYou can also run the following command to run the Safe CLI with an existing Safe:\n```bash\ndocker run -it safeglobal/safe-cli safe-cli \u003cchecksummed_safe_address\u003e \u003cethereum_node_url\u003e\n```\n\n## Using Python PIP\n\n**Prerequisite:** [Python](https://www.python.org/downloads/) \u003e= 3.10 (Python 3.12 is recommended).\n\nOnce Python is installed on your system, run the following command to install Safe CLI:\n```bash\npip3 install -U safe-cli\n```\n\n## Usage\n\n### Safe-Cli\n\n```bash\nusage:\n safe-cli [--history] [--get-safes-from-owner] address node_url\n\n Examples:\n safe-cli 0x0000000000000000000000000000000000000000 https://sepolia.drpc.org\n safe-cli --get-safes-from-owner 0x0000000000000000000000000000000000000000 https://sepolia.drpc.org\n\n safe-cli --history 0x0000000000000000000000000000000000000000 https://sepolia.drpc.org\n safe-cli --history --get-safes-from-owner 0x0000000000000000000000000000000000000000 https://sepolia.drpc.org\n\n safe-cli send-ether 0xsafeaddress https://sepolia.drpc.org 0xtoaddress wei-amount --private-key key1 --private-key key2 --private-key keyN [--non-interactive]\n safe-cli send-erc721 0xsafeaddress https://sepolia.drpc.org 0xtoaddress 0xtokenaddres id --private-key key1 --private-key key2 --private-key keyN [--non-interactive]\n safe-cli send-erc20 0xsafeaddress https://sepolia.drpc.org 0xtoaddress 0xtokenaddres wei-amount --private-key key1 --private-key key2 --private-key keyN [--non-interactive]\n safe-cli send-custom 0xsafeaddress https://sepolia.drpc.org 0xtoaddress value 0xtxdata --private-key key1 --private-key key2 --private-key keyN [--non-interactive]\n\n safe-cli tx-builder 0xsafeaddress https://sepolia.drpc.org  ./path/to/exported/tx-builder/file.json --private-key key1 --private-key keyN [--non-interactive]\n\n╭─ Arguments ─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╮\n│ *    address       CHECKSUMADDRESS  The address of the Safe, or an owner address if --get-safes-from-owner is specified. [required]                                                                                                                                                                             │\n│ *    node_url      TEXT             Ethereum node url. [required]                                                                                                                                                                                                                                               │\n╰─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯\n╭─ Options ───────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╮\n│ --help          Show this message and exit.                                                                                                                                                                                                                                                                     │\n╰─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯\n╭─ Optional Arguments ────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╮\n│ --history                 --no-history                   Enable history. By default it's disabled due to security reasons [default: no-history]                                                                                                                                                                 │\n│ --get-safes-from-owner    --no-get-safes-from-owner      Indicates that address is an owner (Safe Transaction Service is required for this feature) [default: no-get-safes-from-owner]                                                                                                                          │\n╰─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯\n\n Commands available in unattended mode:\n\n send-ether\n send-erc20\n send-erc721\n send-custom\n tx-builder\n version\n\n Use the --help option of each command to see the usage options.\n```\n\nTo execute transactions unattended, or execute transactions from a json exported from the tx_builder you can use:\n\n```bash\nsafe-cli send-ether 0xsafeaddress https://sepolia.drpc.org 0xtoaddress wei-amount --private-key key1 --private-key key1 --private-key keyN --non-interactive\nsafe-cli send-erc721 0xsafeaddress https://sepolia.drpc.org 0xtoaddress 0xtokenaddres id --private-key key1 --private-key key2 --private-key keyN --non-interactive\nsafe-cli send-erc20 0xsafeaddress https://sepolia.drpc.org 0xtoaddress 0xtokenaddres wei-amount --private-key key1 --private-key key2 --private-key keyN --non-interactive\nsafe-cli send-custom 0xsafeaddress https://sepolia.drpc.org 0xtoaddress value 0xtxdata --private-key key1 --private-key key2 --private-key keyN --non-interactive\n\nsafe-cli tx-builder 0xsafeaddress https://sepolia.drpc.org  ./path/to/exported/tx-builder/file.json --private-key key1 --private-key keyN --non-interactive\n```\n\nIt is possible to use the environment variable `SAFE_CLI_INTERACTIVE=0` to avoid user interactions. The `--non-interactive` option have more priority than environment variable.\n\n### Safe-Creator\n\n```bash\nusage: safe-creator [-h] [-v] [--no-confirm] [--threshold THRESHOLD] [--owners OWNERS [OWNERS ...]] [--safe-contract SAFE_CONTRACT] [--proxy-factory PROXY_FACTORY] [--callback-handler CALLBACK_HANDLER] [--salt-nonce SALT_NONCE] [--without-events] [--generate-vanity-addresses] node_url private_key\n\nExample: safe-creator https://sepolia.drpc.org 0000000000000000000000000000000000000000000000000000000000000000\n\npositional arguments:\n  node_url              Ethereum node url\n  private_key           Deployer private_key\n\noptions:\n  -h, --help            show this help message and exit\n  -v, --version         Show program's version number and exit.\n  --no-confirm          Bypass any and all “Yes or no?” messages\n  --threshold THRESHOLD\n                        Number of owners required to execute transactions on the created Safe. It mustbe greater than 0 and less or equal than the number of owners\n  --owners OWNERS [OWNERS ...]\n                        Owners. By default it will be just the deployer\n  --safe-contract SAFE_CONTRACT\n                        Use a custom Safe master copy\n  --proxy-factory PROXY_FACTORY\n                        Use a custom proxy factory\n  --callback-handler CALLBACK_HANDLER\n                        Use a custom fallback handler. It is not required for Safe Master Copies with version \u003c 1.1.0\n  --salt-nonce SALT_NONCE\n                        Use a custom nonce for the deployment. Same nonce with same deployment configuration will lead to the same Safe address\n  --without-events      Use non events deployment of the Safe instead of the regular one. Recommended for mainnet to save gas costs when using the Safe\n  --generate-vanity-addresses\n                        Don't deploy the Safe, only generate addresses\n```\n\n#### Generate vanity addresses\n```bash\nsafe-creator https://sepolia.drpc.org $PRIVATE_KEY --generate-vanity-addresses --no-confirm\n```\n\n## Safe{Core} API/Protocol\n\n- [Safe Infrastructure](https://github.com/safe-global/safe-infrastructure)\n- [Safe Transaction Service](https://github.com/safe-global/safe-transaction-service)\n- [Safe Smart Account](https://github.com/safe-global/safe-smart-account)\n- [Safe Smart Account deployment info and addresses](https://github.com/safe-global/safe-deployments/tree/main/src/assets)\n\n## Setting up for developing\n\nIf you miss something and want to send us a PR:\n\n```bash\ngit clone https://github.com/safe-global/safe-cli.git\ncd safe-cli\nstat venv 2\u003e/dev/null || python3 -m venv venv\nsource venv/bin/activate \u0026\u0026 pip install -r requirements-dev.txt\npre-commit install -f\n```\n\nTo run the local version you can install it using:\n\n```bash\npip install .\n```\n\n## Contributors\n\n- [Pedro Arias Ruiz](https://github.com/AsiganTheSunk)\n- [Uxío Fuentefría](https://github.com/uxio0)\n- [Moisés Fernández](https://github.com/moisses89)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsafe-global%2Fsafe-cli","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsafe-global%2Fsafe-cli","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsafe-global%2Fsafe-cli/lists"}