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

jamsocket

v0.10.4

Published

A CLI for the Jamsocket platform

Downloads

520

Readme

Jamsocket CLI

A CLI for the Jamsocket platform

Version Discord License

Install

We recommend you use npx jamsocket to run the Jamsocket CLI without explicitly installing it. You may also install it locally within a project using npm install jamsocket.

Authentication

Run npx jamsocket login.

If you want to use the Jamsocket CLI from an automated environment (e.g. a CI/CD pipeline), you can authenticate with an access token by running npx jamsocket login --token [ACCESS_TOKEN]. You can manage and generate access tokens from the Jamsocket Settings page.

Commands

jamsocket backend info BACKEND

Retrieves information about a backend given a Backend ID.

USAGE
  $ jamsocket backend info [BACKEND]

DESCRIPTION
  Retrieves information about a backend given a Backend ID.

EXAMPLES
  $ jamsocket backend info a8m32q

jamsocket backend list

List running backends for the logged-in user

USAGE
  $ jamsocket backend list

DESCRIPTION
  List running backends for the logged-in user

EXAMPLES
  $ jamsocket backend list

jamsocket backend logs BACKEND

Stream logs from a running backend.

USAGE
  $ jamsocket backend logs [BACKEND]

ARGUMENTS
  BACKEND  The backend ID, a random string of letters and numbers returned by the connect command.

DESCRIPTION
  Stream logs from a running backend.

ALIASES
  $ jamsocket logs

EXAMPLES
  $ jamsocket backend logs f7em2

jamsocket backend metrics BACKEND

Stream metrics from a running backend

USAGE
  $ jamsocket backend metrics [BACKEND]

ARGUMENTS
  BACKEND  The backend ID, a random string of letters and numbers returned by the connect command.

DESCRIPTION
  Stream metrics from a running backend

EXAMPLES
  $ jamsocket backend metrics f7em2

jamsocket backend terminate BACKENDS

Terminates one or more backends given the backend ID(s).

USAGE
  $ jamsocket backend terminate [BACKENDS] [-f]

FLAGS
  -f, --force  whether to force the backend to hard terminate (defaults to false)

DESCRIPTION
  Terminates one or more backends given the backend ID(s).

ALIASES
  $ jamsocket terminate

EXAMPLES
  $ jamsocket backend terminate abc123 def456 ...

jamsocket connect SERVICE

Gets a URL that can be used to connect to a session backend. Will spawn a new session backend if no key (aka lock) is provided or if no session backend is currently holding the provided key.

USAGE
  $ jamsocket connect [SERVICE] [-e <value>] [-t <value>] [-c <value>] [-i <value>] [-l <value>] [-k <value>]
    [-u <value>] [-a <value>] [--spawn]

ARGUMENTS
  SERVICE  Name of service to spawn.

FLAGS
  -a, --auth=<value>                    Optional serialized JSON to be passed to a session backend when connecting with
                                        the returned URL/connection string.
  -c, --cluster=<value>                 The cluster to to spawn the backend in (only relevant if you are running
                                        multiple clusters with Jamsocket).
  -e, --env=<value>...                  optional environment variables to pass to the container
  -i, --max-idle-seconds=<value>        The max time in seconds a session backend should wait after last connection is
                                        closed before shutting down container (default is 300)
  -k, --key=<value>                     If provided, fetches the session backend currently holding the given key
                                        (formerly known as a "lock"). If no session backend holds the key, or if a key
                                        is not provided, a new session backend will be spawned.
  -l, --lifetime-limit-seconds=<value>  The max time in seconds the session backend should be allowed to run.
  -t, --tag=<value>                     An optional image tag or image digest to use when spawning a backend.
  -u, --user=<value>                    Optional username to be associated with the URL/connection string returned by
                                        the connect command.
  --[no-]spawn                          Whether to spawn a new session backend if no session backend is currently
                                        holding the provided key.

DESCRIPTION
  Gets a URL that can be used to connect to a session backend. Will spawn a new session backend if no key (aka lock) is
  provided or if no session backend is currently holding the provided key.

ALIASES
  $ jamsocket connect

EXAMPLES
  $ jamsocket connect my-service

  $ jamsocket connect my-service -k my-key

  $ jamsocket connect my-service -t my-tag

  $ jamsocket connect my-service -e SOME_ENV_VAR=foo -e ANOTHER_ENV_VAR=bar

  $ jamsocket connect my-service -i 60

  $ jamsocket connect my-service -l 300

  $ jamsocket connect my-service --no-spawn

  $ jamsocket connect my-service -u my-user -a '{"foo":"my-json-data"}'

