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

@theweave/cli

v0.13.0-rc.0

Published

CLI to run Tools for the Weave in development mode

Downloads

426

Readme

@theweave/cli

CLI to run Moss Tools in development mode.

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

Usage: @theweave/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 We in applet developer mode based on the configuration file at the specified path.
  --dev-data-dir <path>          Override the directory in which conductor data is stored in dev mode (default is a folder in the
                                 temp directory). Data in this directory will be cleaned up automatically.
  --holochain-path <path>        Runs the Holochain Launcher with the holochain binary at the provided path. Use with caution since
                                 this may potentially corrupt your databases if the binary you use is not compatible with existing
                                 databases.
  --holochain-rust-log <string>  RUST_LOG value to pass to the holochain binary
  --holochain-wasm-log <string>  WASM_LOG value to pass to the holochain binary
  --lair-rust-log <string>       RUST_LOG value to pass to the lair keystore binary
  -b, --bootstrap-url <url>      URL of the bootstrap server to use (not persisted across restarts).
  -s, --signaling-url <url>      URL of the signaling server to use (not persisted across restarts).
  --ice-urls <string>            Comma separated string of ICE server URLs to use. Is ignored if an external holochain binary is
                                 being used (not persisted across restarts).
  --force-production-urls        Explicitly allow using the production URLs of bootstrap and/or singaling server during applet
                                 development. It is recommended to use hc-local-services to spin up a local bootstrap and signaling
                                 server instead during development.
  --print-holochain-logs         Print holochain logs directly to the terminal (they will be still written to the logfile as well)
  --disable-os-notifications     Disables all notifications to the Operating System
  --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. The agent with agentIdx 1 always needs to be run first.
  --sync-time <number>           May be provided when running with the --dev-config option. Specifies the amount of time to wait for
                                 new tools to gossip after having installed a new group before checking for unjoined tools.
  -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 @theweave/cli install one group with 3 Tools from different sources.

weave.dev.config.ts:

import { defineConfig } from '@theweave/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:

weave --agent-idx 1

Run agent 2:

weave --agent-idx 2