Giter VIP home page Giter VIP logo

license-cli's Introduction

License CLI

FOSSA Status

A CLI for running license and compliance scans across your dependencies, powered by http://fossa.io for your termainal or CI.

asciicast

Installation

Run npm install -g license-cli (requires nodejs and npm on your machine)

Usage

Authenticating

If you want to run license-cli on priviate projects, you require a FOSSA account and API token. To get one, register an account at http://fossa.io and then navigate to Account Settings > Integrations > API Tokens > Create Token.

Then, run license-cli auth <token> to . This will write to a config file at ~/.fossa_cli_token.

Scanning

To trigger or lookup scan results for a given project/revision, you can run just cd into a git directory and run license-cli scan and wait. This will automatically tell FOSSA to build, scan and fetch the results of whatever current branch/revision you're on -- provided git is installed on your system.

If you don't have access to your code / git or are working in a unique environment, you can still trigger the same behavior by specifying the --project and optionally a --revision/--branch flag. Use the options below to customize your behavior.

  Usage: license-cli scan [options]

  output FOSSA license scan status for a given project or revision

  Options:

    -h, --help             output usage information
    -p, --project [id]     project id or locator to query, defaults to git details of cwd
    -r, --revision [id]    revision id to query; defaults to git details of cwd then latest
    -b, --branch [branch]  branch to default to if no revision is specified
    -t, --token [token]    api token for accessing private projects
    -o, --timeout [ms]     timeout for waiting on build status; defaults to 30m
    -e, --endpoint [url]   custom fossa instance url

Note - license-cli is a client for data from [https://app.fossa.io] and will not work unless FOSSA is already aware of the repository.

Working with CI

license-cli was made to work great with CI systems. The scan command writes scan summaries to stderr and stdout and uses common exit codes, so you can rely on the output to work out of the box with CI tasks.

If you use a popular CI provider, the FOSSA team already has some pre-written for tasks and plugins:

License

This project is licensed under the MIT License and runs regular scans/reports using FOSSA.

FOSSA Status

license-cli's People

Contributors

xizhao avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.