{"id":13397997,"url":"https://github.com/bit101/tinpig","last_synced_at":"2025-03-14T00:32:53.177Z","repository":{"id":146565610,"uuid":"125664818","full_name":"bit101/tinpig","owner":"bit101","description":"A fast, lightweight command line utility to create projects of any kind from templates.","archived":false,"fork":false,"pushed_at":"2023-09-04T21:20:33.000Z","size":749,"stargazers_count":28,"open_issues_count":1,"forks_count":4,"subscribers_count":6,"default_branch":"master","last_synced_at":"2024-10-01T06:58:07.776Z","etag":null,"topics":["boilerplate","project","project-creation","project-template","project-templates","scaffolding","template","templates"],"latest_commit_sha":null,"homepage":"","language":"JavaScript","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/bit101.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":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null}},"created_at":"2018-03-17T20:03:19.000Z","updated_at":"2024-07-24T00:30:12.000Z","dependencies_parsed_at":"2024-01-18T10:22:39.445Z","dependency_job_id":"6c1d0610-2e43-4cbd-9fb9-bcd34e08a780","html_url":"https://github.com/bit101/tinpig","commit_stats":null,"previous_names":[],"tags_count":13,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bit101%2Ftinpig","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bit101%2Ftinpig/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bit101%2Ftinpig/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bit101%2Ftinpig/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/bit101","download_url":"https://codeload.github.com/bit101/tinpig/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":243505163,"owners_count":20301565,"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":["boilerplate","project","project-creation","project-template","project-templates","scaffolding","template","templates"],"created_at":"2024-07-30T18:02:00.784Z","updated_at":"2025-03-14T00:32:52.320Z","avatar_url":"https://github.com/bit101.png","language":"JavaScript","funding_links":[],"categories":["JavaScript"],"sub_categories":[],"readme":"# tinpig Project Creator\n\ntinpig is a simple command line utility for quickly creating projects of any kind. Projects are created from templates which are collections of folders and files. The folders and files can contain special tokens that can be replaced with other values when the project is created. You can use an existing temple as-is, modify a template, or create your own from scratch.\n\n## Requirements\n\nYou'll need npm and an updated version of nodejs. Your version of nodejs should be 8.5.0 or higher, for the file copying functionality that was introduced at that point.\n\n## Installation\n\n``` shell\nnpm install -g tinpig\n```\n\n## Use\n\nTo create a new project, simply type `tinpig`. This will display a list of available templates for you to choose from.\n\n![screenshot](images/tinpig_01.png)\n\nWhen you choose a template, tinpig will ask you for a path for your new project. Enter a directory name to create a project with that name in the current directory, or an absolute or relative path to some other location.\n\nIf the template includes any replaceable tokens, you will be prompted to provide values for each token. Some tokens may have default values that will be displayed after the name of the token. Press enter to accept the default value, or type an alternate value. Some tokens may be marked as required and others may restrict certain characters to ensure they work correctly as file paths. You'll be notified if your replacement needs correction.\n\n![screenshot](images/tinpig_02.png)\n\ntinpig will then create the project at the specified location, performing all of the token replacment. And you are done, ready to use your new project.\n\n## Command line use\n\nIf you know the name of the template you want to use and/or the location at which you want to create your project, you can specify these values on the command line.\n\n``` shell\ntinpig --template HTML --path my_project`\n```\n\nor, more concisely:\n\n``` shell\ntinpig -t HTML -p my_project\n```\n\nYou can specify one, both, or neither of these values. If you only specify the template you'll be prompted for the path. If you only specify the path, you'll be prompted for a template.\n\nIf you specify the path and template, you'll still prompted to enter values for any tokens that may be included in the template.\n\nAlso see \"External template directories\" below for one more command line option.\n\n## Configuration\n\nAfter you install tinpig, run:\n\n``` shell\ntinpig --configure\n```\n\nThis will prompt you for a number of values:\n\n* user name\n* user email\n* custom templates dir\n* invalid path characters\n\nThe user name and email values can be used by templates to automatically insert your name or email into a project. Feel free to leave these at their default values. You can always edit them later if a project uses them.\n\nBy default, tinpig stores its templates in `~/.config/tinpig/templates/`. Setting a custom templates dir allows you to store the templates in another location of your choice. More on that later in this doc.\n\ntinpig templates can contain dynamic path and file names. If these are marked as paths, tinpig will make sure that the user enters a path name that will not cause problems. The set of invalid path characters listed here are pretty sensible, but you can customize them if you want.\n\nIf you ever want to reset the four config values described above, type:\n\n``` shell\ntinpig reset\n```\n\nThis will reset them all to their default values.\n\nAll of this data is stored in `~/.config/tinpig/config`. You can edit this file manually as well.\n\n## Existing content\n\nIf the project path you specify already holds a single existing file, you cannot create a project there, obviously.\n\nIf the project path is an existing directory, you will be warned of this fact. tinpig will never overwrite or alter existing content in a directory. If the template is attempting to create a file that has the same name as an existing file in that directory, that file will silently fail. Any other non-conflicting files should copy over just fine though. You should be aware of what files the template is creating and know if they will conflict with existing content.\n\n## Help\n\nType `tinpig -h` or `tinpig --help` to see a list of options.\n\nType `tinpig -l` or `tinpig --list` to see a list of available templates with descriptions.\n\n## Adding new templates\n\nAdditional templates will be posted at https://github.com/bit101/tinpig-templates .\n\nCheck out or download that repository and copy any templates you want into your local templates directory (`~/.config/tinpig/templates`) or custom templates dir if you set one. Again, feel free to customize them to make them fit your own use.\n\n## Creating new templates\n\nThere is a [template creation guide](https://github.com/bit101/tinpig/wiki/Tinpig-Template-Guide) on the wiki page. This details the process and all of the elements that go into making a template.\n\nAt its simplest, a template is simply a folder containing some files. But there are other features that can make templates more powerful.\n\nIf you create a nice template and want to share, submit it as a pull request at https://github.com/bit101/tinpig-templates .\n\n## Custom template directories\n\nYou can choose to store your templates in a directory other than `~/.config/tinpig/templates`. There are two ways to do this.\n\n### Changing the path permanently\n\nRun `tinpig configure` or edit the file `~/.config/tinpig/config` and change the `templatesDir` value to the path you want to store your templates. The next time tinpig starts, it will look there rather than the default location.\n\nNote, if you specify an empty directory, tinpig will copy the default sample templates there the first time it runs.\n\nIf you specify a directory that doesn't exist, it will be created and filled with the default sample templates.\n\n### Changing the path temporarily\n\nUse the `-d` or `--directory` parameter on the command line to point to the directory you want to use. e.g.:\n\n``` shell\ntinpig -d ~/my_templates\n```\n\nYou will be asked to choose a template from the ones available in that directory. Note that this directory is only used for this particular run of tinpig. It does not change the values stored in tinpig's configuration.\n\nNote that this method also works if you want to specify a template on the command line. Say `~/my_templates` contains a template named `GoProject`. You could say:\n\n``` shell\ntinpig -d ~/my_templates -t GoProject\n```\n\nYou can also list templates from a custom directory:\n\n``` shell\ntinpig -d ~/my_templates -l\n```\n\nThis will list all the templates in that location.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbit101%2Ftinpig","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fbit101%2Ftinpig","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbit101%2Ftinpig/lists"}