Skip to content

CLI

TangleGuard comes with a CLI tool, too.

If you like to use the CLI Version on your computer, e.g. to use it in a Git hook, you can download it using the URL below, for via curl:

Terminal window
curl -L -o tangleguard-cli https://nbg1.your-objectstorage.com/tangleguard/releases/latest/tangleguard-cli

Run tangleguard --help to display all available commands and usage.

Terminal window
tangleguard-cli -l <language> [-p <path>] [--ignore-paths <ignore-paths>] [-q] <command> [<args>]
CommandDescription
uploadUpload scan results to TangleGuard Cloud, OSS only, more about Cloud here
scanScan the workspace and print the result as JSON to stdout
validateCheck the codebase regarding circular dependencies and rule violations, more about validation here.
OptionShortDescription
--language-lProgramming language to be scanned (required)
--path-pPath to the workspace to analyze (defaults to current directory)
--ignore-pathsComma-separated list of directory names to ignore during scanning (e.g., examples,benchmarks)
--quiet-qSuppress all logging output, only print result to stdout (recommended for programmatic use)
--helpDisplay usage information

It is being used by the GitHub Action and the IDE Extensions to scan the codebase.

graph LR
    A[IDE Extension] --> CLI
    B[GitHub Action] --> CLI

The core logic of TangleGuard is written in Rust, as are the the scanners. To make use of this efficient code and not have to re-implement most of the code logic in Javascript or Typescript, the Visual Studio Code Extension usese the compiled, super fast CLI tool to scan your codebase.