{"id":35012598,"url":"https://github.com/lucabonamino/cli-tools","last_synced_at":"2026-03-15T22:16:45.899Z","repository":{"id":291867347,"uuid":"979044536","full_name":"LucaBonamino/cli-tools","owner":"LucaBonamino","description":"A set of small, self-contained command-line programs in C.","archived":false,"fork":false,"pushed_at":"2025-05-17T18:26:27.000Z","size":21,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-05-17T19:23:36.990Z","etag":null,"topics":["c","c-language","cli-commands","cli-tools","crc32","file-managment","hashing","poseidon-hash","sha256","sha512"],"latest_commit_sha":null,"homepage":"","language":"C","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/LucaBonamino.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"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,"zenodo":null}},"created_at":"2025-05-06T23:06:18.000Z","updated_at":"2025-05-17T18:26:24.000Z","dependencies_parsed_at":"2025-05-07T00:21:03.863Z","dependency_job_id":"ea71b7ee-ede4-452e-9741-33d95aca2134","html_url":"https://github.com/LucaBonamino/cli-tools","commit_stats":null,"previous_names":["lucabonamino/cli-tools"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/LucaBonamino/cli-tools","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/LucaBonamino%2Fcli-tools","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/LucaBonamino%2Fcli-tools/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/LucaBonamino%2Fcli-tools/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/LucaBonamino%2Fcli-tools/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/LucaBonamino","download_url":"https://codeload.github.com/LucaBonamino/cli-tools/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/LucaBonamino%2Fcli-tools/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28072692,"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","status":"online","status_checked_at":"2025-12-27T02:00:05.897Z","response_time":58,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"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":["c","c-language","cli-commands","cli-tools","crc32","file-managment","hashing","poseidon-hash","sha256","sha512"],"created_at":"2025-12-27T05:01:13.565Z","updated_at":"2025-12-27T05:03:07.361Z","avatar_url":"https://github.com/LucaBonamino.png","language":"C","funding_links":[],"categories":[],"sub_categories":[],"readme":"# cli-tools\nA collection of lightweight, self-contained command-line utilities written in C. Each tool is a single .c file in \u003ccode\u003esrc/\u003c/code\u003e, designed for easy compilation and instant use. Perfect for UNIX-style workflows—just build, drop into \u003ccode\u003e~/.local/bin\u003c/code\u003e (or \u003ccode\u003e/usr/local/bin\u003c/code\u003e), and run from anywhere.\n\n## Avaiable tools\n1. **`src/replace_spaces.c`**  \n   Rename files by replacing spaces with underscores.\n\n2. **`src/hashsum.c`**  \n   Compute a hash of input text using one of these algorithms:  \n   - `crc32`  \n   - `sha256`\n   - `sha512`  \n   - `sha1`  \n   - `md5`  \n   - `poseidon`\n   \n## Installation\n\nEach tool is a single `.c` file in `src/`. To compile and install:\n\n```bash\n# 1. Compile (example for replace_spaces.c)\ngcc -O2 -Wall -o replace_spaces src/replace_spaces.c\n\n# 2a. Install system‐wide (requires sudo)\nsudo mv replace_spaces /usr/local/bin/\n\n# 2b. Or install just for your user\nmkdir -p ~/.local/bin\nmv replace_spaces ~/.local/bin\n```\n## Usage\n\n### Replace spaces\n```bash\nreplace_spaces --help\nUsage: rename_spaces [-v|--verbose] [-d|--dir \u003cdirectory\u003e] [filename]\n```\n- \u003ccode\u003efilename\u003c/code\u003e: filename of file whose name to modify.\n- \u003ccode\u003edirectory\u003c/code\u003e: directory where to locate the files whose names are to be modified.\n\nIf both \u003ccode\u003efilename\u003c/code\u003e and \u003ccode\u003edirectory\u003c/code\u003e are provided, \u003ccode\u003edirectory\u003c/code\u003e is discarded.\n\n### Hashsum\nHash a text of the content of a file with one of the following alorithms\n- crc32\n- sha256\n- sha1\n- md5\n- poseidon\n\ncompile with \n```bash\ngcc -O2 -Wall -o hashsum src/hashsum.c -lssl -lcrypto -lz\n```\nexecute\n```bash\nhashsum --help\nUsage: ./hashsum [-a|--algorithm \u003csha1|sha256|sha512|md5|poseidon|checksum\u003e] [-f|--file \u003cfilename\u003e] [text]\n```\n- \u003ccode\u003etext\u003c/code\u003e: text to hash.\n- \u003ccode\u003ealgorithm\u003c/code\u003e: hashing algorithm to use.\n  - checksum: crc32\n  - sha256\n  - sha1\n  - md5\n  - poseidon sponge-like hash\n- \u003ccode\u003efile\u003c/code\u003e: file to hash.\n\nIf both \u003ccode\u003etext\u003c/code\u003e and \u003ccode\u003efile\u003c/code\u003e are provided, \u003ccode\u003efile\u003c/code\u003e is discarded.\u003c/br\u003e\n\n#### How to use Poseidon hash\nGet the poseidon required files from the repository [c-reference-signer](https://github.com/MinaProtocol/c-reference-signer).\n```bash\ngit clone https://github.com/MinaProtocol/c-reference-signer.git\n```\n\nCompile \u003ci\u003ehashsum.c\u003c/i\u003e providing the poseidon and crypto files\n\n```bash\ngcc -O2 -Wall \\\n    -I./c-reference-signer \\\n    -o hashsum \\\n    src/hashsum.c \\\n    c-reference-signer/poseidon.c         \\\n    c-reference-signer/crypto.c           \\\n    c-reference-signer/pasta_fp.c         \\\n    c-reference-signer/pasta_fq.c         \\\n    c-reference-signer/base10.c           \\\n    c-reference-signer/base58.c           \\\n    c-reference-signer/blake2b-ref.c      \\\n    c-reference-signer/curve_checks.c     \\\n    c-reference-signer/sha256.c           \\\n    c-reference-signer/utils.c            \\\n    -lcrypto -lz -lm\n```\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flucabonamino%2Fcli-tools","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Flucabonamino%2Fcli-tools","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flucabonamino%2Fcli-tools/lists"}