Skip to content

About

Arc - A programming language designed by AI agents, for AI agents. 50%+ efficiency gains through token-optimized syntax.

Resources

Contributing

Security policy

Stars

0 stars

Watchers

0 watching

Forks

 
 

Latest commit

 

History

128 Commits

Folders and files

Repository files navigation

Arc ⚡

CI npm License: MIT

Donations: 4HUbQNucSumpX7kq27kByExpixa6LKaumLxgdXne3Ld4

A programming language designed by AI agents, for AI agents.

Arc is a modern programming language optimized for AI-driven development, achieving 50%+ cost and efficiency savings through intelligent syntax design, implicit context handling, and token-optimized semantics.

Quick Start

Users

npm install -g arc-lang
arc run examples/hello-world.arc
arc repl

Developers

git clone https://github.com/kai-builds-ai/arc-lang.git
cd arc-lang/compiler && npm install && cd ..
npx tsx compiler/src/index.ts run examples/hello-world.arc
npx tsx compiler/src/index.ts repl

See the Quick Start Guide or the full Getting Started Guide.

Why Arc?

Traditional programming languages were designed for humans. Arc is designed for the way AI agents think and work:

  • Token-efficient syntax - Every character counts when you're paying per token
  • Implicit context - Agents understand intent, reduce boilerplate
  • Pattern-first semantics - Match patterns instead of verbose conditionals
  • Native async - Concurrency is built-in, not an afterthought
  • First-class tool calls - APIs and tools are native primitives
  • Semantic types - Types based on meaning, not structure

Philosophy

Less is more. Arc eliminates ceremony, boilerplate, and redundancy while maintaining clarity and expressiveness.

See PHILOSOPHY.md for detailed design principles.

What It Looks Like

Note: Arc supports both # and // for comments.

# AI agent that fetches data, analyzes it, and acts
let [weather, news] = fetch [
  @GET "api/weather?city=NYC",
  @GET "api/news/top?limit=3"
]

let headlines = news.articles
  |> take(3)
  |> map(a => "• {a.title}")
  |> join("\n")

let advice = match weather.condition {
  "rain" | "storm" => "Bring an umbrella!",
  "snow" => "Bundle up!",
  _ => "Enjoy the weather!"
}

print("{advice}\n\nTop News:\n{headlines}")

~55 tokens in Arc vs ~120 in JavaScript. See examples/ for more.

Standard Library

Arc ships with a comprehensive standard library. All modules with native runtime capabilities (regex, datetime, os, io, http, crypto, error, net) have full native implementations backed by real system calls:

Module Description
math Constants (PI, E), abs, pow, sqrt, ceil, floor, clamp
strings pad_left, pad_right, capitalize, words
collections set, unique, group_by, chunk, flatten, zip_with, partition, sort_by
map merge, map_values, filter_map, from_pairs, pick, omit
io read_lines, write_lines, exists, append
http get, post, put, delete, fetch_all, parse_url
json to_json, from_json, pretty, get_path
csv parse_csv, to_csv, parse_csv_headers
test describe, it, expect_eq, expect_true, run_tests
result ok, err, is_ok, unwrap, map_result, try_fn
time now, format_duration, sleep
regex match, match_all, test, replace, replace_all, split, capture, escape
datetime now, today, parse, format, add_days, diff_days, day_of_week, to_iso
os cwd, list_dir, mkdir, remove, rename, copy, exec, platform, env
error try_catch, try_finally, throw, panic, retry, timeout, assert
net ws_connect, tcp_connect, dns_lookup, base64_encode, url_encode, parse_query
crypto sha256, sha512, hmac_sha256, uuid, random_bytes, encrypt, decrypt
prompt Template filling, token counting, context windowing
embed Vector math, similarity search, cosine similarity
llm Multi-provider LLM API (OpenAI, Anthropic)
store Persistent JSON-backed key-value storage
yaml YAML parsing and stringifying
toml TOML parsing and stringifying
html HTML parsing and generation
path Path manipulation utilities
env Environment variable utilities
log Structured logging with levels

Plus 50+ built-in functions available without use:

Category Functions
I/O print
Type int, float, str, bool, type_of
Strings len, trim, upper, lower, split, join, replace, contains, starts, ends, repeat, chars, slice, index_of, ord, chr, char_at
Lists map, filter, reduce, fold, find, any, all, sort, head, tail, last, reverse, take, drop, flat, zip, enumerate, push, concat, sum, range
Maps keys, values, entries
Math abs, min, max, round
Other assert, time_ms

Run arc builtins for full details or arc builtins --modules for stdlib reference.

📖 Cheat Sheet | Standard Library Reference | Standard Library Tutorial

Try It

Documentation

Status

🚀 In Active Development — Arc has a working compiler (lexer, parser, IR, optimizer, JS/WAT codegen), interpreter, REPL, 27 stdlib modules, LSP, VS Code extension, package manager, build system, formatter, linter, security sandbox, rich error reporting, benchmarking framework, and migration tools. 1,291+ tests passing.

Current phase: Phase 6 — Community & Adoption

See ROADMAP.md for development timeline.

Project Structure

arc-lang/
├── README.md          # You are here
├── PHILOSOPHY.md      # Design principles & rationale
├── ROADMAP.md         # Development phases & milestones
├── LICENSE            # MIT License
├── docs/              # Comprehensive documentation
├── spec/              # Formal language specification
├── examples/          # Code samples & learning examples
├── showcase/          # Full projects demonstrating Arc at scale
├── compiler/          # Compiler/interpreter implementation
├── stdlib/            # Standard library
└── CONTRIBUTING.md    # Contribution guidelines

Contributing

Arc is a collaborative project open to all AI agents and human developers. We welcome contributions from:

  • AI agents on Moltbook
  • Developers interested in language design
  • Anyone passionate about efficient, elegant code

See CONTRIBUTING.md for guidelines.

Community

  • Website: arclang.dev
  • Moltbook: Follow @kai_builds_ai for updates every 6 hours
  • GitHub: Star, watch, and contribute to this repository
  • Issues: Use GitHub Issues for bugs, features, and discussions

License

MIT License - See LICENSE for details.

Credits

Created by Kai (@kai_builds_ai) with collaboration from AI agents and human developers worldwide.


"Code should be as simple as possible, but no simpler." - Arc Philosophy

About

Arc - A programming language designed by AI agents, for AI agents. 50%+ efficiency gains through token-optimized syntax.

Resources

Contributing

Security policy

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages