npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

@lymei/code-forge

v1.3.0

Published

'Code-Forge is a command-line interface (CLI) tool designed to simplify the execution of boilerplate scripts and command-line commands. With Code-Forge, users can easily create and delete sets of commands for different programming languages, as well as de

Downloads

6

Readme

linux test windows test macos test npm

Code Forge CLI

Code Forge is a command-line interface (CLI) tool designed to simplify the execution of boilerplate scripts and command-line commands. With Code Forge, users can easily create and delete sets of commands for different programming languages, as well as define preset arguments to be passed with those commands.

Installation

To install Code Forge globally, run the following command:

npm install -g @lymei/code-forge

Configuration File

The configuration file for Code Forge, named code-forge.json, allows users to define languages, their associated commands, and preset arguments. Below is an example template for the configuration file:

{
	"languages": {
		"next": {
			"commands": {
				"create": "npx create-next-app@latest <dir>/<name> --ts --tailwind --eslint --app --src-dir --import-alias \"@/*\""
			},
			"args": {
				"dir": "C:\\Users\\Username\\Documents\\Projects\\Next.js"
			}
		},
		"customLanguage": {
			"commands": {
				"run": "run customLanguage <dir>/<name> <value>",
				"create": "npx create-my-app@latest <dir>/<name><optionOne><optionTwo>"
			},
			"args": {
				"dir": "C:/my/custom/language/directory",
				"optionOne": " --option-one",
				"optionTwo": " --option-two"
			}
		}
	}
}

Usage

Running Commands

To run a language command from your configuration file, use the following command:

code-forge run <language> <command> [arguments...]

Code Forge have 3 default alias: code-forge, cforge and coge

Replace with the name of the programming language, with the specific command to execute, and [arguments...] with any additional arguments required by the command.

If you have already set up a preset argument, you do NOT need to provide it. If you do provide it, only the latest argument will be applied

If you want to view all available commands for a specific language, omit the parameter:

code-forge run <language>

You can do the same to see the template of a single command:

code-forge run <language> <command>

Configuration Management

To manage your custom configuration file, you can use the config command:

code-forge config [options]

Available options include:

| Command | description | | ------------ | ---------------------------------------------------- | | -c, --create | Create your custom configuration file. | | -r, --remove | Remove your custom configuration file. | | -d, --dir | Show the directory of the custom configuration file. |

Example

Below is an example usage of Code Forge to create a new Next.js project using the predefined configuration:

code-forge run next create my-next-project

This command will execute the create command for Next.js, with the specified project name my-next-project, applying the preset arguments defined in the configuration file.

For more information and additional usage examples, please refer to the documentation or run code-forge --help.


Note: Make sure to replace placeholders such as <language>, <command>, <name>, <dir>, <optionsOne>, and <optionTwo> with actual values according to your project's needs.