🐕Dogfooding: This site is 100% built with FLIN v1.0.0-alpha.2
v1.0 Launch in -Join Discord
Latest Releasev1.0.0-alpha.2

Install FLIN

The Cognitive Programming Language Built-in AI

Code that thinks, remembers, and heals itself.

ADetected: macOS[change]

Run this in your terminal:

curl -fsSL https://flin.sh | bash
Download for Windows (64-bit)

Or use PowerShell:

irm https://flin.sh/install.ps1 | iex
Z

Zero Config

One file = full app. No build tools, no dependencies.

M

Memory Native

Built-in database with time travel. Every entity has complete history.

C

Cognitive

Self-healing apps that see, reason, and fix themselves.

A Complete Todo App. One File.

No dependencies. No config. No build step.This is real, working FLIN.

app/index.flin
// 1. Define your data (10 types, enums, 49 validators)
enum Priority { Low, Medium, High, Critical }

entity Todo {
    title: text @required @minLength(2)
    done: bool = false
    priority: Priority = "Low"
    due: time

    @index(done, priority)
}

// 2. State
newTitle = ""
filter = "all"

// 3. Functions (always type entity params)
fn add() {
    todo = Todo { title: newTitle }
    save todo
    newTitle = ""
}

fn toggle(t: Todo) {
    t.done = !t.done
    save t
}

fn remove(t: Todo) {
    delete t
}

// 4. Choose what to show
todos = match filter {
    "done" -> Todo.where(done == true)
    "pending" -> Todo.where(done == false)
    _ -> Todo.all
}

// 5. Template (just HTML + {curly braces})
<h1>My Todos ({Todo.count})</h1>

<form submit={add()}>
    <input bind={newTitle} placeholder="What needs doing?" />
    <button type="submit">Add</button>
</form>

{for todo in todos}
    <div>
        <input type="checkbox"
            checked={todo.done}
            change={toggle(todo)} />
        <span>{todo.title}</span>
        <button click={remove(todo)}>x</button>
    </div>
{/for}
L1
enum PriorityType-safe enums — auto-validated on save
L3-9
Entity = Database Table10 types, 49 validators, enums, @index
L14-15
Variables = Reactive StateChange a variable, UI updates automatically. No useState, no signals, no stores.
L18-21
save = Persist to DatabaseOne keyword. Data survives restarts. That's it.
L32-36
match = Pattern MatchingQuery your database with readable expressions. Chain .where(), .order_by(), .limit().
L39
{Todo.count} = Live QueriesDatabase queries work directly in templates. Always up to date.

Already Know TypeScript?

FLIN accepts JS/TS syntax as aliases.Use what you know. Learn the rest gradually.

These JS/TS habits work in FLIN

string=text
boolean=bool
number=float
null=none
function=fn
console.log(x)=log(x)
name.length=len(name)
TypeScript-style FLIN code
// Write TypeScript-style types
entity User {
    name: string
    email: string
    age: number
    active: boolean = true
}

// Use the function keyword
function greet(user: User) {
    console.log("Hello, " + user.name)
    return user.name.length
}

// null works like none
function findUser(id: int) {
    result = User.find(id)
    if result == null {
        return null
    }
    return result
}

Only 3 things are different

{ key: "val" }["key": "val"]Maps use square brackets
import X from YNot neededAuto-discovered by file location
class User &#123;&#125;entity User &#123;&#125;Built-in persistence + database

That's it. Everything else from JS/TS works unchanged: let, const, ??, ++, +=, try/catch, async/await.

Start with a Template

Choose your starting point. From minimal to fullstack.

Minimal1 file
flin new myapp

Quick experiments, learning syntax

StarterBeginner
flin new myapp --template starter

Counter demo, reactive variables

TodoIntermediate
flin new myapp --template todo

Entities, validators, CRUD operations

FlinUI180 components
flin new myapp --template flinui

Full component library with live demos

E-commerceAdvanced
flin new myapp --template ecommerce

Products, cart, checkout, orders, admin dashboard

W
Browse more at FLIN Hub

Visit hub.flin.dev for ready-made templates. Copy, don't install - you own the code. hub.flin.dev

What You Get

F
File-Based Routingapp/about.flin - /about
D
Built-in Databaseentity User - No SQL needed
T
Time Traveluser.history - See all past versions
U
180 UI ComponentsFlinUI embedded in the binary
Z
Zero ImportsComponents auto-discovered
G
Guards and Middlewareauth: required, rate_limit: 5/min
A
AI Gatewayask.claude - Built-in AI
S
380+ Built-in FunctionsStrings, math, crypto, dates — no packages

