Skip to content

Tools Overview

Sky provides a comprehensive suite of tools for Starlark development. Each tool is installable individually or all at once.

Terminal window
# Install all tools
go install github.com/albertocavalcante/sky/cmd/...@latest
# Or install individually
go install github.com/albertocavalcante/sky/cmd/skylint@latest
go install github.com/albertocavalcante/sky/cmd/skyfmt@latest
go install github.com/albertocavalcante/sky/cmd/skytest@latest

Analysis

skylint - Fast linting with 20+ rules

skycheck - Deep static analysis

Formatting

skyfmt - Consistent code formatting

Testing

skytest - Test runner with coverage

skycov - Coverage reporting

Development

skyrepl - Interactive REPL

skydoc - Documentation generator

skyquery - Codebase queries

Fast static linter with 20+ configurable rules for code quality, style, and correctness.

Terminal window
skylint src/
skylint --format=json src/ # Machine-readable output
skylint --config=.skylint.yaml # Custom configuration

Full documentation

Deep static analyzer with type inference and cross-file analysis.

Terminal window
skycheck src/
skycheck --strict src/ # Stricter checking
skycheck --format=sarif src/ # SARIF output for GitHub

Full documentation

Code formatter for consistent style across your codebase. Compatible with Buildifier formatting.

Terminal window
skyfmt file.star # Format and print to stdout
skyfmt --write src/ # Format files in place
skyfmt --check src/ # Check without modifying (CI mode)

Full documentation

Test runner with built-in assertions, fixtures, and coverage collection.

Terminal window
skytest tests/ # Run all tests
skytest --coverage tests/ # Collect coverage data
skytest --filter="test_add*" # Filter by test name

Features:

  • Test discovery (*_test.star, test_*.star)
  • Built-in assert module with eq, ne, true, fails, etc.
  • setup() and teardown() support
  • Coverage collection via starlark-go-x hooks
  • JSON and JUnit output formats

Full documentation

Coverage reporter that converts raw coverage data to industry-standard formats.

Terminal window
skycov coverage.json # Text summary
skycov --format=cobertura coverage.json # Cobertura XML
skycov --format=lcov coverage.json # LCOV format
skycov --min-coverage=80 coverage.json # Threshold check

Full documentation

Generate documentation from Starlark docstrings in Markdown or HTML.

Terminal window
skydoc src/ # Generate docs
skydoc --output=docs src/ # Specify output directory
skydoc --format=html src/ # HTML output

Full documentation

Query Starlark codebases to understand dependencies and structure.

Terminal window
skyquery 'deps(//src:lib)' # Show dependencies
skyquery 'rdeps(//src:util)' # Show reverse dependencies
skyquery 'allpaths(//a, //b)' # Find paths between targets

Full documentation

Interactive REPL for experimenting with Starlark code.

Terminal window
skyrepl
>>> x = [1, 2, 3]
>>> [i * 2 for i in x]
[2, 4, 6]
>>> def greet(name): return "Hello, " + name
>>> greet("World")
"Hello, World"

Full documentation

ToolPurposeSpeedOutput Formats
skylintLintingFastText, JSON, SARIF
skycheckDeep analysisSlowerText, JSON, SARIF
skyfmtFormattingFast-
skytestTestingMediumText, JSON, JUnit
skycovCoverageFastText, JSON, Cobertura, LCOV
skydocDocumentationMediumMarkdown, HTML

All tools support CI-friendly output formats and exit codes:

# GitHub Actions example
- name: Lint
run: skylint --format=sarif src/ > results.sarif
- name: Format check
run: skyfmt --check src/
- name: Test with coverage
run: |
skytest --coverage tests/
skycov --min-coverage=80 coverage.json

See CI Integration for complete examples.