
Security News
How Enterprise Security Is Adapting to AI-Accelerated Threats
Socket CTO Ahmad Nassri discusses why supply chain attacks now target developer machines and what AI means for the future of enterprise security.
hops-local-cli
Advanced tools
This package is deprecated. Please use the hops (CLI) package instead.
hops-local-cli provides a set of commands to manage your hops project. hops-local-cli will be automatically installed in projects created by calling hops init (provided by hops-cli). In other projects it needs to be added as a dependency separately.
In case that it isn't already installed (such as an existing hops project) you can add hops-local-cli via npm or yarn:
npm install --save hops-local-cli
or
yarn add hops-local-cli
hops build - initiates a project build to generate browser and server JS bundleshops develop - starts the webpack development server with hot code reloading for fast local iterationshops serve - starts a production Node.js Express server using the generated JS bundle from hops buildhops start - if NODE_ENV is set to production, this runs hops serve. Otherwise hops develop gets executedhops build accepts additional arguments: --static / -s to generate static HTML app shells for all configured hops locations.
hops-local-cli only lists commands that are available through other hops packages.
So for example hops build and hops develop are only available if hops-build is installed as a dependency in your project (hops-template-react includes it by default).
The command hops serve is only available if hops-express is installed as a dependency in your project (also included in the default react template).
And the command hops start is only available if both hops-build and hops-express are installed as dependencies.
hops-local-cli is being configured through hops-config which in turn uses the npm config mechanism (read more at hops-config).
That means that while you can run hops commands independently and they will use the configuration from your package.json file, you cannot overwrite these values through npm config set ... in this mode. For that to work you need to run the hops-local-cli through your package.json scripts fields.
{
"name": "my-application",
"scripts": {
"start": "hops start"
},
"config": {
"hops:": {
"port": "3000"
}
}
}
npm config set my-application:hops:port 1337
And now you can execute the "start" command through npm or yarn:
npm start
yarn start
FAQs
CLI tool to build, run and develop Hops based projects
We found that hops-local-cli 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
Socket CTO Ahmad Nassri discusses why supply chain attacks now target developer machines and what AI means for the future of enterprise security.

Security News
Learn the essential steps every developer should take to stay secure on npm and reduce exposure to supply chain attacks.

Security News
Experts push back on new claims about AI-driven ransomware, warning that hype and sponsored research are distorting how the threat is understood.