180 Built-in UI Components

FlinUI ships inside the FLIN binary. No npm install, no CDN, no config.Just use PascalCase names and they work.

F

Forms & Input

Input, Select, Checkbox, Switch, DatePicker, TagsInput, MultiSelect, RichTextEditor, CodeEditor

30 components
D

Data Display

Card, Badge, Avatar, Table, DataTable, Progress, Timeline, Calendar, Carousel, Accordion

31 components
C

Charts

BarChart, LineChart, PieChart, AreaChart, RadarChart, ScatterChart, HeatmapChart, GanttChart

13 components
N

Navigation

Navbar, Sidebar, Tabs, Breadcrumb, Pagination, Menu, ContextMenu, Dropdown, BottomNav

13 components
L

Layout

Grid, Flex, Stack, Container, Row, Divider, Section, Hero, ResizablePanels, ScrollArea

17 components
T

Templates

LoginForm, DashboardLayout, PricingTable, EmailClient, BlogLayout, FileManager, AuthLayout

14 components
S

E-commerce

ProductCard, CartItem, CartSummary, CheckoutForm, OrderSummary, ProductGallery, CouponCode

8 components
A

AI / Chat

ChatBubble, ChatInput, ChatMessages, AIResponseCard, AIPromptInput, AILoadingState

6 components
app/dashboard.flin
// No imports needed - just use them

<Navbar>My App</Navbar>

<Grid columns="3">
    <StatCard label="Users" value="1,234" icon="users" />
    <StatCard label="Revenue" value="$12K" icon="trending-up" />
    <StatCard label="Orders" value="89" icon="shopping-cart" />
</Grid>

<Card>
    <BarChart data="45,72,38,91,65" labels="Mon,Tue,Wed,Thu,Fri" />
</Card>

<Icon name="check" size="24" color="green" />
// 1,667 Lucide icons embedded
Zero ImportsComponents are compiled into the binary. No node_modules. No package.json.
1,667 IconsFull Lucide icon set. Use Icon component with any name, anywhere.
Dark ModeEvery component supports light and dark themes via CSS variables.
Server RenderedPure HTML + CSS output. No JavaScript bundle. Fast on any device.

Browse all 180 components with live demos:

flin dev embedded/flinui

Use FLIN as a Standalone Backend

Already have a React Native, Flutter, or Next.js app? Use FLIN as your backend.No Node.js. No separate database. Just FLIN.

FS

Full-Stack Recommended

FLIN handles frontend + backend + database

FLIN = React + Node.js + PostgreSQL
BE

Backend Only

Use with React Native, Flutter, Next.js

FLIN = Node.js + PostgreSQL
DB

Database Layer

Auto-generated REST API for your data

FLIN = PostgreSQL + Supabase
JWT
JWT Authenticationjwt_create(), jwt_verify(), Bearer tokens
KEY
API Keysapi_key_generate(), guard api_key
RL
Rate Limitingguard rate_limit(100, 60)
2FA
Two-Factor AuthTOTP, QR codes, backup codes
O2
OAuth2Google, GitHub, Discord, Apple
WS
WebSocketsReal-time, rooms, broadcast

Fullstack Template Structure

Everything you need. Zero configuration.

