{"id":29191266,"url":"https://github.com/ryanuo/tmpl-cli","last_synced_at":"2026-02-14T02:34:18.033Z","repository":{"id":283107615,"uuid":"950085881","full_name":"ryanuo/tmpl-cli","owner":"ryanuo","description":"Convenient project template management tool, quickly clone templates from Git repositories","archived":false,"fork":false,"pushed_at":"2025-03-28T06:06:24.000Z","size":38,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-06-04T06:41:45.040Z","etag":null,"topics":["rust","template","tmpl-cli","web"],"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/ryanuo.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}},"created_at":"2025-03-17T15:56:30.000Z","updated_at":"2025-03-28T06:06:27.000Z","dependencies_parsed_at":"2025-03-18T16:29:54.178Z","dependency_job_id":"52869886-9211-4d15-aa86-34fa3c4a9bdb","html_url":"https://github.com/ryanuo/tmpl-cli","commit_stats":null,"previous_names":["ryanuo/tmpl-cli"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/ryanuo/tmpl-cli","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ryanuo%2Ftmpl-cli","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ryanuo%2Ftmpl-cli/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ryanuo%2Ftmpl-cli/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ryanuo%2Ftmpl-cli/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ryanuo","download_url":"https://codeload.github.com/ryanuo/tmpl-cli/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ryanuo%2Ftmpl-cli/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":263056029,"owners_count":23406805,"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":["rust","template","tmpl-cli","web"],"created_at":"2025-07-02T00:31:05.000Z","updated_at":"2026-02-14T02:34:12.967Z","avatar_url":"https://github.com/ryanuo.png","language":"Rust","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Template CLI 🚀\n\nA convenient project template management tool to quickly clone templates from Git repositories.\n\n## Features\n\n- ✅ Interactive template selection\n- ✅ Flexible configuration via command-line arguments\n- ✅ Intelligent cache configuration management\n- ✅ Support for branch specification and directory renaming\n- ⚡ Support for native JSON project selection mode\n\n## Installation\n\n### Install via Cargo\n\n```bash\ncargo install --path .\n```\n\n### Manual Build\n\n```bash\ngit clone https://github.com/your-repo/project-template.git\ncd project-template\ncargo build --release\n```\n\n## User Guide\n\n### Basic Command Structure\n\n```bash\ntemplate-cli [options]\n```\n\n### Quick Start Examples\n\n```bash\n# Clone a template project (interactive selection)\ntemplate-cli https://github.com/my-repo/templates\n\n# Clone with specified parameters\ntemplate-cli -r https://github.com/my-repo -b dev -d ./new-project -t my_template\n\n# View cache configuration\ntemplate-cli -x\n\n# Use native project selection mode\ntemplate-cli --original https://github.com/my-repo.json\n```\n\n## Parameter Description\n\n| Parameter             | Description                     | Default Value |\n| --------------------- | -------------------------------- | ------------- |\n| `-r, --repo`          | Git repository URL to clone     | -             |\n| `-b, --branch`        | Git branch name                 | main          |\n| `-d, --target-dir`    | Target directory for the template | Current directory |\n| `-t, template`        | Specific template name to use   | Interactive selection |\n| `-o, --original`      | Use native JSON configuration source | -         |\n| `-c, --clear-cache`   | Clear configuration cache       | -             |\n| `-x, --check-cache`   | View saved configuration cache  | -             |\n\n### Advanced Parameters\n\n- **Intelligent Cache**:  \n  Automatically saves recently used repository, branch, and other configurations. These will be prioritized on subsequent uses.\n\n  - View cache: `template-cli -x`\n  - Clear cache: `template-cli -c`\n\n- **Native Project Selection Mode**:  \n  Use the `--original` parameter to specify the JSON configuration file URL. This will display a selection interface like the following:\n  eg: `--original https://raw.githubusercontent.com/ryanuo/tmpl-cli/refs/heads/main/.tmpl-cli/data.json`\n  ```bash\n  Category:\n  1. Frontend Projects\n  2. Backend Projects\n\n  Select a category (default: Frontend Projects):\n  ```\n\n## Workflow\n\n1. User inputs parameters or selects interactive mode.\n2. Determine the repository information to clone based on parameters/cache.\n3. Clone the repository from the specified branch to a temporary directory.\n4. Display the available template list for user selection.\n5. Copy the selected template to the target path.\n6. Automatically clean up temporary files and output a success message.\n\n## FAQ\n\n**Q: Where is the cache stored?**\n\n```bash\n~/.tmpl-cli/{.template_cli_cache.json}\n```\n\n**Q: How to completely reset the configuration?**\n\n```bash\nrm -rf ~/.tmpl-cli \u0026\u0026 template-cli --clear-cache\n```\n\n**Q: Supported template repository structure?**\n\n```\n\u003crepository\u003e/\n├── template1/\n├── template2/\n└── .gitignore\n```\n\n## Developer Guide\n\n### Code Structure\n\n```\nsrc/\n├── cache.rs    # Cache module\n├── cli.rs      # Command-line parsing\n├── errors.rs   # Error handling\n├── git.rs      # Git operations\n├── original.rs # Native mode implementation\n├── utils.rs    # Utility methods\n└── template.rs # Core template processing\n```\n\n### Contribution Guide\n\n1. Fork this repository.\n2. Create a feature branch: `git checkout -b feature/X`.\n3. Implement the feature and test it.\n4. Create a Pull Request.","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fryanuo%2Ftmpl-cli","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fryanuo%2Ftmpl-cli","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fryanuo%2Ftmpl-cli/lists"}