Quick Start
Quick Start
Section titled “Quick Start”Get up and running with Sky in 5 minutes.
1. Install
Section titled “1. Install”go install github.com/albertocavalcante/sky/cmd/...@latest2. Create a Starlark File
Section titled “2. Create a Starlark File”def greet(name): """Greet someone by name.""" return "Hello, " + name + "!"
message = greet("World")print(message)3. Format It
Section titled “3. Format It”skyfmt hello.star4. Lint It
Section titled “4. Lint It”skylint hello.star5. Create a Test
Section titled “5. Create a Test”load("hello.star", "greet")
def test_greet(): assert.eq(greet("World"), "Hello, World!") assert.eq(greet("Sky"), "Hello, Sky!")
def test_greet_empty(): assert.eq(greet(""), "Hello, !")6. Run Tests
Section titled “6. Run Tests”skytest hello_test.starOutput:
PASS test_greetPASS test_greet_empty
Results: 2 passed, 0 failed7. Collect Coverage
Section titled “7. Collect Coverage”skytest --coverage hello_test.starskycov coverage.jsonOutput:
Coverage Report===============hello.star 100.0% (3/3 lines)Total: 100.0% (3/3 lines)Next Steps
Section titled “Next Steps”- Tools Overview - Learn about all Sky tools
- Coverage Guide - Deep dive into coverage
- Language Basics - Learn Starlark syntax in detail
- Plugins - Extend Sky with custom commands
- starlark-go-x - Our enhanced interpreter with coverage hooks