Create new AILANG file: /ailang-new <name> [hello|http|json|ai]
Creates new AILANG project files from predefined templates with automatic verification.
/plugin marketplace add sunholo-data/ailang_bootstrap/plugin install sunholo-data-ailang@sunholo-data/ailang_bootstrapCreate a new AILANG file named $1.ail using the specified template.
Arguments: $1 = filename, $2 = template (default: hello)
You MUST create the file $1.ail with the appropriate template content below.
Write this to $1.ail:
module $1
export func main() -> () ! {IO} {
print("Hello from AILANG!")
}
Then run: ailang check $1.ail && ailang run --caps IO --entry main $1.ail
Write this to $1.ail:
module $1
import std/net (httpGet)
export func main() -> () ! {IO, Net} {
let body = httpGet("https://httpbin.org/get");
print(body)
}
Then run: ailang check $1.ail && ailang run --caps IO,Net --entry main $1.ail
Write this to $1.ail:
module $1
import std/json (decode)
export func main() -> () ! {IO} {
let json = "{\"name\":\"Alice\",\"age\":30}";
let data = decode(json);
print(show(data))
}
Then run: ailang check $1.ail && ailang run --caps IO --entry main $1.ail
Write this to $1.ail:
module $1
import std/ai (call)
export func main() -> () ! {IO, AI} {
let response = call("Hello! Say something brief.");
print("AI: " ++ response)
}
Then run: ailang check $1.ail && ailang run --caps IO,AI --entry main $1.ail