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

pataka-cli

v1.4.0

Published

command line tool for running a pataka instance

Downloads

103

Readme

pataka-cli

Usage

Install Node 14 LTS with e.g. nvm or nvm-windows

$ npm install -g pataka-cli
$ pataka

You will then see logged out:

  • web ui : the urls that the web ui can be accessed at
  • host : the hostname your pataka will be connected to over (you generally want this to be accessible on the internet)
  • port : the local port your pataka scuttelbutt instance will be listening on
  • feedId : the unique scuttlebutt id of this pataka (for debugging)
  • data : path to where data is being stored for this instance
  • config : path to where you can persist custom config

To use this in the cloud, you might like to launch it with a tool like: pm2

Config

You can modify which port and hostname are used if by editing the config file output above. Here's en example config (note all fields are optional)

{
  "port": 8068,
  "pataka": {
    "host": "mydomain.nz",
    "webPort": 6700,
    "inviteUses": 10,
    "log": false
  }
}

You can also use ENV VAR (these will over-ride the config file):

  • PORT (default: 8088)
  • PATAKA_HOST
  • PATAKA_WEB_PORT (default: 3000)
    • NOTE note sure port 80 will be will handled
  • PATAKA_LOG controls logging, set to true to enable
  • PATAKA_INVITE_USES
    • the pataka creates an invite code each time it's started, this specifies how many uses that code is valid for
    • (default: 1000)

NOTE: it's currently not only possible to set the local port the patkaka listens on - you cannot set the external port the invite code will use If this external port is different you can manually edit the port invite code.

NOTE: see pataka and ssb-pataka for configuration options for other features, like web-registration form

:warning: WARNING

This module currently exposes an admin web page without authentication. It allows:

  • setting the name of the pataka
  • generating single-use invites for the pataka

If you do not set config.pataka.webPort then this service will not be started up

TODO

  1. Add Authentication

  2. find a way to not commit the raw public/ folder

  3. Make it so you can upload profile images (may be broken atm?)

  4. There's an annoying error logged on startup. It's safe to ignore but looks scary, it needs tidying up

    Trace: deprecated api used: ssb-ref.parseAddress
        at Object.parseAddress (/home/username/.nvm/versions/node/v14.16.0/lib/node_modules/pataka-cli/node_modules/ssb-ref/index.js:99:15)
        at Object.<anonymous> (/home/username/.nvm/versions/node/v14.16.0/lib/node_modules/pataka-cli/node_modules/ssb-invite/index.js:97:24)
        at apply (/home/username/.nvm/versions/node/v14.16.0/lib/node_modules/pataka-cli/node_modules/muxrpc-validation/index.js:197:15)
        ...

Development

$ git clone https://gitlab.com/ahau/pataka-cli.git
$ cd pataka-cli
$ npm i
$ npm start

to start in development pataka env:

$ npm run dev

To update the dependencies to be in line with pataka

$ npm run syncDeps

(Assumes pataka and pataka-cli are in same folder)

To update the UI to be in line with pataka

$ cd ~/projects/pataka/ui
$ npm run build
$ cp -R ../dist ~/projects/pataka-cli/public