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

@lightningrodlabs/we-dev-cli

v0.13.0-beta.5

Published

CLI to run Tools for the Weave in development mode

Downloads

96

Readme

we-dev-cli

CLI to run Moss Tools in development mode.

This version is compatible with @lightningrodlabs/[email protected].

Usage: @lightningrodlabs/we-dev-cli [options]

Running Moss Tools in development mode.

Options:
  -V, --version                output the version number
  -p, --profile <string>       Runs We with a custom profile with its own dedicated data store.
  -n, --network-seed <string>  Installs AppStore with the provided network seed in case AppStore has not been installed yet.
  -c, --dev-config <path>      Runs Moss in Tool developer mode based on the configuration file at the specified path.
  -b, --bootstrap-url <url>    URL of the bootstrap server to use. Must be provided if running in Tool dev mode with the --dev-config
                               argument.
  -s, --signaling-url <url>    URL of the signaling server to use. Must be provided if running in Tool dev mode with the --dev-config
                               argument.
  --force-production-urls      Explicitly allow using the production URLs of bootstrap and/or singaling server during Tool development. It
                               is recommended to use hc-local-services to spin up a local bootstrap and signaling server instead during
                               development.
  --agent-idx <number>         To be provided when running with the --dev-config option. Specifies which agent (as defined in the config file)
                               to run We for.
  -h, --help                   display help for command

Instructions

1. Define a config file

The config file specifies the groups and Tools to install and run. The following is an example of a config file that will let the we-dev-cli install one group with 3 Tools from different sources.

we.dev.config.ts:

import { defineConfig } from '@lightningrodlabs/we-dev-cli';

export default defineConfig({
  groups: [
    {
      name: 'Tennis Club',
      networkSeed: '098rc1m-09384u-crm-29384u-cmkj',
      icon: {
        type: 'filesystem',
        path: './example/ui/tennis_club.png',
      },
      creatingAgent: {
        agentIdx: 1,
        agentProfile: {
          nickname: 'Gaston',
          avatar: {
            type: 'filesystem',
            path: './example/ui/gaston.jpeg',
          },
        },
      },
      joiningAgents: [
        {
          agentIdx: 2,
          agentProfile: {
            nickname: 'Marsupilami',
            avatar: {
              type: 'filesystem',
              path: './example/ui/marsupilami.jpeg',
            },
          },
        },
      ],
      applets: [
        {
          name: 'Example Tool',
          instanceName: 'Example Tool',
          registeringAgent: 1,
          joiningAgents: [2],
        },
        {
          name: 'Example Tool Hot Reload',
          instanceName: 'Example Tool Hot Reload',
          registeringAgent: 1,
          joiningAgents: [2],
        },
        {
          name: 'notebooks',
          instanceName: 'notebooks',
          registeringAgent: 1,
          joiningAgents: [2],
        },
      ],
    },
  ],
  applets: [
    {
      name: 'Example Tool',
      subtitle: 'Just an Example',
      description: 'Just an example Tool to show the various affordances of Moss',
      icon: {
        type: 'filesystem',
        path: './example/ui/icon.png',
      },
      source: {
        type: 'filesystem',
        path: './example/workdir/example-tool.webhapp',
      },
    },
    {
      name: 'Example Tool Hot Reload',
      subtitle: 'Just an Example',
      description: 'Just an example Tool to show the various affordances of Moss',
      icon: {
        type: 'filesystem',
        path: './example/ui/icon.png',
      },
      source: {
        type: 'localhost',
        happPath: './example/workdir/example-tool.happ',
        uiPort: 8888,
      },
    },
    {
      name: 'notebooks',
      subtitle: 'Collaborative note taking',
      description: 'Real-time notetaking based on syn',
      icon: {
        type: 'https',
        url: 'https://lightningrodlabs.org/projects/notebooks.png',
      },
      source: {
        type: 'https',
        url: 'https://github.com/lightningrodlabs/notebooks/releases/download/v0.0.8/notebooks.webhapp',
      },
    },
  ],
});

2. Run Agents

To run an agent defined in the config file, you need to pass the --agent-idx option (if not specified it will default to agentIdx=1).

Run agent 1:

we-dev-cli --agent-idx 1

Run agent 2:

we-dev-cli --agent-idx 2