UNPKG

@nanocollective/nanocoder

Version:

A local-first CLI coding agent that brings the power of agentic coding tools like Claude Code and Gemini CLI to local models or controlled APIs like OpenRouter

52 lines 1.78 kB
/** * Environment-based configuration for Pino logger */ import type { EnhancedLoggerConfig, LoggerConfig } from './types.js'; /** * Get the default log directory based on platform * Follows OS conventions: * - macOS: ~/Library/Logs/nanocoder * - Linux: ~/.local/state/nanocoder/logs (XDG_STATE_HOME) * - Windows: %LOCALAPPDATA%/nanocoder/logs */ export declare function getDefaultLogDirectory(): string; /** * Create development configuration */ export declare function createDevelopmentConfig(): EnhancedLoggerConfig; /** * Create production configuration * * In production, we want: * - File logging enabled at 'info' level by default (for diagnostics) * - Console/UI output silent (to avoid polluting the user interface) * * The log level here controls what gets written to files. * Console output is suppressed by using file-only transport. */ export declare function createProductionConfig(): EnhancedLoggerConfig; /** * Create test configuration */ export declare function createTestConfig(): EnhancedLoggerConfig; /** * Get configuration based on current environment * * For CLI tools, we default to production (silent) behavior when NODE_ENV is not set. * This gives users a clean experience. Developers working on nanocoder itself should * explicitly set NODE_ENV=development to see debug logs. */ export declare function getEnvironmentConfig(): EnhancedLoggerConfig; /** * Validate log level */ export declare function validateLogLevel(level: string): boolean; /** * Normalize log level string */ export declare function normalizeLogLevel(level: string): string; /** * Create configuration with overrides */ export declare function createConfig(overrides?: Partial<LoggerConfig>): EnhancedLoggerConfig; //# sourceMappingURL=config.d.ts.map