MCPcopy Index your code
hub / github.com/blackstork-io/blackstork-cli

github.com/blackstork-io/blackstork-cli @v0.4.3-final-apache

Chat with this repo
repository ↗ · DeepWiki ↗ · release v0.4.3-final-apache ↗ · + Follow
3,572 symbols 11,947 edges 418 files 586 documented · 16% updated 22d agov0.4.2 · 2024-07-23★ 7114 open issues
What it actually does AI analysis from the code graph — generated when you open this
loading…
README

Fabric logo

Releases | Docs | Slack

GitHub Repository stars GitHub Release Join Slack

Fabric is an open-source Command-Line Interface (CLI) tool with a configuration language designed to encode and automate content generation for cybersecurity and compliance.

<img src="https://github.com/blackstork-io/blackstork-cli/raw/v0.4.3-final-apache/github/diagram.png" alt="The diagram illustrates a Fabric template and the corresponding rendered document" width="700px"/>

Fabric generates documents from templates written in Fabric Configuration Language (FCL). The templates are modular and reusable. By including data requirements and content structure definitions in the templates, the template authors can significantly reduce the manual effort of data consolidation and document build-up.

See Tutorial for an introduction to FCL and Fabric.

Fabric templates can include static content, dynamic templates (powered by Go templates) or rely on GenAI for content generation (with openai plugin, for example).

[!NOTE]
Fabric is currently in the early stages of development, and there may be some issues. If you have any suggestions, ideas, or bug reports, please share them in Fabric Community slack.

Plugins

Fabric supports plugins that offer integrations with various platforms, data stores, and security solutions, including JSON/CSV files, Elastic, OpenCTI, Splunk Cloud, GitHub, and more.

You can find the full list of supported plugins in the documentation.

Templates

You can find open-source templates for CTI, pentesting and SecOps use cases in Fabric Templates repository.

Installing Fabric

Homebrew

To install Fabric on macOS with Homebrew, run these commands:

# Install Fabric from the tap
brew install blackstork-io/tools/fabric

# Verify the version installed
fabric --version

The tap is updated automatically with every release.

Docker

The Docker images for Fabric are hosted in Docker Hub.

To run Fabric as a Docker image use a name blackstorkio/fabric:

docker run blackstorkio/fabric

GitHub releases

Fabric binaries for Windows, macOS, and Linux are available at "Releases" page in the project's GitHub.

To install Fabric:

  • download a release archive: choose and download Fabric release archive appropriate for your operating system (Windows, macOS/Darwin, or Linux) and architecture from "Releases" page;
  • unpack: extract the contents of the downloaded release archive into a preferred directory;

For example, the steps for macOS (arm64) are:

# Create a folder
mkdir fabric-bin

# Download the latest release of Fabric
wget https://github.com/blackstork-io/fabric/releases/latest/download/fabric_darwin_arm64.tar.gz -O ./fabric_darwin_arm64.tar.gz

# Unpack Fabric release archive into `fabric-bin` folder
tar -xvzf ./fabric_darwin_arm64.tar.gz -C ./fabric-bin

# Verify that `fabric` runs
./fabric-bin/fabric --help

Usage

The core fabric commands are:

  • install — install all plugins listed as required in the configuration (see Configuration).
  • data — executes the data block and prints out prettified JSON to standard output (see Data blocks).
  • render — renders a document template and prints out the result to standard output or a file.

For more details, run fabric --help:

$ ./fabric --help
Usage:
  fabric [command]

Available Commands:
  completion  Generate the autocompletion script for the specified shell
  data        Execute a single data block
  help        Help about any command
  install     Install plugins
  render      Render the document

Flags:
      --color               enables colorizing the logs and diagnostics (if supported by the terminal and log format) (default true)
  -h, --help                help for fabric
      --log-format string   format of the logs (plain or json) (default "plain")
      --log-level string    logging level ('debug', 'info', 'warn', 'error') (default "info")
      --source-dir string   a path to a directory with *.fabric files (default ".")
  -v, --verbose             a shortcut to --log-level debug
      --version             version for fabric

Use "fabric [command] --help" for more information about a command.

Documentation

Visit https://blackstork.io/fabric/docs/ to see full documentation for Fabric.

Security

If you suspect any vulnerabilities within Fabric, please report them using GitHub's security advisory reporting. We treat every report with the utmost seriousness and commit to conducting a thorough investigation.

We kindly request that you task with us before making any public disclosures. This precautionary step ensures that no excessive information is shared prematurely, allowing us to prepare a patch. It also gives users enough time to upgrade.

License

Fabric is licensed under Apache-2.0 license. See the LICENSE file for the details.

Extension points exported contracts — how you extend this code

InlineContent (Interface)
InlineContent represents any inline node or something convertible to inline nodes. [8 implementers]
plugin/ast/v1/interfaces.go
Source (Interface)
Source is the interface for plugin sources. A source is responsible for listing, looking up, and resolving plugins. The [5 …
plugin/resolver/source.go
Printer (Interface)
Printer is the interface for printing content. [5 implementers]
print/printer.go
FabricBlock (Interface)
(no doc) [6 implementers]
parser/definitions/definitions.go
AzureClient (Interface)
(no doc) [9 implementers]
internal/microsoft/plugin.go
Convertible (Interface)
(no doc) [4 implementers]
plugin/plugindata/data.go
Configuration (Interface)
To act as a plugin configuration struct must implement this interface. [2 implementers]
parser/evaluation/evaluation.go
DecoderI (Interface)
Non-generic decoder interface [1 implementers]
pkg/encapsulator/decoder.go

Core symbols most depended-on inside this repo

Get
called by 391
internal/github/plugin.go
GetAttrVal
called by 330
plugin/dataspec/block.go
SetAttr
called by 279
plugin/plugintest/blocktest.go
Extend
called by 197
pkg/diagnostics/diagnostics.go
Decode
called by 158
plugin/plugintest/blocktest.go
Error
called by 151
internal/iris/client/dto.go
NewTestDecoder
called by 137
plugin/plugintest/blocktest.go
Close
called by 127
plugin/runner/runner.go

Shape

Method 1,991
Function 929
Struct 514
Interface 61
TypeAlias 45
FuncType 32

Languages

Go100%

Modules by API surface

plugin/ast/v1/ast.pb.go352 symbols
plugin/pluginapi/v1/cty.pb.go124 symbols
plugin/pluginapi/v1/dataspec.pb.go76 symbols
plugin/pluginapi/v1/plugin.pb.go72 symbols
plugin/pluginapi/v1/content.pb.go68 symbols
plugin/pluginapi/v1/schema.pb.go63 symbols
plugin/ast/v1/interfaces.go59 symbols
plugin/content.go49 symbols
plugin/pluginapi/v1/data.pb.go45 symbols
pkg/sloghclog/sloghclog.go38 symbols
plugin/plugindata/data.go36 symbols
mocks/internalpkg/crowdstrike/client.go34 symbols

For agents

$ claude mcp add blackstork-cli \
  -- python -m otcore.mcp_server <graph>

⬇ download graph artifact

Ask about this repo answers extend the page