Getting Started 🚀 ​
Welcome to the future of coding! Intend lets you write robust software at the speed of thought.
Prerequisite ​
You just need Node.js (v18+) or Bun installed.
1. Installation ​
Install the CLI globally:
bash
npm install -g @intend-it/cli
# or
bun add -g @intend-it/cli2. Initialize a Project ​
Create a fresh workspace. We'll set up everything for you.
bash
intend init my-ai-app
cd my-ai-appThis creates:
- 📄
intend.config.json(Your AI brain config) - 📂
src/intents/(Where magic happens) - 📂
out/(Where code lands)
3. Write Your First Intent ​
Delete the example and creating magic.intent. Let's do something that would be annoying to write manually, like parsing messy string input.
typescript
// src/intents/magic.intent
export entry intent ParseAndGreet() -> void {
step "Ask user for a messy input string (e.g. ' HI my name is MIKE!! ')" => const raw
// Using standard standard libs (RegExp) automatically!
step "Clean the string: trim, lowercase, remove special chars" => const clean
invariant "Name must be a palindrome"
step "Check if the name is a palindrome" => const isPalindrome
step "Log the result nicely"
}4. Build It ​
bash
intend buildWatch the CLI go to work. It will:
- Parse your intent.
- Generate the strict TypeScript implementation.
- Lock the successful code in
intend.lock.
5. Run It ​
The output is just TypeScript! Run it with bun or ts-node.
bash
bun out/magic.tsCongratulations! You just wrote an AI-native program.