flin new myapp --template fullstack
myapp/
├── .flindb/                    # Database (auto-created on first save)
│   ├── wal.log                 # Write-Ahead Log (CRC-32 checksums)
│   ├── lock                    # Process lock (prevents dual access)
│   ├── data/
│   │   ├── Todo.flindb         # All Todo records (per entity type)
│   │   ├── User.flindb         # All User records
│   │   └── ...                 # Auto-checkpointed from WAL
│   ├── schema.flindb           # Full entity schemas (self-describing)
│   ├── meta.json               # Database metadata
│   ├── blobs/                  # File storage (content-addressable)
│   └── semantic/               # Embeddings for semantic search
│
├── app/                        # File-based routing
│   ├── _middleware.flin        # ROOT MIDDLEWARE (global auth)
│   ├── index.flin              # Home → / (public)
│   ├── login.flin              # Login → /login (public)
│   ├── register.flin           # Register → /register (public)
│   │
│   ├── dashboard/              # Protected dashboard area
│   │   ├── _middleware.flin    # DASHBOARD MIDDLEWARE
│   │   ├── index.flin          # Dashboard → /dashboard
│   │   ├── profile.flin        # Profile → /dashboard/profile
│   │   └── settings.flin       # Settings → /dashboard/settings
│   │
│   └── api/                    # API routes
│       ├── _middleware.flin    # API MIDDLEWARE (CORS, rate limits)
│       ├── auth.flin           # /api/auth (login/logout)
│       ├── users.flin          # /api/users (GET, POST)
│       └── users/
│           └── [id].flin       # /api/users/:id (GET, DELETE)
│
├── components/                 # Reusable components (auto-discovered)
│   ├── Header.flin             # <Header />
│   ├── Footer.flin             # <Footer />
│   ├── Navbar.flin             # <Navbar />
│   └── Card.flin               # <Card />
│
├── layouts/                    # Page wrappers (auto-discovered)
│   └── default.flin            # Default layout with {children}
│
├── lib/                        # Shared functions (auto-discovered)
│   ├── utils.flin              # Utility functions
│   ├── validators.flin         # Validation functions
│   ├── formatters.flin         # Formatting functions
│   └── constants.flin          # App constants
│
├── entities/                   # Data models
│   └── User.flin               # User entity
│
├── styles/                     # Shared CSS (auto-injected)
│   ├── global.css              # Base styles, reset
│   ├── theme.css               # Light/dark theme tokens
│   └── components.css          # Shared component styles
│
├── i18n/                       # Internationalization
│   ├── en.flin                 # English
│   ├── fr.flin                 # French
│   └── es.flin                 # Spanish
│
├── public/                     # Static assets
│   ├── favicon.ico
│   ├── icon.png
│   └── logo.png
│
├── backups/                    # Database backups
│
├── .env                        # Environment variables (secrets)
├── .gitignore                  # Ignores .flindb, .env, backups
├── llms.txt                    # LLM instructions
├── flin.config                 # Project configuration
└── README.md
Fapp/ = routes
D.flindb/ = database
Ccomponents/ = auto-discovered

After installation:

Terminal
# Create your first app
$ flin new my-app
$ cd my-app

# Start development server
$ flin dev

# Open http://localhost:3000

Your Entire Toolchain

One binary replaces Node.js, npm, webpack, prettier, jest, and more.No dependencies. No plugins. No config files.

flin --help
# Create
flin new myapp      [--template starter|todo|fullstack|flinui]
flin new myapp      [--demo]  — alias for --template fullstack

# Develop
flin dev            [path] [--port 3000] [--verbose]
flin run            file.flinc — Run compiled bytecode

# Quality
flin check          app.flin — Type check without building
flin fmt            [file.flin] [--check]
flin test           [--filter "pattern"] [--verbose]

# Production
flin build          app.flin [--output dist/]
flin start          [path] [--port 3000]
flin deploy         (coming Q2 2026)

# AI / Semantic Search
flin dev            — AI enabled by default (fastembed)
flin dev --lite     — No AI, minimal footprint (embedded/IoT)

# Manage
flin update
flin gc             [--dry-run|--sweep] [--grace-period 3600]
flin self uninstall
flin docs
# Syntax reference
flin docs syntax              All syntax topics
flin docs syntax variables    Detailed topic
    Topics: variables, entities, types, collections,
    operators, expressions, control, views, events

# Examples
flin docs examples            List all examples
flin docs examples todo       Show specific example

# Function reference (380+ functions)
flin docs len                  Help for a function
flin docs functions            All functions by category
flin docs functions strings    Functions in category
flin docs search "date"        Search functions

Learn FLIN by Example

4 built-in apps included with FLIN. Run them instantly to master the language.Everything is included -- no extra downloads.

Level 1Beginner

Starter

Reactive counter in ~10 lines. Learn variables and events.

Reactive variablesEvent handlersInline styles
flin dev embedded/starter
Level 2Intermediate

Todo App

Classic TodoMVC. Learn entities and data persistence.

Entity definitionsCRUD operationsValidatorsQueries
flin dev embedded/todo-app
Level 4Component Library

FlinUI Showcase

Browse all 180 components with live demos and dark mode.

180 components1,667 iconsChartsTemplatesE-commerceAI/ChatDark mode
flin dev embedded/flinui
T

Pro tip: The fullstack app demonstrates every FLIN feature. Copy code from it to your own projects. You own everything -- no node_modules, no dependencies.

Manage Your Installation

P

Configuring PATH

FLIN installs to ~/.flin/bin on Unix or %USERPROFILE%/.flin/bin on Windows.

The installer automatically adds this to your PATH. If flin --version doesn't work after install, restart your terminal or run:

source ~/.flin/env
U

Updating FLIN

Update to the latest version:

flin update

Or re-run the install script to get the latest version.

X

Uninstalling FLIN

To completely remove FLIN from your system:

flin self uninstall

This removes the binary and cleans up PATH entries.