{"id":51033804,"url":"https://github.com/nguyenpanda/nptmpl","last_synced_at":"2026-06-22T03:02:08.224Z","repository":{"id":362790517,"uuid":"1259769417","full_name":"nguyenpanda/nptmpl","owner":"nguyenpanda","description":"Professional distributed CLI template manager and registry server.","archived":false,"fork":false,"pushed_at":"2026-06-14T19:39:53.000Z","size":307,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2026-06-14T21:23:20.927Z","etag":null,"topics":["cli-tool","developer-tools","fastapi","python3","template-manager"],"latest_commit_sha":null,"homepage":"https://nptmpl.nguyenpanda.com","language":"Python","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/nguyenpanda.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,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2026-06-04T20:55:48.000Z","updated_at":"2026-06-14T19:39:57.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/nguyenpanda/nptmpl","commit_stats":null,"previous_names":["nguyenpanda/nptmpl"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/nguyenpanda/nptmpl","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nguyenpanda%2Fnptmpl","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nguyenpanda%2Fnptmpl/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nguyenpanda%2Fnptmpl/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nguyenpanda%2Fnptmpl/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/nguyenpanda","download_url":"https://codeload.github.com/nguyenpanda/nptmpl/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nguyenpanda%2Fnptmpl/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":34632723,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-26T15:22:16.424Z","status":"online","status_checked_at":"2026-06-22T02:00:06.391Z","response_time":106,"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":["cli-tool","developer-tools","fastapi","python3","template-manager"],"created_at":"2026-06-22T03:02:06.089Z","updated_at":"2026-06-22T03:02:08.219Z","avatar_url":"https://github.com/nguyenpanda.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"\u003c!DOCTYPE html\u003e\n\u003chtml lang=\"en\"\u003e\n    \u003cbody\u003e\n        \u003cp\u003e\u003cimg alt=\"nguyenpanda logo\" src=\"src/nptmpl/server/static/media/png/nguyenpanda_black_bg.png\" /\u003e\u003c/p\u003e\n    \u003c/body\u003e\n\u003c/html\u003e\n\n# 🐼 nptmpl - Distributed CLI Template Manager\n\n[![PyPI version](https://img.shields.io/pypi/v/nptmpl.svg)](https://pypi.org/project/nptmpl/)\n[![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)\n[![Python 3.10+](https://img.shields.io/badge/python-3.10+-blue.svg)](https://www.python.org/downloads/)\n\n`nptmpl` is a high-performance, distributed CLI template manager designed for professional software engineers. It automates boilerplate generation with a robust local registry, versioning, Jinja2-powered variable injection, and seamless remote HTTP/SSH registry support.\n\n---\n\n## 🌐 Public Registry\n\nWe host an official template registry for the community! Browse, search, and clone templates directly from our public instance.\n\n- **Web UI**: [https://nptmpl.nguyenpanda.com](https://nptmpl.nguyenpanda.com)\n- **API Endpoint**: `https://nptmpl.nguyenpanda.com/api/v1/templates`\n\n---\n\n## ✨ Features\n\n- **Distributed Registry**: Host your own private registry with a Web UI and REST API.\n- **Enterprise-Grade Security**: Built-in path traversal mitigation, automatic tarball memory limits (max 1MB payload inspection), and robust `paramiko` SSH policies.\n- **Blazing Fast Concurrency**: Server runs SQLite operations within thread pools using Write-Ahead Logging (WAL) to guarantee non-blocking AsyncIO loops.\n- **Smart Compression**: Optimized `tar.gz` archives preserving symlinks and permissions.\n- **Dynamic Injection**: Full Jinja2 support for contents and paths, automatically skipping binary files.\n- **Post-Clone Hooks**: Automatically run shell commands after cloning.\n- **Auto-Discovery**: Respects `.gitignore` and global patterns via `pathspec`.\n\n---\n\n## 🛠️ Installation \u0026 Setup\n\n### Option 1: Install via `uv` (Fastest)\n\n`nptmpl` uses [uv](https://github.com/astral-sh/uv) for lightning-fast installation.\n\n```bash\nuv tool install nptmpl\n```\n\n### Option 2: Install via `pip`\n\nIf you don't use `uv`, you can install standardly from PyPI:\n\n```bash\npip install nptmpl\n```\n\n### Option 3: Install from Source\n\nIdeal for development or contributing to `nptmpl`.\n\n**Using `uv` (Recommended)**:\n\n```bash\n# Clone the repository\ngit clone https://github.com/nguyenpanda/nptmpl\ncd nptmpl\n\n# Install as a global tool in editable mode\nuv tool install --editable . --force\n```\n\n**Using `pip`**:\n\n```bash\n# Clone the repository\ngit clone https://github.com/nguyenpanda/nptmpl\ncd nptmpl\n\n# Install in editable mode\npip install -e .\n```\n\n### 2. Enable Tab Completion (Recommended)\n\n```bash\n# Install completion helper\nuv tool install argcomplete\n\n# Add to your ~/.zshrc or ~/.bashrc\neval \"$(register-python-argcomplete nptmpl)\"\n```\n\n---\n\n## 📖 Usage Guide\n\n### 1. Initialize a Template\n\n```bash\nnptmpl init ./my-project\n```\n\n### 2. Add to Local Registry\n\n```bash\nnptmpl add ./my-project web/starter\n```\n\n### 3. Clone and Render\n\n```bash\nnptmpl clone web/starter ./new-app --var project_name=\"My App\"\n```\n\n### 4. Remote Operations\n\nPush to server (requires authentication token):\n\n```bash\nnptmpl push web/starter https://registry.example.com\n```\n\nSearch and clone from remote:\n\n```bash\nnptmpl search fullstack --remote https://registry.example.com\nnptmpl clone https://registry.example.com/api/v1/templates/web/starter ./my-app\n```\n\n---\n\n## 🏗️ Variable Injection (Jinja2)\n\n`nptmpl` leverages the full power of [Jinja2](https://jinja.palletsprojects.com/) to make your templates dynamic. It safely skips binary files to avoid corruption.\n\n### 1. Define Variables\n\nIn your project's `.nptmpl` file (created via `nptmpl init`), define the variables you want to prompt for:\n\n```yaml\nvariables:\n  project_name: \"The human-readable name of your project\"\n  author_name: \"The main developer's name\"\n  enable_docker: \"Set to 'true' to include Dockerfile\"\n```\n\n### 2. Use in File Content\n\nUse the standard `{{ variable_name }}` syntax inside any file in your template:\n\n```python\n# settings.py\nPROJECT_NAME = \"{{ project_name }}\"\nAUTHOR = \"{{ author_name }}\"\n```\n\n### 3. Use in Filenames \u0026 Directories\n\nYou can also use variables in the names of files and folders. For example:\n\n- `src/{{ project_name }}/main.py`\n- `docs/{{ author_name }}_guide.md`\n\n### 4. Provide Variables via CLI\n\nWhen cloning, use the `--var` (or `-v`) flag:\n\n```bash\nnptmpl clone web/starter ./my-new-app -v project_name=\"My Cool App\" -v author_name=\"Alice\"\n```\n\nIf a variable is defined in `.nptmpl` but not provided via the CLI, `nptmpl` will **interactively prompt** you for its value.\n\n---\n\n## ⚙️ Configuration\n\n`nptmpl` looks for `~/.config/nptmpl/config.yaml`. See the exhaustive [Configuration Guide](docs/CONFIGURATION.md) for all available options.\n\n```yaml\ncore:\n  store_path: \"$HOME/.local/share/nptmpl/db\"\n  auth_token: \"your-secure-api-token\" # Required for pushing to server\n  \ndefaults:\n  author: \"Your Name\"\n  email: \"you@example.com\"\n  license: \"MIT\"\n```\n\n---\n\n## 📄 License\n\nMIT License. See [LICENSE](LICENSE) for details.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnguyenpanda%2Fnptmpl","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fnguyenpanda%2Fnptmpl","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnguyenpanda%2Fnptmpl/lists"}