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

sh-browser

v1.0.0

Published

Self-Hosting browser

Downloads

4

Readme

Self-Host Browser (sh-browser)

Overview

Self-Host Browser (sh-browser) is a command-line interface (CLI) tool designed for managing self-hosted applications. It provides functionalities to install, update, run, and manage applications hosted in Git repositories. It also supports configuring autostart settings and managing application directories.

Table of Contents

Installation

To install sh-browser globally, you can use either npm or yarn:

npm install sh-browser -g

or

yarn global add sh-browser

Usage

To start the Self-Host Browser, run:

npx sh-browser

This command will launch the CLI, allowing you to interact with the application menu, manage installed apps, and configure settings.

Configuration

sh-browser uses a config.json file to store configuration settings. The configuration file includes:

  • downloadDirectory: The directory where applications will be downloaded.
  • runAfterInstall: A boolean flag indicating whether applications should be run immediately after installation.

You can specify these settings during the first run of the application, or update them via the settings menu.

Configuration File Structure

{
  "downloadDirectory": "/path/to/directory",
  "runAfterInstall": true
}

Features

  • Manage Applications: Install, update, run, and manage applications from Git repositories.
  • Autostart Configuration: Enable or disable autostart for applications.
  • Pagination and Search: Navigate through application lists with pagination and search functionality.
  • Settings Management: Update configuration settings, including the download directory and autostart options.
  • Clear Installed Apps: Remove all installed applications with a single command.

Commands

Start

npx sh-browser

Starts the application and opens the main menu.

Manage Applications

From the application menu, you can choose from the following actions for each application:

  • Install: Clone the repository and install dependencies.
  • Update: Pull the latest changes from the repository.
  • Run: Execute the application.
  • Enable Autostart: Set the application to start automatically on boot.
  • Disable Autostart: Remove the application from the autostart list.

Settings

Access the settings menu to:

  • Update Download Directory: Change the directory where applications are downloaded.
  • Toggle Autostart: Enable or disable running applications immediately after installation.
  • Clear Installed Apps: Remove all installed applications.

Configuration Files

config.json

The config.json file is used for storing configuration settings. Ensure this file is in the same directory as index.js.

apps.json

This file should be placed in the same directory as index.js and should include an array of applications you want to manage.

Example apps.json:

{
  "apps": [
    {
      "name": "MyApp",
      "description": "This is my application",
      "gitUrl": "https://github.com/yourusername/myapp.git",
      "installCommand": "npm install",
      "setupCommand": "npm run build",
      "startCommand": "npm start"
    }
  ]
}

Contributing

To contribute to sh-browser, please follow these steps:

  1. Fork the repository.
  2. Create a new branch for your feature or bug fix.
  3. Make your changes and test them thoroughly.
  4. Submit a pull request with a detailed description of your changes.

License

sh-browser is licensed under the MIT License. See LICENSE for details.