Skip to content

Hello World

Write and run your first Jac program in 2 minutes.


Create a file named hello.jac:

with entry {
print("Hello, World!");
}

Run it:

jac hello.jac

Output:

Hello, World!

Congratulations! You just wrote your first Jac program.


with entry {
print("Hello, World!");
}
PartMeaning
with entryThe program’s starting point (like main() in other languages)
{ }Code block (Jac uses braces, not indentation)
print()Built-in function to output text
;Statement terminator (required in Jac)

Want to go beyond a single file? Jac can scaffold a complete full-stack application in one command.

With the jac-client plugin installed, run:

jac create example --use fullstack
cd example
jac add
jac start main.jac

This creates a full-stack project with a Jac backend and a React frontend, ready to go at http://localhost:8000.


Jacpacks are ready-made Jac project templates you can spin up instantly. Since --use accepts a URL, you can run any jacpack directly from GitHub:

jac create my-todo --use https://raw.githubusercontent.com/jaseci-labs/jacpacks/main/multi-user-todo-app/multi-user-todo-app.jacpack
cd my-todo
jac add
jac start main.jac

Here are some jacpacks to try:

JacpackDescription
multi-user-todo-appFull-stack authenticated todo application
multi-user-todo-meals-appTodo app + AI meal planner powered by Jac’s AI integration
AI_Study_HelperEducational platform with specialized AI agents
TasteTalkRestaurant feedback management system
jac-gptDocumentation assistant for the Jac language
jac-playgroundBrowser-based Jac code editor
AlgoVoice-enabled personal AI assistant

Want to try one with AI built in? The multi-user-todo-meals-app uses Jac’s AI integration features to generate smart shopping lists with costs and nutritional info. It works out of the box with an Anthropic API key:

export ANTHROPIC_API_KEY="your-key-here"
jac create meals-app --use https://raw.githubusercontent.com/jaseci-labs/jacpacks/main/multi-user-todo-meals-app/multi-user-todo-meals-app.jacpack
cd meals-app
jac add
jac start main.jac

To use any of the other jacpacks, just swap the URL:

jac create my-app --use https://raw.githubusercontent.com/jaseci-labs/jacpacks/main/<jacpack-name>/<jacpack-name>.jacpack

Ready for something more substantial?