Skip to main content
SHE logo

SHE

A programming language that reads like English — and can't touch your machine unless you say so.

CI PyPI Python License Try it

Try it now · Docs · Examples · Discussions


let name = ask "What is your name?"
say "Hello, {name}!"

let numbers = [4, 8, 15, 16, 23, 42]

say numbers
  |> filter(fun(n) -> n % 2 is 0)
  |> map(fun(n) -> n / 2)
  |> sum()

That is the whole language: say what you mean, in the order you'd say it out loud.


Why another language?

Most languages ask you to choose. Readable or capable. Friendly or safe. A toy you outgrow in a week, or a professional tool with a month-long ramp.

SHE refuses the trade.

1. It reads like a sentence

No braces. No semicolons. No significant whitespace to get wrong. Blocks end with end, comparisons use is, and loops say for each item in items. A person who has never programmed can read a SHE file and mostly follow it.

type Account has owner: text, balance: number = 0
  fun deposit(self, amount)
    if amount <= 0 then throw "a deposit has to be positive"
    self.balance += amount
    return self.balance
  end
end

let account = Account("Ada")
say account.deposit(50)

But it is not verbose. There is no public static void, no ceremony, no boilerplate file you must write before the first line that does something.

2. It has no power until you grant it

This is the part that matters. A SHE program starts with nothing: it cannot read a file, open a socket, start a process, or read an environment variable.

she run report.she                       # arithmetic only — nothing else is possible
she run report.she --allow-read=./data   # now it can read that one folder
she run report.she --allow-net=api.stripe.com

Try to do something ungranted and SHE tells you exactly which flag would allow it:

PermissionError: report.she tried to read files from disk (~/.ssh/id_rsa),
                 but was not given permission
  --> report.she:14:12
     |
  14 |   let key = fs.read("~/.ssh/id_rsa")
     |             ^^^^^^^
  help: run it with `--allow-read=~/.ssh/id_rsa` to permit this,
        or `--allow-all` while you are developing.

You can hand someone a SHE script and know from the command line alone what it is able to touch. That is a property no mainstream scripting language gives you.

3. The errors teach instead of scold

Every error points at the source, says what went wrong in plain words, and suggests the fix.

NameError: `totl` has not been defined yet
  --> budget.she:7:5
     |
   7 | say totl
     |     ^^^^
  help: did you mean `total`?
TypeError: `x` was declared with `let`, so it cannot be changed
  --> counter.she:3:1
     |
   3 | x = 2
     | ^
  help: use `var x = ...` if it needs to change.

Install

pip install she-lang

Then:

she                          # interactive prompt
she run hello.she            # run a program
she new my-project           # scaffold a project
she test                     # run tests
she fmt                      # format code

Nothing to compile, no toolchain to install. If you have Python 3.9+, you have SHE.

she: command not found? python -m she does the same thing and always works — python -m she run hello.she.

This happens when pip installs into a per-user folder that isn't on your PATH. It is common on Windows and on macOS/Linux with pip install --user. To fix it properly, add the folder pip named in its install warning to your PATH:

# Windows PowerShell, then open a new terminal
$s = python -c "import sysconfig; print(sysconfig.get_path('scripts','nt_user'))"
[Environment]::SetEnvironmentVariable("PATH", "$([Environment]::GetEnvironmentVariable('PATH','User'));$s", "User")
# macOS / Linux, then reopen your shell
echo 'export PATH="$PATH:'"$(python3 -m site --user-base)"'/bin"' >> ~/.zshrc

A virtual environment sidesteps it entirely, and is the better habit anyway: python -m venv .venv then .venv\Scripts\activate (Windows) or source .venv/bin/activate.

Optional extras — SHE works fully without these:

pip install "she-lang[all]"   # adds the crypto and web modules

crypto works on any supported Python. web wraps WebWeaveX, which needs Python 3.10 or newer — on 3.9 it is skipped and the module tells you so.


A tour in sixty seconds

Values and text

let pi = 3.14159        # cannot change
var count = 0           # can change
count += 1

say "pi is about {pi}"
say "a {{literal}} brace"

Deciding

if age >= 18
  say "you can vote"
else if age >= 16
  say "nearly there"
else
  say "not yet"
end

let price = if member then 20 else 40

Repeating

for each item in shopping
  say item
end

for each n in 1..10 by 2
  say n
end

repeat
  tries += 1
until tries >= 3

Functions

fun greet(who = "world") -> "Hello, {who}!"

fun total(...numbers) -> sum(numbers)

let double = fun(n) -> n * 2

say rectangle(width: 4, height: 3)

Matching

match value
  case 0 -> "nothing"
  case 1 | 2 | 3 -> "a few"
  case n if n < 0 -> "below zero"
  case [first, ...rest] -> "a list"
  case {name: n} -> "called {n}"
  case Point(x, y) -> "at {x},{y}"
  case _ -> "something else"
end

When things go wrong

try
  risky()
catch e: MathError
  say "maths problem: {e.message}"
catch e
  say "something else: {e.kind}"
finally
  say "cleaned up"
end

Everything it has

Values numbers, text, booleans, nothing, lists, maps, ranges, functions, your own types
Text interpolation "hi {name}", triple-quoted blocks, raw r"...", full text library
Control flow if/else if/else, while, repeat until, for each, break, skip, match
Functions defaults, named arguments, rest ...args, spread, closures, lambdas, recursion
Types type X has a, b, methods, inheritance, setup and to_text hooks
Pattern matching literals, ranges, or-patterns, guards, list and map destructuring, type patterns
Errors try/catch/finally, throw, catch by kind, assert
Gradual typing let n: number, fun f(a: text): number, unions — checked at runtime, never required
Concurrency async fun, await, await a whole list of tasks
Modules import math, from math import sqrt, use "./helpers.she" as helpers
Modern sugar pipelines |>, safe navigation ?., defaults ??, method syntax on every value
Testing test "name" ... end blocks with expect, run by she test
Security capability sandbox, step and time budgets, vetted crypto primitives
Tooling REPL, formatter, test runner, project scaffolder, doc browser, language server

