No description
  • Rust 48%
  • C 46.3%
  • Python 1.6%
  • C++ 1.2%
  • JavaScript 1%
  • Other 1.9%
Find a file
Repository files (latest commit first)
Filename Latest commit message Latest commit date
2026-10-02 23:51:25 +08:00
tart use logos and bug fixes 2026-10-02 23:51:25 +08:00
tart-zed-extension Centralize syntax specifications in syntax_spec.rs 2026-08-29 16:06:17 +08:00
tree-sitter-tart Centralize syntax specifications in syntax_spec.rs 2026-08-29 16:06:17 +08:00
.gitignore Improve LSP completion robustness for broken states 2026-08-29 15:23:21 +08:00
foo.md Add std.url.encode and improve type checking for comparisons 2026-09-02 15:41:21 +08:00
justfile Rename Forge to Tart 2026-08-29 09:23:29 +08:00
README.md Update README.md 2026-08-29 15:33:40 +08:00
tart-spec.md Rename Forge to Tart 2026-08-29 09:23:29 +08:00

🍓 Tart

Terminal Apps and Runtime Tools

i thought the syntax looked kinda like ruby and then ruby made me think of strawberries.

That's it. That's the whole origin story. We don't make the rules, we just name the languages.


What even is this

Tart is a scripting language for people who like shell scripts but also secretly wish shell scripts had, like, actual types and didn't explode in a shower of word-splitting horror the moment someone's filename had a space in it.

The pitch is simple: write commands like you're in a terminal, and only reach for "programming" when you actually need it.

git pull
cargo build
echo Done

Congrats, that's a valid Tart script. You already know Tart. You're welcome.

The @ thing

Whenever you want to do programming instead of just bossing your computer around, you use @:

@let name = "Bob"
@if name == "Bob"
    echo "Hello, Bob. We need to talk."
@end

The @ is basically Tart tapping you on the shoulder going "psst, this next bit is a little fancier." Anywhere else — inside a string, inside an argument — @ is just a boring little character minding its own business:

@let msg = "deploy @prod"   # totally normal string, @prod is not a secret command
curl -X POST -d "@payload.json"   # curl still gets to do its curl things

No escaping. No "wait was that a directive or not." Your eyes can just scan down the left edge of the script and go "programming, programming, shell command, programming" like you're reading subtitles.

Bare commands are secretly expressions

This is the fun trick: a bare command isn't its own special weird statement type, it's just an expression that happens to return a ProcessResult. Which means you can capture it like anything else:

@let result = git status

@if result.is_err()
    echo "well that's not great"
@end

Everything fallible is a Result, no try/catch drama

Tart doesn't do try/catch. If something can fail, it returns a Result, and if you just use the value without doing anything special, Tart assumes you meant "yolo, if this breaks just stop the script":

git pull        # if this fails, the script halts right here, dramatically
cargo build     # never even gets to know this line existed

If you want to be a responsible adult about it, there are combinators:

@let data = fs.read(file).unwrap_or(default_bytes)
git pull.or_else(err => echo "pull failed, continuing anyway, living dangerously")

Concurrency, but chill about it

@spawn fires something off in the background and hands you back a Task. You don't await it — you just... use it later, whenever you get around to it, like a text message you're gonna reply to eventually:

@let build = @spawn cargo build
@let install = @spawn npm install

echo build     # blocks until it's done, then yells at you if it failed
echo install

Same philosophy as Result: nothing happens until you actually look at it. Schrödinger's task.

Types, but the polite kind

Tart is statically typed but will not make you write List<Map<String, Integer>> fifteen times a day. It figures most of that out on its own:

@let name = "Alice"      # String, obviously
@let age = 30              # Integer, also obviously
@let items = [1, 2, 3]     # List<Integer>, still obviously

You can annotate things, mostly at function boundaries where it's actually helpful instead of just noise:

@func read_config(path) -> Result<Map, Error>
    ...
@end

Testing is just... there

No separate test framework to install, configure, and then abandon in six months:

@func add(a, b)
    @return a + b
@end

@test "add combines two integers"
    @expect add(2, 3) == 5
@end
tart test

and it goes and finds every @test block in your whole project like a very organized golden retriever.

The Vibe™ / Design Principles

  1. Commands should remain commands. We're not out here reinventing ls.
  2. Programming is opt-in, not something shoved down your throat on line one.
  3. Readable over clever. Cleverness is how you end up maintaining regex nobody understands, including future-you.
  4. Cross-platform, because "works on my machine" is not a deployment strategy.
  5. No shell quirks, no hidden expansion, no jump-scares.
  6. Typed values instead of everything secretly being a string that you .parse() and pray.
  7. Batteries included, so you're not npm-installing seventeen packages to read a CSV.
  8. Fast startup — it should feel like a shell, not like it's stretching before a marathon.
  9. Small and coherent. Every feature has to earn its spot at the table.

Standard Library, Briefly

fs, http, json, csv, xml, path, time, process, env, regex, sqlite, crypto, archive, net, math, random, string, system, args.

Basically: if it's a thing a script normally needs, it's probably already in the box. No third-party package required, no supply-chain anxiety, no left-pad incident waiting to happen.

Should I use this

If you've ever written a shell script that grew arms and legs and started needing "real" data structures and you thought "I wish this was still a shell script but also less cursed" — yeah, probably. That's the whole niche.


Tart: because your automation scripts deserve types, and your README deserves a fruit pun.