sheety

Version, currently 1.0.02 versions

github.com/ralsina/sheety

Playing with spreadsheet ideas

5 stars
0 dependents
License: MIT

Nothing has been indexed for 1.0.0 yet. The tag is recorded, its shard.yml has not been read, so the manifest and dependency list below are empty because they are unknown rather than because they are absent.

Installation

# Add this to your shard.yml
dependencies:
  sheety:
    github: ralsina/sheety
    version: ~> 1.0.0

Then run:

shards install

shard.yml

No shard.yml has been indexed for 1.0.0. You can read it on the repository.

Dependencies

Unknown: the shard.yml for this version has not been read yet.

README

This README is the one indexed from the repository at its latest ref, not from the tag for this version.

Sheety

Sheety is an Excel-like spreadsheet application for Crystal that compiles spreadsheet definitions (YAML or Excel) into standalone, interactive TUI binaries.

โš ๏ธ Note: This is experimental software. We're compiling spreadsheets into standalone binaries. It's ridiculous, it's probably unnecessary, and it absolutely works.

๐ŸŒ Check out the website: sheety.ralsina.me

Features

  • Formula Parser: Parses a comprehensive subset of Excel formulas

    • Arithmetic: +, -, *, /, ^
    • Comparison: =, <, >, <=, >=, <>
    • Text: & (concatenation)
    • Logical: IF, AND, OR, NOT, IFS, SWITCH
    • Math & Statistical: SUM, AVERAGE, MIN, MAX, COUNT, COUNTA, MEDIAN, STDEV, STDEV.P, VAR.S, VAR.P, ROUND, ROUNDUP, ROUNDDOWN, CEILING, FLOOR, INT, ABS, POWER, SQRT, MOD, RAND, RANDBETWEEN
    • Text Functions: CONCAT, LEFT, RIGHT, MID, LEN, UPPER, LOWER, TRIM, PROPER, FIND, SEARCH, SUBSTITUTE, TEXT, VALUE, CLEAN, EXACT, REPT
    • Date & Time: TODAY, NOW, YEAR, MONTH, DAY, DATEDIF, EOMONTH
    • Conditional: COUNTIF, SUMIF
    • Lookup: VLOOKUP, HLOOKUP, INDEX
    • Cell references: A1, Sheet2!B5
    • Ranges: A1:B5, Sheet1!A1:A10
  • Format Support: Works with multiple spreadsheet formats

    • YAML - Human-readable text format for version control
    • Excel (.xlsx) - Import and export Excel files
    • Convert between any formats
  • Hash-Based Build Caching: Content-based caching makes re-running unchanged spreadsheets ~400x faster

    • First run: ~3 seconds (compilation)
    • Cached runs: ~0.007 seconds (instant startup)
    • Automatically recompiles when source content changes
  • TUI Interface: Modern terminal UI with spreadsheet-style grid

    • 1000x1000 grid with column headers (A-Z) and row numbers
    • Active cell highlighting
    • Formula bar showing current cell's formula or value
    • Multiple sheet support with Tab switching
  • Interactive Editing: Full cell editing with live recalculation

    • Edit value cells by typing
    • Edit formulas with real-time cursor
    • Auto-recalculation of dependent formulas
    • Formula editing triggers automatic binary rebuild
  • Mouse Support: Click to select, double-click to edit, wheel scrolling

  • State Persistence: Saves and restores UI state

    • Remembers cursor position across sessions
    • Saves all changes back to source file
    • UUID-based state management survives rebuilds
  • In-Process Rebuilding: Formula edits rebuild the binary from within the TUI

Installation

Pre-built Static Binaries (Recommended)

Download pre-built static binaries from the GitHub Releases page. No dependencies required - just download and run!

Available platforms:

  • Linux AMD64: sheety-static-linux-amd64 (standard x86_64 systems)
  • Linux ARM64: sheety-static-linux-arm64 (Raspberry Pi, AWS Graviton, etc.)
# Download and make executable
wget https://github.com/ralsina/sheety/releases/download/v1.0.0/sheety-static-linux-amd64 -O sheety
chmod +x sheety

# Run
./sheety my_sheet.yaml

Build from Source

git clone https://github.com/ralsina/sheety.git
cd sheety
shards install
shards build

Usage

Command Line

# Compile and run a spreadsheet (auto-creates if doesn't exist)
./bin/sheety my_sheet.yaml

# Convert between formats
./bin/sheety data.yaml --save-to=data.xlsx     # YAML to Excel
./bin/sheety data.xlsx --save-to=data.yaml     # Excel to YAML
./bin/sheety data.yaml --save-to=data.cr       # Generate Crystal source
./bin/sheety data.yaml --save-to=data.sheety   # Compile to binary

# Works with Excel files directly
./bin/sheety workbook.xlsx

Spreadsheet YAML Format

Sheet1:
  A1:
    value: 100
  A2:
    value: 200
  A3:
    formula: "=SUM(A1:A2)"
  B1:
    value: "Hello"
  B2:
    formula: "=CONCAT(B1, \" World\")"

Sheet2:
  A1:
    formula: "=Sheet1!A3*2"

TUI Controls

Navigation:

  • Arrow keys, Home/End, Page Up/Down
  • Tab to switch sheets
  • Click to select, double-click to edit

Editing:

  • Enter to edit current cell
  • S to save spreadsheet
  • Q to quit

Development

# Run tests
crystal spec

# Build
shards build

# Format conversion
./bin/sheety examples/test.yaml --save-to=output.xlsx

Current Status

  • โœ… Excel formula parsing
  • โœ… YAML and Excel format support with full roundtrip conversion
  • โœ… Code generation and compilation to standalone binaries
  • โœ… TUI interface with interactive editing
  • โœ… In-process rebuilding on formula changes
  • โœ… State persistence across rebuilds
  • โœ… Auto-creation of new spreadsheets
  • โœ… Hash-based build caching

License

MIT

Contributors