jamsocket dev

Starts a local jamsocket dev server. You may configure the dev server with a jamsocket.config.json file in the current directory or by passing flags. (Flags take precedence over jamsocket.config.json)

USAGE
  $ jamsocket dev [-f <value>] [-c <value>] [-w <value>] [-p <value>] [-i] [--style-log-output]

FLAGS
  -c, --context=<value>     Path to the build context for the Dockerfile (defaults to current working directory)
  -f, --dockerfile=<value>  Path to the session backend's Dockerfile
  -i, --[no-]interactive    Enables/Disables TTY iteractivity. (Defaults to true)
  -p, --port=<value>        The port to run the dev server on. (Defaults to 8080)
  -w, --watch=<value>...    A file or directory to watch for changes
  --[no-]style-log-output   Styles log output from session backends for better readability. (Defaults to true)

DESCRIPTION
  Starts a local jamsocket dev server. You may configure the dev server with a jamsocket.config.json file in the current
  directory or by passing flags. (Flags take precedence over jamsocket.config.json)

EXAMPLES
  $ jamsocket dev

  $ jamsocket dev --dockerfile session-backend/Dockerfile --watch src --watch package.json --port 8080

jamsocket help [COMMAND]

Display help for jamsocket.

USAGE
  $ jamsocket help [COMMAND] [-n]

ARGUMENTS
  COMMAND  Command to show help for.

FLAGS
  -n, --nested-commands  Include all nested commands in the output.

DESCRIPTION
  Display help for jamsocket.

See code: @oclif/plugin-help

jamsocket images SERVICE

List uploaded images for a given service (limited to 50 most recent images)

USAGE
  $ jamsocket images [SERVICE]

DESCRIPTION
  List uploaded images for a given service (limited to 50 most recent images)

ALIASES
  $ jamsocket images

EXAMPLES
  $ jamsocket images my-service

jamsocket login [ACCOUNT]

Authenticates user to the Jamsocket API.

USAGE
  $ jamsocket login [ACCOUNT] [-t <value>]

ARGUMENTS
  ACCOUNT  Account to use when logging in. (Only necessary for users with multiple accounts.)

FLAGS
  -t, --token=<value>  for automated environments, optional API token to log into the CLI with

DESCRIPTION
  Authenticates user to the Jamsocket API.

EXAMPLES
  $ jamsocket login

jamsocket logout

Logs out of Jamsocket and removes locally-stored credentials.

USAGE
  $ jamsocket logout

DESCRIPTION
  Logs out of Jamsocket and removes locally-stored credentials.

EXAMPLES
  $ jamsocket logout

jamsocket logs BACKEND

Stream logs from a running backend.

USAGE
  $ jamsocket logs [BACKEND]

ARGUMENTS
  BACKEND  The backend ID, a random string of letters and numbers returned by the connect command.

DESCRIPTION
  Stream logs from a running backend.

ALIASES
  $ jamsocket logs

EXAMPLES
  $ jamsocket logs f7em2

jamsocket push SERVICE [IMAGE]

Builds and pushes an image to Jamsocket's container registry using the provided Dockerfile.

USAGE
  $ jamsocket push [SERVICE] [IMAGE] [-f <value>] [-c <value>] [-b <value>] [-t <value>] [-g]

ARGUMENTS
  SERVICE  Jamsocket service to push the image to
  IMAGE    Optionally, provide an image to push instead of a Dockerfile

