/tsed:tsed-configurationfrom Ts.ED
Configures and bootstraps a Ts.ED v8 server: @Configuration decorator, PlatformExpress/Koa/Fastify bootstrap, server options, and @tsed/config sources.
Ships in Ts.ED. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
Read when SKILL.md points to them.
Keep all settings in one place (the Server class and src/config/), and read them through the DI configuration API instead of process.env scattered in services.
Read the server options reference before adding an option you have not used before. For depth, see https://tsed.dev/docs/configuration.md and https://tsed.dev/docs/configuration/server-options.md.
src/Server.ts, src/index.ts and src/config/ (a CLI project has config/config.ts, config/logger/index.ts, config/utils/index.ts).package.json: @tsed/platform-express, @tsed/platform-koa or @tsed/platform-fastify.config object or the @Configuration call.import "@tsed/platform-log-request";
import "@tsed/ajv";
import {Configuration} from "@tsed/di";
import {application} from "@tsed/platform-http";
import {config} from "./config/config.js";
import {UsersController} from "./controllers/UsersController.js";
@Configuration({
...config,
acceptMimes: ["application/json"],
httpPort: process.env.PORT || 8083,
httpsPort: false,
mount: {"/rest": [UsersController]},
middlewares: ["cookie-parser", "compression", {use: "json-parser"}, {use: "urlencoded-parser", options: {extended: true}}]
})
export class Server {
protected app = application();
}
configuration(Server, {...}) from @tsed/di after the class declaration.Partial<TsED.Configuration>. Declare custom keys by augmenting namespace TsED { interface Configuration { myKey: MyOptions } } in a declare global block.@tsed/ajv, @tsed/swagger, @tsed/platform-log-request, @tsed/config). A package that is never imported is never registered.mount; import controller classes. Do not use componentsScan.import {$log} from "@tsed/logger";
import {PlatformExpress} from "@tsed/platform-express";
import {Server} from "./Server.js";
try {
const platform = await PlatformExpress.bootstrap(Server, {/* extra settings */});
await platform.listen();
process.on("SIGINT", () => platform.stop().then(() => process.exit(0)));
} catch (error) {
$log.error({event: "SERVER_BOOTSTRAP_ERROR", message: (error as Error).message, stack: (error as Error).stack});
}
PlatformKoa from @tsed/platform-koa. Fastify: PlatformFastify from @tsed/platform-fastify. Same bootstrap(Server, settings?), listen(), stop() API.bootstrap() override @Configuration key by key; only mount, scopes and logger are merged.Platform*.create(Server) when no port must be opened (serverless, scripts): it forces httpPort: false and httpsPort: false.httpPort / httpsPort accept a number, "127.0.0.1:8081", 0 (random) or false (disabled). Defaults are 8080 and false. Set httpsOptions (key, cert) when HTTPS is enabled.middlewares: a function, a Ts.ED middleware class, a module name string, or {use, hook?, env?, options?}. Default hook is $beforeRoutesInit. Built-in names: json-parser, urlencoded-parser, text-parser, raw-parser.statics: {"/": [{root: "./public", hook: "$beforeRoutesInit"}]}.views: {root, extensions: {ejs: "ejs"}, viewEngine?}; requires @tsed/platform-views and @tsed/engines.logger: DILoggerOptions from @tsed/di (level, disableRoutesSummary, ignoreUrlPatterns, ...). Use tsed-logger for appenders and layouts.imports: modules/providers to build first, or overrides {token, use | useClass | useFactory | useAsyncFactory}.responseFilters: classes decorated with @ResponseFilter. See tsed-controllers.express.{bodyParser, router, app, version}, koa.{bodyParser, router, app}, fastify.{app, ...FastifyHttpOptions} and top-level plugins for Fastify plugins.import "@tsed/config";
import {withOptions} from "@tsed/config";
import {EnvsConfigSource} from "@tsed/config/envs";
import {JsonConfigSource} from "@tsed/config/json";
import {Configuration} from "@tsed/di";
@Configuration({
extends: [withOptions(JsonConfigSource, {path: "./config.json", priority: 1}), withOptions(EnvsConfigSource, {priority: 2})]
})
export class Server {}
@tsed/config/envs (EnvsConfigSource), /dotenv (DotEnvsConfigSource, needs dotenv dotenv-expand dotenv-flow), /json (JsonConfigSource), /yaml (YamlConfigSource, needs js-yaml).priority; the last one wins. Each source is also exposed under configs.<name>; the default name is the class name without ConfigSource, camel-cased (json, envs, dotEnvs, yaml). Override with name.withOptions also accepts validationSchema (a @tsed/schema object({...})), watch: true, refreshOn: "request" | "response", enabled.https://tsed.dev/docs/configuration/configuration-sources.md; do not reimplement them.import {constant, refValue, configuration, Injectable} from "@tsed/di";
@Injectable()
export class MailService {
private readonly from = constant<string>("mail.from", "[email protected]"); // read once
private readonly ttl = refValue<number>("cache.ttl", 60); // live: this.ttl.value
dump() {
return configuration().get<string>("env");
}
}
@Constant("mail.from") from: string (frozen copy, cached on first read) and @Value("cache.ttl") ttl: number (live, writable).injector().settings.get(key) is the same object as configuration().constant() at module top level: the configuration is not loaded yet. Call it in a class field, a factory, a hook, or a method.import "@tsed/config" (or a @tsed/config/<source> subpath): extends is silently ignored.priority = index, a withOptions() source gets 0 unless set. When mixing both forms, set priority explicitly.@Constant values are frozen and never refresh. Use refValue() / @Value with watch or refreshOn sources.hook: "$beforeInit" | "$onInit" | "$afterInit"; bootstrap throws.httpPort: process.env.PORT || 8083 evaluates at import time, before any .env source is loaded. Load dotenv through extends, or read the port from a source.@tsed/common. In v8 use @tsed/di, @tsed/platform-http, @tsed/platform-params, @tsed/schema. See tsed-migration.Server.ts imports the platform's required side-effect packages and every controller is mounted by class reference.index.ts bootstraps with the adapter matching the installed platform package and handles SIGINT/SIGTERM with platform.stop().TsED.Configuration augmentation.constant() / refValue() / @Constant / @Value, not process.env.extends sources have explicit priorities and a validationSchema for required keys.What SKILL.md sets; muted values are Claude Code's defaults
Three short reads, in order
13 skills in this plugin
/tsed-cliScaffolds Ts.ED v8 projects and generates files with the Ts.ED CLI v7, through its MCP server (tools set-workspace, init-project, list-templates, get-template, generate-file) or the tsed binary (tsed init, generate, template, add, run, update, dev, build). Use when creating a Ts.ED project, adding a controller, service, middleware, model, interceptor, pipe, decorator or custom template, when package.json has a "tsed" key or @tsed/cli, when a .templates/ directory exists, or on errors E_CWD_NOT_SET, E_PROJECT_NOT_INITIALIZED, E_TEMPLATE_UNKNOWN, E_ARGS_INVALID./tsed-controllersWrite Ts.ED v8 HTTP controllers and routes - @Controller paths and nested children, mounting through the `mount` configuration, verb decorators from @tsed/schema, parameter decorators from @tsed/platform-params, typed inputs, response decorators and custom endpoint decorators. Use when adding or fixing a REST endpoint, when a route returns 404 or is shadowed by another route, when @BodyParams/@QueryParams/@PathParams receive a plain object or the wrong type, or when working with @Returns, @Status, @Redirect, @View, @Hidden, @Req/@Res or useDecorators./tsed-diDeclare, inject and scope Ts.ED v8 providers and wire lifecycle hooks - @Injectable, @Module, @Controller, @Inject, the functional API (inject, injectMany, lazyInject, constant, refValue, injectable().factory/asyncFactory/class/value, injector, context, logger), ProviderScope, custom tokens, @tsed/hooks ($on, $emit, $asyncEmit, $alter) and request context. Use when writing services or modules with @tsed/di, fixing InjectionError, "Given token is undefined" or undefined injected properties, choosing a scope, adding $onInit/$onDestroy/$onReady, or replacing registerProvider and other deprecated DI APIs.npx claudepluginhub tsedio/tsed --plugin tsedOther plugins' skills for the same job