Skip to main content

T++ (Antigravity 2.0 Edition)

Human-first natural language programming, engineered for deterministic, production-grade software.

PyPI version Python CI Release License

T++ is a modern, natural-language programming language and development platform. It allows developers to write expressive, prose-like code with deterministic execution, static and gradual typing, rich visual diagnostics, an expanded standard library, and complete developer tooling.

Current Release: 3.2.0

pip install tpp-language

Key Highlights

  • Natural Surface Syntax & Synonyms: Write in readable English phrases (give back, is between 1 and 10, the items in tasks where item's is_done, a record with name as "Ana").
  • Gradual Type System: Optional type annotations on variables (let count be 0 as a whole number) and functions (define add with a as a number, giving back a number as:).
  • Rich Visual Diagnostics: Beautiful terminal compiler errors with line/column markers, carets, source previews, suggestions, and call stack frame tracking.
  • Sandboxed Standard Library: 7 built-in modules (math, text, collections, system, time, json, validate) with path traversal protection.
  • Language Server Protocol (LSP): Integrated LSP server (tpp lsp) providing live diagnostics, hover docs, autocomplete, definition jump, and formatting for VS Code / IDEs.
  • Full Developer CLI: Unified subcommands: run, check, fmt, doc, repl, test, bench, lsp, api, doctor, plugin.
  • Public Python Embedding API: Seamless Python interop with tpp.run_source(), tpp.run_file(), and tpp.eval_expr().

Quick Start

1. Installation

pip install tpp-language

Verify your environment:

tpp --version
tpp doctor

2. Hello World

Create hello.tpp:

let name be "Developer"
say "Hello, {name}! Welcome to T++."

Run it:

tpp run hello.tpp

Language Features at a Glance

Pattern Matching (match)

match status_code:
    when 200:
        say "Success"
    when 404:
        say "Not Found"
    when x if x is at least 500:
        say "Server Error: {x}"
    otherwise:
        say "Unhandled status"

Comprehensions & Collections

let numbers be 1 to 10
let evens be a list containing x times 2 for each x in numbers if x % 2 == 0
let filtered be the items in numbers where item is greater than 5

let person be a record with name as "Alice" and role as "Admin"
say "{person's name} has role {person's role}"

Error Handling (try / handle / finally)

try:
    if divisor is equal to 0:
        raise the error "Cannot divide by zero"
    let result be total / divisor
handle any error as err:
    say "Caught error: " then err
finally:
    say "Execution completed."

Modules & Imports

# In math_utils.tpp
export define square with n as:
    give back n times n

# In main.tpp
use square from "./math_utils.tpp"
let val be call square with 6

CLI Reference

Command Description Example
tpp run <file> Execute a T++ file tpp run app.tpp
tpp check <file> Statically check syntax & types tpp check app.tpp
tpp fmt <file> Auto-format source code tpp fmt app.tpp --write
tpp doc <file|mod> Generate Markdown documentation tpp doc math / tpp doc app.tpp
tpp repl Start interactive shell with meta-commands tpp repl
tpp test [file] Run test blocks (supports --json, --junit) tpp test tests/ --json
tpp bench Run runtime performance benchmark suite tpp bench
tpp lsp Run Language Server Protocol server tpp lsp --stdio
tpp api Start Web IDE and JSON HTTP API tpp api --serve --port 8787
tpp doctor Run installation & environment diagnostics tpp doctor
tpp plugin Install and list extensions tpp plugin install plugin.json

Interactive REPL

Launch the REPL with tpp repl:

T++ Interactive Shell v3.2.0
Type ':help' or ':?' for commands, ':quit' or 'exit' to exit.

>> let x be 10 plus 20
>> :type x
x : int = 30
>> :doc math
Native Stdlib Module 'math'
Members: abs, absolute_value, add, average, ceil, cos, cosine, divide...
>> :env
--- Scope (1 bindings) ---
  x (int) = 30
>> :quit

Python Embedding API

Embed T++ directly in Python applications:

import tpp

# Execute source code
engine = tpp.run_source(
    "let result be a times b\n",
    initial_scope={"a": 6, "b": 7}
)
print(engine.global_scope.get("result", 1)) # 42

# Evaluate single expressions
value = tpp.eval_expr("10 plus 25") # 35

Standard Library Reference

Module Key Functions & Constants
math sin, cos, tan, sqrt, log, floor, ceil, round, abs, average, median, is_prime, pi, e, tau
text uppercase, lowercase, title, trimmed, replace, contains, format_currency, matches_pattern, words_in
collections map_items, filter_items, reduce_items, group_by, unique_items, chunk_items, flatten, zip_items
system read_file, write_file, append_file, file_exists, list_files, get_env, command_line_arguments
time current_moment, format_moment, parse_moment, time_difference, shift_time, sleep_seconds, now
json parse_json, to_json
validate is_valid_email, is_valid_number, is_within_range, is_not_nothing, is_empty

Documentation


License

T++ is licensed under the MIT License.

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

tpp_language-3.2.0.tar.gz (160.4 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

tpp_language-3.2.0-py3-none-any.whl (80.4 kB view details)

Uploaded Python 3

File details

Details for the file tpp_language-3.2.0.tar.gz.

File metadata

  • Download URL: tpp_language-3.2.0.tar.gz
  • Upload date:
  • Size: 160.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.13.14

File hashes

Hashes for tpp_language-3.2.0.tar.gz
Algorithm Hash digest
SHA256 3e3b43898b3928b3c489ee8f1fd7b39324c91e325e07b021da831b1d168550e9
MD5 c8895c4fe1516faf39a7b29f338fd878
BLAKE2b-256 5c21125adf82575276932cc3966d4d93d83d51203aef2eaa0f1f11fc2ab357f8

See more details on using hashes here.

File details

Details for the file tpp_language-3.2.0-py3-none-any.whl.

File metadata

  • Download URL: tpp_language-3.2.0-py3-none-any.whl
  • Upload date:
  • Size: 80.4 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.13.14

File hashes

Hashes for tpp_language-3.2.0-py3-none-any.whl
Algorithm Hash digest
SHA256 f18f850cc4e5054dfb086fbd189aaca3c378318e8942a74a95392e7a4cd5bbbf
MD5 161e8dc44f0181478fd42aa100d319ed
BLAKE2b-256 26aee370cdffe3e573736d8820a301126d6b5c4a9b53a4c3d24c1816857a4285

See more details on using hashes here.

Release history Release notifications | RSS feed

This release

3.2.0 This release

2 files

3.1.3

2 files

3.1.2

2 files

3.1.1

2 files

3.1.0

2 files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page