Full reference: ni-sh-a-char.github.io/SHE/docs.html


Batteries included

import math      # sqrt, round, clamp, prime?, mean, median, stdev, trigonometry
import json      # parse, stringify, pretty
import re        # matches?, find_all, replace, split
import time      # now, today, format, parse, sleep
import random    # whole, choice, shuffle, dice, uuid
import csv       # parse, stringify
import crypto    # hash, hmac, password_hash, token, Kaalka encryption
import fs        # read, write, list, walk           [needs --allow-read/write]
import http      # get, post, json, download          [needs --allow-net]
import os        # env, run, platform                 [needs --allow-env/run]
import web       # extract, crawl, fingerprint        [needs --allow-net]

text, list, math, json, re, time and random are always available — no import needed. Everything that can touch the outside world must be imported and granted.


Two libraries, built in

SHE ships first-class bindings for two projects, exposed as ordinary modules.

crypto — Kaalka

Encryption whose key is a moment in time.

import crypto

let sealed = crypto.seal("meet at the bridge", "14:35:22")
say crypto.open(sealed, "14:35:22")

# Envelopes add sender, recipient and a checksum
let packet = crypto.envelope("the eagle has landed", "ada", "bob")
say crypto.open_envelope(packet, "bob")

seal / open armour Kaalka's output as base64 so ciphertext survives a file, a URL or a JSON field — raw Kaalka output does not.

Said plainly: Kaalka is a novel construction that has not been through public cryptanalysis. SHE ships it for time-keyed handoff, puzzles and teaching. For secrets that matter, the same module gives you crypto.hash, crypto.hmac, crypto.password_hash and crypto.token, which wrap vetted primitives. A language should be honest about which is which.

web — WebWeaveX

Turn a live app, a repository or a document into a deterministic graph.

import web

let graph = web.extract("https://example.com", "web")
say "{web.nodes(graph).length} nodes, {web.edges(graph).length} edges"

# The same input always produces the same identity
say web.fingerprint(graph)

Editor support

The VS Code extension in editors/vscode gives syntax highlighting, snippets, and live diagnostics via SHE's built-in language server.

cd editors/vscode && npm install && npm run package
code --install-extension she-lang-2.0.3.vsix

Any editor that speaks LSP can use she lsp directly.


Who it is for

Never programmed before? Start with examples/01-hello.she. The errors are written for you, and nothing you run can damage anything.

A student? Every feature you will be taught — recursion, closures, pattern matching, types, concurrency — is here, without a build system in the way.

A developer? Pipelines, destructuring, gradual types, a real test runner, a formatter and an LSP. pip install, and the whole toolchain is there.

Security work? Capability sandboxing, step and time budgets for running untrusted code, hashing, HMAC, password storage and token generation in the box.

A team? Scripts whose reach is declared on the command line and enforced by the runtime. Code review of a SHE script means reading one line of flags.


Contributing

Contributions are genuinely welcome — see CONTRIBUTING.md.

git clone https://github.com/ni-sh-a-char/SHE.git
cd SHE
pip install -e ".[dev]"
pytest              # the Python test suite
she test examples   # SHE's own tests

Good first issues are labelled good first issue. Adding a standard-library function is about ten lines and a docstring.


Support the project

SHE is free, Apache-2.0, and built in the open. If it saved you time, taught you something, or you just want to see it keep going:

Buy me a coffee

Starring the repo helps more people find it, and costs nothing. ⭐


Versions

Version What it is
2.0 (main) The language documented here — rewritten from scratch
1.0 (v1.0.0 branch) The original BASIC-style interpreter, kept for history

SHE 2.0 is not compatible with 1.0. The changelog explains why, and what changed.


Licence

Apache 2.0 — see LICENCE. Use it for anything, including commercially.

Metadata

Release files for she-lang 2.0.3

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for she-lang 2.0.3
File Size Uploaded
she_lang-2.0.3.tar.gz 101.0 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for she-lang 2.0.3
File Interpreter ABI Platform
she_lang-2.0.3-py3-none-any.whl Python 3 none any Details

Total release size: 193.1 kB

Release files / she_lang-2.0.3.tar.gz

Download URL she_lang-2.0.3.tar.gz
Size 101.0 kB
Tags Source
SHA-256 checksum
How to use checksums
a88c9fdd6a7def642afe855279f8ab52cf4ee6a1b108c86918af90bc46cec4bf
BLAKE2b-256 checksum
How to use checksums
f5d60df16ce0b92cc199a470b77d085ebbcdcc08cdf0c5cff904a93a852b3ea8
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Aug 28, 2026.

Transparency log

Release files / she_lang-2.0.3-py3-none-any.whl

Download URL she_lang-2.0.3-py3-none-any.whl
Size 92.1 kB
Tags Python 3
SHA-256 checksum
How to use checksums
7c34224d5d6945ee1bd986073390e72406248e37eb0cadf255388b9b81bd2531
BLAKE2b-256 checksum
How to use checksums
877db2ede38d81a08c61ce575011e44dd7de08d40f397a01c8e5f454c2b3f58c
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Aug 28, 2026.

Transparency log

Release history Release notifications | RSS feed

This release

2.0.3 This release

2 release files

2.0.2

2 release files

2.0.1

2 release files

2.0.0

2 release 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