Getting Started

Installation

Requires Bun runtime:

curl -fsSL https://bun.sh/install | bash

Install Tkeron:

bun install -g tkeron

Verify:

tk

Create Your First Project

Initialize a New Project

tk init my-website
cd my-website

This creates a new directory with a sample project structure:

my-website/
├── websrc/              # Source files
│   ├── index.html       # Main page
│   ├── index.ts         # TypeScript for index
│   ├── index.pre.ts     # Pre-rendering script
│   └── *.com.html       # Sample components
├── tkeron.d.ts          # TypeScript definitions
└── tsconfig.json        # TypeScript configuration (auto-generated)

Initialize in Current Directory

tk init .

Force Overwrite

tk init my-website --force

Build Your Project

tk build

Source is always websrc/, output is always web/. No arguments needed.

Output structure:

web/
├── index.html       # Processed HTML (components inlined)
├── index.js         # Compiled TypeScript
└── ...              # Other processed files

.com.html, .com.ts, .com.md, and .pre.ts files are not copied to output — they're processed and inlined.

Start Development Server

tk dev

This will:

  1. Build your project
  2. Start a server at http://localhost:3000
  3. Watch for file changes
  4. Automatically reload the browser on changes

Custom port:

tk dev 8080

Custom port and host:

tk dev 8080 0.0.0.0

Your First Component

1. Create a Component File

Create websrc/my-greeting.com.html:

<div style="padding: 1rem; background: #f0f9ff; border-radius: 8px;">
  <h2>Hello from Tkeron!</h2>
  <p>This is a reusable component.</p>
</div>

2. Use the Component

Edit websrc/index.html:

<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="UTF-8" />
    <title>My First Tkeron Site</title>
  </head>
  <body>
    <h1>My Website</h1>
    <my-greeting></my-greeting>
    <my-greeting></my-greeting>
  </body>
</html>

3. Build and View

tk build

Open web/index.html — the greeting component is inlined twice, with no <my-greeting> tags remaining.

What Gets Processed?

File TypePurposeIn Output?
.htmlRegular HTML pagesYes
.ts / .jsScripts for pagesYes (compiled)
.com.htmlHTML componentsNo (inlined)
.com.tsTypeScript componentsNo (inlined)
.com.mdMarkdown componentsNo (inlined)
.pre.tsPre-rendering scriptsNo (executed)
.cssStylesheetsYes
Images, fonts, etc.Static assetsYes

Component Resolution

Components are resolved in this order:

  1. Same directory as the file using it
  2. Any subdirectory of websrc/ (glob search)

This means you can organize components in folders and they'll be found automatically.

Common Commands

tk                    # Show version
tk build              # Build project
tk dev                # Start dev server
tk dev 8080           # Dev server on port 8080
tk init my-project    # Initialize new project
tk init .             # Initialize in current directory
tk init my-project --force  # Force overwrite

Next Steps