Curl is an open-source programming language built on Python technology
Project description
Curl Programming Language
Curl is an open-source programming language built on Python technology, designed to be simple and expressive. Every statement uses a keyword{...}\ style, and blocks are opened with - and closed with --\.
Why Curl?
Most programming languages treat AI as an afterthought — a third-party library you install, a client you configure, boilerplate you copy from a docs page. By the time you write response.choices[0].message.content, you've already forgotten what you were building.
Curl does it differently. pcAI is part of the language itself, the same way print is part of Python. There is no setup, no import, no client object. From the very first line of your program, you can ask a question and get an answer:
pcAI.ask{"What should I name this variable?"}\
That's the entire program. Not a demo — that actually runs.
This is what makes Curl different from every other language: AI is native syntax, not a library. You don't bolt it on at the end. You design around it from the start. Want a bot that remembers what you said three messages ago? It already does. Want to give it a personality? One line. Want to drop into a full interactive chat from inside a script? One line. Want to run it against your own local model with no API key at all? Point one environment variable at Ollama and you're done.
Curl is for people who want to build AI-powered programs without wading through infrastructure. For students writing their first script. For developers who want to prototype an idea in ten minutes instead of an afternoon. For anyone who's ever thought I just want to ask the computer a question and had to install four packages first.
Other languages got AI added to them. Curl was designed with it at the center.
Requirements
- Python 3.7+
- Node.js (optional — only needed for
otherCoding{"JavaScript", ...}blocks)
Installation
From PyPI (recommended):
pip install curl-programming-lang
To upgrade:
pip install --upgrade curl-programming-lang
From source:
git clone https://github.com/gautamritvik/Curl-Programming.git
cd Curl-Programming
pip install -e .
Running the Curl terminal (REPL)
curlang
Running a Curl program
curlang [YOUR-FILE].curl
CLI flags
curlang --version show version
curlang --license show license
curlang --credits show credits
curlang --help show help
Syntax Reference
Print — pcType
Outputs text to the console. Supports string concatenation with +.
pcType{"Hello, World!"}\
pcType{"Hello, " + var{name} + "!"}\
Input — pcAsk
Prompts the user for input. The result is accessed anywhere with input{ans}.
pcAsk{"What is your name? >>"}\
pcType{"You said: " + input{ans}}\
Variables — var
Assign a value with var{name, value}\. Reference it later with var{name}.
var{name, "Ritvik"}\
pcType{var{name}}\
Variables can hold strings, numbers, or lists.
Lists — list
Create a list with items separated by ;. Typically assigned to a variable.
var{colors, list{"red"; "green"; "blue"}}\
pcType{var{colors}}\
Functions — createFunc / func
Define a function with createFunc{name}- and close it with --\. Call it with func{name}\.
createFunc{greet}-
pcType{"Hello from greet!"}\
--\
func{greet}\
Conditionals — if / elif / else
Simple if:
if{var{score} >= 90, then}-
pcType{"Grade: A"}\
--\
If / else:
if{var{score} >= 90, then}-
pcType{"Grade: A"}\
else:
pcType{"Grade: B or below"}\
--\
If / elif / else:
if{var{score} >= 90, then}-
pcType{"Grade: A"}\
elif{var{score} >= 80, then}-
pcType{"Grade: B"}\
else:
pcType{"Grade: C or below"}\
--\
For
if+elifchains without anelse, close with--\--\.
Supported comparison operators: == != < > <= >=
Loops — while / for
While loop — repeats while a condition is true:
var{x, 0}\
while{var{x} < 5}-
pcType{var{x}}\
var{x, var{x} + 1}\
--\
For loop — iterates a variable from start up to (not including) end:
for{i, 0, 5}-
pcType{var{i}}\
--\
The loop variable
iis available inside the block asvar{i}.
Embedded code blocks — otherCoding
Run a block of code written in another language. The closing }\ must be on its own line.
otherCoding{"Python",
x = 10
print("x =", x)
}\
Supported languages:
| Language | Status |
|---|---|
| Python | Fully supported |
| JavaScript / Node.js | Supported (requires Node.js) |
| Java, C, C++ | Not supported at runtime |
Import — import
Import a Python package and give it a nickname.
import{"math", m}\
AI — pcAI + Curl-Bot
pcAI is a built-in AI module — no import required. It defaults to DeepSeek via OpenRouter (free).
Setup — get a free key at openrouter.ai/keys, then:
export CURL_AI_KEY=sk-or-your_key_here
That's all. pcAI defaults to Curl-Bot automatically.
Ask a question:
var{reply, pcAI.ask{"What is the capital of France?"}}\
pcType{var{reply}}\
Interactive chat loop (type exit to quit):
pcAI.chat{""}\
Set a custom persona:
pcAI.context{"You are a friendly pirate who answers in rhymes."}\
var{reply, pcAI.ask{"What is 2 + 2?"}}\
pcType{var{reply}}\
Other methods:
var{s, pcAI.summarize{"some long text"}}\
var{a, pcAI.analyze{"some data"}}\
var{mood, pcAI.sentiment{"I love this!"}}\
var{t, pcAI.translate{"Bonjour — translate to English"}}\
pcAI.reset{""}\
Conversation history is kept across
pcAI.askcalls and auto-compacts when it gets long.
Want to use a different model? Override with env vars:
| Variable | Default | Description |
|---|---|---|
CURL_AI_KEY |
(required) | OpenRouter key, OpenAI key, etc. |
CURL_AI_BASE_URL |
https://openrouter.ai/api/v1 |
API base URL |
CURL_AI_MODEL |
deepseek/deepseek-chat-v3-0324 |
Model name |
Works with OpenRouter (recommended, free models available), OpenAI, Ollama, or any OpenAI-compatible API.
Symbols
| Symbol | Meaning |
|---|---|
\ |
End of a statement |
- |
Start of a block |
--\ |
End of a block |
{} |
Argument container |
"" |
String / text data |
; |
Separator inside lists |
, |
Separator between parameters |
== |
Equals |
!= |
Not equals |
= |
Assignment |
+ |
Concatenation / addition |
- |
Subtraction |
* |
Multiplication |
/ |
Division |
Example program
var{name, "Ritvik"}\
pcType{"Hello, " + var{name} + "!"}\
var{score, 95}\
if{var{score} >= 90, then}-
pcType{"You got an A!"}\
else:
pcType{"Keep trying!"}\
--\
createFunc{sayBye}-
pcType{"Goodbye, " + var{name} + "!"}\
--\
func{sayBye}\
Example AI program
pcAI.context{"You are a helpful tutor."}\
var{answer, pcAI.ask{"Explain what a variable is in one sentence."}}\
pcType{var{answer}}\
License
This project is licensed under the Apache License 2.0 (OSI-approved). See the full license at: https://github.com/gautamritvik/Curl-Programming/blob/main/LICENSE
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file curl_programming_lang-1.5.1.tar.gz.
File metadata
- Download URL: curl_programming_lang-1.5.1.tar.gz
- Upload date:
- Size: 20.1 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
14c26f0e793b9024c8c6dcbccfb57a9fa33fb1d5fc814966f6584dfd50d3b7e7
|
|
| MD5 |
7a639123664ed207178a944da8795a10
|
|
| BLAKE2b-256 |
15868ea0150b065c2186dedf12b0e4e71a2d3d93911937816804056a3812e2b4
|
Provenance
The following attestation bundles were made for curl_programming_lang-1.5.1.tar.gz:
Publisher:
publish.yml on gautamritvik/Curl-Programming
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
curl_programming_lang-1.5.1.tar.gz -
Subject digest:
14c26f0e793b9024c8c6dcbccfb57a9fa33fb1d5fc814966f6584dfd50d3b7e7 - Sigstore transparency entry: 1770471698
- Sigstore integration time:
-
Permalink:
gautamritvik/Curl-Programming@6c9cb2a79836c6d10e86bfcafe16324b869e43d6 -
Branch / Tag:
refs/tags/v1.5.1 - Owner: https://github.com/gautamritvik
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@6c9cb2a79836c6d10e86bfcafe16324b869e43d6 -
Trigger Event:
push
-
Statement type:
File details
Details for the file curl_programming_lang-1.5.1-py3-none-any.whl.
File metadata
- Download URL: curl_programming_lang-1.5.1-py3-none-any.whl
- Upload date:
- Size: 22.1 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
66241e67388662cd02019ebdd4ccbdd4fa8becd53a0df005390ddf3d2d6b921c
|
|
| MD5 |
afb90ac388b0a4d86522c322904f687b
|
|
| BLAKE2b-256 |
0a0769a7d8057c462388c53068fa0a182594638f0447894b0e5daee4b833a3ae
|
Provenance
The following attestation bundles were made for curl_programming_lang-1.5.1-py3-none-any.whl:
Publisher:
publish.yml on gautamritvik/Curl-Programming
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
curl_programming_lang-1.5.1-py3-none-any.whl -
Subject digest:
66241e67388662cd02019ebdd4ccbdd4fa8becd53a0df005390ddf3d2d6b921c - Sigstore transparency entry: 1770471861
- Sigstore integration time:
-
Permalink:
gautamritvik/Curl-Programming@6c9cb2a79836c6d10e86bfcafe16324b869e43d6 -
Branch / Tag:
refs/tags/v1.5.1 - Owner: https://github.com/gautamritvik
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@6c9cb2a79836c6d10e86bfcafe16324b869e43d6 -
Trigger Event:
push
-
Statement type: