
Security News
Meet Socket at Black Hat and DEF CON 2025 in Las Vegas
Meet Socket at Black Hat & DEF CON 2025 for 1:1s, insider security talks at Allegiant Stadium, and a private dinner with top minds in software supply chain security.
Create, store, and use scaffolding templates from a single, easy to use CLI.
Code Forge is designed to allow you to easily create new scaffolded projects using your own templates. This project was conceived after the n-th time I installed an express app using their cli only to convert all the es5 code to es6.
It is also extremely useful for companies which have specific scaffolds for new projects, and it automates several minor project setup tasks.
npm i -g code-forge
Code forge relies on additional cli tools which are in common use, but for the sake of documentation are listed here: git, node, and npm.
npm init
while maintaining the rest of the original project.json file.forge <command> (options)
build help info init load-remote ls rm set
Alias for init
List the summary version of available commands:
forge help
List specific help for a given command:
forge help <command>
List template details. For local templates this includes file count and total size for both the project files only and the entire project including the project's node_modules folder. .gitignore affects the results
Templates from git repos do not include size information as none is available.
forge info <template name>
Init retrieves the code within the template specified and installs it into the target directory if one is provided, or the current directory if none is provided. For safety it will only do so if the target directory is empty.
forge init <template name> (target directory)
# Target the current directory
forge init company-express-template
# -or-
forge init company-express-template .
# Target a sub-directory that may or may not already exist
forge init company-express-template super-project
This command allows you to load an existing set of templates into your template database. This is useful for teams which desire to maintain a common list of templates.
In the case of a template name conflict the command will prompt the user to pick the template source they wish to keep. It will ignore templates which are exact matches, and add any new templates to the local template database.
forge load-remote <url>
Lists the templates which have been installed to the local machine.
forge ls
Remove an existing template from the template database. This will not remove local files or remote repos, just remove forge's reference to them.
forge rm <template name>
Set associates a path or git repo with a template name. Therefore if you set a template name of awesome-scaffold
to a directoy of /code/scaffold-code
, the user could subsequently install all the code within /code/scaffold-code
with the init
command.
forge set <template name> <path or repo url>
forge set awesome-scaffold /code/scaffold-code
# Now you can install the scaffold with
cd working-code/projects
forge init awesome-scaffold new-project
# All the code will be installed
# the project.json will be configured
# and npm init will be run
ls
and info
even for repo templates (this would populate after the first time they were installed in the case of repos)FAQs
Create, store, and use scaffolding templates from a single, easy to use CLI.
We found that code-forge demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Meet Socket at Black Hat & DEF CON 2025 for 1:1s, insider security talks at Allegiant Stadium, and a private dinner with top minds in software supply chain security.
Security News
CAI is a new open source AI framework that automates penetration testing tasks like scanning and exploitation up to 3,600× faster than humans.
Security News
Deno 2.4 brings back bundling, improves dependency updates and telemetry, and makes the runtime more practical for real-world JavaScript projects.