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

@martymarron/cliff

v0.1.0-delta

Published

cliff =====

Downloads

3

Readme

cliff

oclif CircleCI npm version

Description

This is a CLI(Command Line Interface) for the LIFF Server API. This provides a simple set of commands to perform CRUD for LIFF apps.

Table of Contents

  1. Usage
  2. Commands

Usage

$ npm install -g @martymarron/cliff
$ cliff COMMAND
running command...
$ cliff (-v|--version|version)
cliff/0.1.0-alpha linux-x64 node-v16.13.0
$ cliff --help [COMMAND]
USAGE
  $ cliff COMMAND
...

Next, it requires to provide credentials as environment variables as follows.

$ cat << 'EOF' | tee .env
LINE_CLIENT_ID=1234567890
LINE_CLIENT_SECRET=abcdefgh1jklmnopqrstuvwxyz123456
BASE_URL=https://api.line.me
EOF

See the "FAQ - Where can I find my channel ID?" to know how to find credentials.
Please note that environment variables LINE_CLIENT_ID and LINE_CLIENT_SECRET correspond to the "Channel ID" and "Channel secret" on the developer console.
BASE_URL specifies the base URL of the LIFF Server API. Modify this value in accordance with your development environment. Leave it as is if you're not familar with this.

Commands

cliff list

Display LIFF apps which belong to your channel.

USAGE
  $ cliff list

EXAMPLE
  $ cliff list
  [
      {
          "liffId": "1234567890-abcdefgh",
          "view": {
              "type": "full",
              "url": "https://example.com",
              "moduleMode": false
          },
          "description": "Example App",
          "features": {},
          "permanentLinkPattern": "concat"
      }
  ]

See code: src/processors/list-command-processor.ts

cliff create

Create a LIFF app into your channel.

USAGE
  $ cliff create --json [LIFF_APP]

OPTIONS
  --json LIFF_APP  json string to create the LIFF app

EXAMPLE
  $ LIFF_APP=$(<<'EOF'
  {
    "view": {
      "type": "full",
      "url": "https://example.com"
    },
    "description": "This is an example LIFF app.",
    "permanentLinkPattern": "concat"
  }
  EOF
  )
  $ cliff create --json $LIFF_APP
  $ cliff list
  [
      {
          "liffId": "1234567890-abcdefgh",
          "view": {
              "type": "full",
              "url": "https://example.com",
              "moduleMode": false
          },
          "description": "This is an example LIFF app.",
          "features": {},
          "permanentLinkPattern": "concat"
      }
  ]

See code: src/processors/create-command-processor.ts

cliff update

Update the LIFF app.

USAGE
  $ cliff update --json [LIFF_APP]

OPTIONS
  --json LIFF_APP  json string to update the LIFF app

EXAMPLE
  $ LIFF_APP=$(<<'EOF'
  {
    "liffId": "1234567890-abcdefgh"
    "view": {
      "type": "full",
      "url": "https://example.com"
    },
    "description": "Updated the description",
    "permanentLinkPattern": "concat"
  }
  EOF
  )
  $ cliff update --json $LIFF_APP
  $ cliff list
  [
      {
          "liffId": "1234567890-abcdefgh",
          "view": {
              "type": "full",
              "url": "https://example.com",
              "moduleMode": false
          },
          "description": "Updated the description.",
          "features": {},
          "permanentLinkPattern": "concat"
      }
  ]

See code: src/processors/update-command-processor.ts

cliff delete

Delete the LIFF app by specifying the LIFF ID.

USAGE
  $ cliff delete --liff-id [LIFF_ID]

OPTIONS
  --liff-id [LIFF_ID]  liffId to delete

EXAMPLE
  $ cliff delete --liff-id 1234567890-abcdefgh
  $ cliff list
  []

See code: src/processors/delete-command-processor.ts

cliff help [COMMAND]

display help for cliff

USAGE
  $ cliff help [COMMAND]

ARGUMENTS
  COMMAND  command to show help for

OPTIONS
  --all  see all commands in CLI

See code: @oclif/plugin-help