CLI Reference

Complete reference for the Tkeron command-line interface.

Installation

Requirements: Bun runtime

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

This installs the tk command globally.

Commands

tk (no arguments)

Display the Tkeron banner with version information.


tk build

Build your project by processing source files into static output.

Aliases: b

tk build

Convention:

Examples:

tk build
tk b

Build Process:

  1. Copies source to temp directory
  2. Runs .pre.ts files (pre-rendering)
  3. Iterative component processing (up to 10 iterations):
  4. Processes .com.ts components (highest priority)
  5. Processes .com.html components
  6. Processes .com.md components (lowest priority)
  7. Repeats until no changes are detected
  8. Compiles TypeScript to JavaScript
  9. Copies result to target directory
  10. Cleans up temporary directory

Excluded from output: *.com.html, *.com.ts, *.com.md, *.pre.ts


tk develop

Start a development server with hot reload.

Aliases: dev, d

tk dev [port] [host]
ArgumentDefaultDescription
port3000Server port
hostlocalhostServer host

Examples:

tk dev
tk dev 8080
tk dev 8080 0.0.0.0
tk d

Features:

URLServes
/aboutabout.html
/docs/guidedocs/guide.html
/blog/blog/index.html

tk init

Initialize a new Tkeron project.

Aliases: i

tk init <projectName> [--force]
ArgumentRequiredDescription
projectNameYesProject directory name, or . for current

Options: --force — Overwrite existing files without prompting

What It Creates:

project-name/
├── websrc/
│   ├── index.html
│   ├── index.ts
│   ├── index.pre.ts
│   ├── hero-section.com.html
│   ├── user-badge.com.ts
│   └── ...
├── tkeron.d.ts
└── tsconfig.json

tk init also generates a tsconfig.json with the correct include paths for IDE/TypeScript language server support. If a tsconfig.json already exists, tkeron merges only the required entries without overwriting your settings.

Command Aliases

Full CommandAliases
tk buildtk b
tk developtk dev, tk d
tk inittk i

Environment Variables

VariableDescription
TKERON_VERSIONCurrent Tkeron version. Available inside .pre.ts files only (set automatically by tkeron)
NODE_ENVStandard environment variable. Not set by tkeron — use it in .pre.ts to control build behavior
NODE_ENV=production tk build

Configuration

Tkeron uses convention over configuration. No config files needed.

Defaults:

Directories are not configurable via CLI — always websrc/web/.

TypeScript Configuration

Optional tsconfig.json for editor support (generated by tk init):

{
  "compilerOptions": {
    "target": "ESNext",
    "module": "ESNext",
    "moduleResolution": "bundler",
    "lib": ["ESNext", "DOM"],
    "strict": true,
    "skipLibCheck": true
  },
  "include": ["websrc/**/*", "tkeron.d.ts"]
}

Integration

npm Scripts

{
  "scripts": {
    "dev": "tk dev",
    "build": "tk build",
    "build:prod": "NODE_ENV=production tk build"
  }
}

CI/CD (GitHub Actions)

name: Build and Deploy
on:
  push:
    branches: [main]
jobs:
  build:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v3
      - uses: oven-sh/setup-bun@v1
      - run: bun install -g tkeron
      - run: tk build
        env:
          NODE_ENV: production

Quick Reference

tk init my-site && cd my-site   # Create project
tk dev                          # Start development
NODE_ENV=production tk build    # Build for production
tk dev 8080                     # Dev on port 8080
tk init . --force               # Init in current dir

Next Steps