{"id":42317814,"url":"https://github.com/ekkolon/cargo-rename","last_synced_at":"2026-02-09T10:05:33.356Z","repository":{"id":334876994,"uuid":"1129873671","full_name":"ekkolon/cargo-rename","owner":"ekkolon","description":"Rename Cargo packages with confidence","archived":false,"fork":false,"pushed_at":"2026-02-06T19:18:50.000Z","size":125,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2026-02-07T04:20:59.348Z","etag":null,"topics":["cargo-subcommand","cli","refactor","renamer-utility","rust"],"latest_commit_sha":null,"homepage":"https://docs.rs/cargo-rename","language":"Rust","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/ekkolon.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE-APACHE","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,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null},"funding":{"github":"ekkolon"}},"created_at":"2026-01-07T17:51:33.000Z","updated_at":"2026-02-06T19:27:56.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/ekkolon/cargo-rename","commit_stats":null,"previous_names":["ekkolon/cargo-rename"],"tags_count":7,"template":false,"template_full_name":null,"purl":"pkg:github/ekkolon/cargo-rename","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ekkolon%2Fcargo-rename","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ekkolon%2Fcargo-rename/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ekkolon%2Fcargo-rename/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ekkolon%2Fcargo-rename/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ekkolon","download_url":"https://codeload.github.com/ekkolon/cargo-rename/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ekkolon%2Fcargo-rename/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":29261651,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-02-09T04:11:57.159Z","status":"ssl_error","status_checked_at":"2026-02-09T04:11:56.117Z","response_time":56,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"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":["cargo-subcommand","cli","refactor","renamer-utility","rust"],"created_at":"2026-01-27T12:30:14.065Z","updated_at":"2026-02-09T10:05:33.351Z","avatar_url":"https://github.com/ekkolon.png","language":"Rust","funding_links":["https://github.com/sponsors/ekkolon"],"categories":[],"sub_categories":[],"readme":"# cargo-rename\n\n[![Crates.io](https://img.shields.io/crates/v/cargo-rename.svg)](https://crates.io/crates/cargo-rename)\n[![Documentation](https://docs.rs/cargo-rename/badge.svg)](https://docs.rs/cargo-rename)\n[![License](https://img.shields.io/crates/l/cargo-rename.svg)](LICENSE)\n\n`cargo-rename` performs an atomic rename of a Cargo package, updating all references throughout your workspace in a single operation.\n\nIt updates `[package].name` and all dependency references in manifests across workspace members, and rewrites `use` statements, qualified paths, and crate references in Rust source files. Optionally, it can rename the package directory to match the new name or move it to a different location.\n\n**Atomicity**\n\nAll modifications are performed atomically. Each file write and directory move is tracked, and if any operation fails, all changes are rolled back to restore the project to its original state.\n\n**Preconditions**\n\nBy default, the following checks must pass before execution:\n\n- `cargo metadata` resolves without errors.\n- The new name is a valid Rust crate identifier.\n- The git working tree is clean (no uncommitted changes).\n\n## Installation\n\n```bash\ncargo install cargo-rename\n```\n\n## Usage\n\n```bash\n# Rename the package name only (directory stays the same)\ncargo rename old-crate new-crate\n\n# Move the package directory only (package name unchanged)\ncargo rename old-crate --move new-location\n\n# Rename both package name and move directory\ncargo rename old-crate new-crate --move new-location\n\n# Move to a different directory with the new package name\ncargo rename old-crate new-crate --move\n\n# Move to a nested path\ncargo rename old-crate --move libs/core/new-crate\n\n# Preview changes without writing anything\ncargo rename old-crate new-crate --dry-run\n\n# Skip confirmation prompt\ncargo rename old-crate new-crate --yes\n\n# Allow operation with uncommitted git changes\ncargo rename old-crate new-crate --allow-dirty\n```\n\n## CLI Reference\n\n```txt\nUsage: cargo rename [OPTIONS] \u003cOLD_NAME\u003e [NEW_NAME]\n\nArguments:\n  \u003cOLD_NAME\u003e  Current name of the package\n  [NEW_NAME]  New name for the package (optional if only moving)\n\nOptions:\n      --move [\u003cDIR\u003e]          Move the package to a new directory\n      --manifest-path \u003cPATH\u003e  Path to workspace Cargo.toml\n  -n, --dry-run               Preview changes without applying them\n  -y, --yes                   Skip interactive confirmation\n      --allow-dirty           Allow operation with uncommitted git changes\n      --color \u003cWHEN\u003e          Control color output [default: auto] [possible values:\n                              auto, always, never]\n  -q, --quiet...              Decrease logging verbosity\n  -v, --verbose...            Increase logging verbosity (-v, -vv, -vvv)\n  -h, --help                  Print help (see more with '--help')\n  -V, --version               Print version\n```\n\n## Library Usage\n\nYou can also use `cargo-rename` programmatically.\n\n```rust\nuse cargo_rename::{execute, RenameArgs};\nuse std::path::PathBuf;\n\nfn main() -\u003e cargo_rename::Result\u003c()\u003e {\n    let args = RenameArgs {\n        old_name: \"old-crate\".into(),\n        new_name: Some(\"new-crate\".into()),\n        outdir: Some(Some(PathBuf::from(\"libs/new-crate\"))),\n        manifest_path: None,\n        dry_run: false,\n        skip_confirmation: true,\n        allow_dirty: false,\n    };\n\n    execute(args)?;\n    Ok(())\n}\n```\n\n## Limitations\n\n- **Binaries**: `[[bin]]` targets are not renamed to preserve binary compatibility.\n- **Macros**: Identifiers generated dynamically inside macros may not be detected.\n\n## License\n\nLicensed under either of [MIT](LICENSE-MIT) or [Apache-2.0](LICENSE-APACHE)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fekkolon%2Fcargo-rename","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fekkolon%2Fcargo-rename","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fekkolon%2Fcargo-rename/lists"}