FLAGS
  -b, --build-context=<value>...  Additional named build contexts to be used when building the image (e.g.
                                  --build-context alpine=docker-image://alpine@sha256:0123456789)
  -c, --context=<value>           path to the build context for the Dockerfile (defaults to current working directory)
  -f, --dockerfile=<value>        path to the Dockerfile to build the image from
  -g, --include-git-commit        optionally include git commit metadata as labels in the image (uses the git repo of
                                  the docker context)
  -t, --tag=<value>               optional tag to apply to the image in the jamsocket registry

DESCRIPTION
  Builds and pushes an image to Jamsocket's container registry using the provided Dockerfile.

EXAMPLES
  $ jamsocket push my-service -f path/to/Dockerfile

  $ jamsocket push my-service -f path/to/Dockerfile -c .

  $ jamsocket push my-service my-image -t my-tag

jamsocket service connect SERVICE

Gets a URL that can be used to connect to a session backend. Will spawn a new session backend if no key (aka lock) is provided or if no session backend is currently holding the provided key.

USAGE
  $ jamsocket service connect [SERVICE] [-e <value>] [-t <value>] [-c <value>] [-i <value>] [-l <value>] [-k <value>]
    [-u <value>] [-a <value>] [--spawn]

ARGUMENTS
  SERVICE  Name of service to spawn.

FLAGS
  -a, --auth=<value>                    Optional serialized JSON to be passed to a session backend when connecting with
                                        the returned URL/connection string.
  -c, --cluster=<value>                 The cluster to to spawn the backend in (only relevant if you are running
                                        multiple clusters with Jamsocket).
  -e, --env=<value>...                  optional environment variables to pass to the container
  -i, --max-idle-seconds=<value>        The max time in seconds a session backend should wait after last connection is
                                        closed before shutting down container (default is 300)
  -k, --key=<value>                     If provided, fetches the session backend currently holding the given key
                                        (formerly known as a "lock"). If no session backend holds the key, or if a key
                                        is not provided, a new session backend will be spawned.
  -l, --lifetime-limit-seconds=<value>  The max time in seconds the session backend should be allowed to run.
  -t, --tag=<value>                     An optional image tag or image digest to use when spawning a backend.
  -u, --user=<value>                    Optional username to be associated with the URL/connection string returned by
                                        the connect command.
  --[no-]spawn                          Whether to spawn a new session backend if no session backend is currently
                                        holding the provided key.

DESCRIPTION
  Gets a URL that can be used to connect to a session backend. Will spawn a new session backend if no key (aka lock) is
  provided or if no session backend is currently holding the provided key.

ALIASES
  $ jamsocket connect

EXAMPLES
  $ jamsocket service connect my-service

  $ jamsocket service connect my-service -k my-key

  $ jamsocket service connect my-service -t my-tag

  $ jamsocket service connect my-service -e SOME_ENV_VAR=foo -e ANOTHER_ENV_VAR=bar

  $ jamsocket service connect my-service -i 60

  $ jamsocket service connect my-service -l 300

  $ jamsocket service connect my-service --no-spawn

  $ jamsocket service connect my-service -u my-user -a '{"foo":"my-json-data"}'

jamsocket service create SERVICE

Creates a service

USAGE
  $ jamsocket service create [SERVICE]

DESCRIPTION
  Creates a service

EXAMPLES
  $ jamsocket service create my-service

jamsocket service delete SERVICE

Deletes a service

USAGE
  $ jamsocket service delete [SERVICE]

DESCRIPTION
  Deletes a service

EXAMPLES
  $ jamsocket service delete my-service

jamsocket service images SERVICE

List uploaded images for a given service (limited to 50 most recent images)

USAGE
  $ jamsocket service images [SERVICE]

DESCRIPTION
  List uploaded images for a given service (limited to 50 most recent images)

ALIASES
  $ jamsocket images

EXAMPLES
  $ jamsocket service images my-service

jamsocket service info SERVICE

Gets some information about a service

USAGE
  $ jamsocket service info [SERVICE]

DESCRIPTION
  Gets some information about a service

EXAMPLES
  $ jamsocket service info my-service

jamsocket service list

List services for the logged-in user

USAGE
  $ jamsocket service list

DESCRIPTION
  List services for the logged-in user

EXAMPLES
  $ jamsocket service list

jamsocket service use-image SERVICE

Sets the image tag or digest to use when spawning a service

USAGE
  $ jamsocket service use-image [SERVICE] -i <value>

ARGUMENTS
  SERVICE  Name of service whose spawning image should be updated.

FLAGS
  -i, --image=<value>  (required) image tag or digest for the service to use (Run `jamsocket images` for a list of
                       images you can use.)

DESCRIPTION
  Sets the image tag or digest to use when spawning a service

EXAMPLES
  $ jamsocket service use-image my-service -i latest

jamsocket terminate BACKENDS

Terminates one or more backends given the backend ID(s).

USAGE
  $ jamsocket terminate [BACKENDS] [-f]

FLAGS
  -f, --force  whether to force the backend to hard terminate (defaults to false)

DESCRIPTION
  Terminates one or more backends given the backend ID(s).

ALIASES
  $ jamsocket terminate

EXAMPLES
  $ jamsocket terminate abc123 def456 ...