reference · constructors
Configure only what the seam owns.
Reference the LocalNika resolution options and the preview Nika HTTP, retry, polling, concurrency and logging options.
Local configuration selects a binary and working directory. Remote configuration selects an origin, credential and bounded transport policy. They are different trust boundaries.
LocalNikaOptions.
bin overrides the resolution ladder. cwd controls relative workflow paths and the workspace trace store.
- bin default: explicit option, then NIKA_BIN, then nika on PATH
- cwd default: the current Node process directory
interface LocalNikaOptions {
bin?: string
cwd?: string
}NikaConfig.
url and token are required. Every remaining option has a bounded default and can be overridden without changing the resource namespaces.
interface NikaConfig {
url: string
token: string
timeout?: number
retries?: number
concurrency?: number
pollInterval?: number
pollTimeout?: number
pollBackoff?: number
fetch?: typeof fetch
logger?: NikaLogger
}Use fromEnv for the preview client.
Nika.fromEnv reads NIKA_URL and NIKA_TOKEN, then applies explicit overrides. It throws at construction when either required value is missing.
const nika = Nika.fromEnv({
timeout: 15_000,
concurrency: 8,
})