Skip to content

Tool Kit

Collection of utility tools for Nuxt applications. What isn't used is cut at runtime.

Available Tools

$assert

Type-safe validation with ArkType integration.

ts
import { $assert } from '#appkit/tools'
const result = $assert(data, validator)

Find out more here

$bus

Event bus system for component communication.

ts
const { $bus } = defineBus("bus-name")

Find out more here

$cache

Global caching system with automatic cleanup.

ts
import { $cache } from '#appkit/tools'

Find out more here

$code

HTTP status codes and application error codes.

ts
import { $code } from '#appkit/tools'

Find out more here

$email

Template-based email system using Vue components.

ts
const { $email } = defineEmail({ templates })

Find out more here

$env

Environment variables and runtime configuration access.

ts
import { $env } from '#appkit/tools'
const env = $env()

Find out more here

$flags

Feature flags and boolean configuration management.

ts
import { $flags } from '#appkit/tools'

Find out more here

$id

Secure URL-friendly unique ID generation.

ts
import { $id } from '#appkit/tools'
const id = $id() // 21-char nanoid
const shortId = $id("nano", 8) // Custom length
const customId = $id("custom", "abc123", 6) // Custom alphabet

Find out more here

$message

Message handling and display system.

ts
import { $message } from '#appkit/tools'

Find out more here

$toast

Toast notification system with Vue components.

ts
const { $toast } = defineToasts({ components })

Find out more here

sleep

Simple async sleep utility function.

ts
import { sleep } from '#appkit/tools'
await sleep(1000) // Wait 1 second

Utilities in Development

The following tools are in development and not yet available:

  • $modal - Modal component system (planned)
  • $time - Time manipulation utilities (in development)
  • $pdf - PDF generation tools (in development)
  • $tasks - Task queue management (in development)
  • TS Utils - TypeScript utility types and functions
  • SDKs - Service integrations and API clients