[Feature] Low-resource preset (--lite) built from independent switches
Summary
There is no single way to run nanocoder gently on a weak machine, and several heavy behaviours have no switch at all. This proposal collects the switches into one optional preset. It should be done after the individual switches exist.
Steps to reproduce
- Search
sourcefor options that disable LSP auto-discovery, the update check, the welcome banner, the Ink frame rate or syntax highlighting. None exist. autoDiscover: trueis hard-coded insource/hooks/useAppInitialization.tsx:302,360;checkForUpdates()runs at:703;render()insource/cli.tsx:979has nomaxFps.
Expected behaviour
A documented opt-in preset (flag and/or config block) that turns the heavy defaults down in one step.
Actual behaviour
Only these exist today: sessions.autoSave, NANOCODER_LOG_DISABLE_FILE, the alternateScreen and mouse preferences, and --plain for run. --plain still loads about 1,034 modules (see the --plain issue).
Environment
- OS: Windows 11 (10.0.26300)
- Node: 22.22.3
- Nanocoder: 1.31.0 (main at be428fc7)
Suggested fix
Build it from independent pieces, each its own issue or PR:
- LSP auto-discovery opt-out (#1774)
- Update check opt-out and throttle (#1738, PR #1757)
- Frame-rate limit (
maxFps) - Lazy banner, lazy syntax highlighting
- MCP servers started on first tool use (needs design; not measured)
- Models.dev cost lookup off (needs design)
Then add --lite / lite: true as a bundle of those switches, off by default, documented in docs/configuration/. Needs maintainer agreement on scope.
Taking this issue
Proposed Implementation Plan: --lite Low-Resource Preset
I agree with the approach of building --lite as an aggregate preset composed of individual, independently configurable switches. Here is a proposed breakdown and roadmap:
Phase 1: Implement & Expose the Independent Switches
Before assembling the preset, ensure each component has its own dedicated switch and configuration property:
- LSP Auto-Discovery Opt-Out (#1774):
- Allow
lsp.autoDiscover: booleanin configuration and--no-lsp-discoveryflag, rather than hardcodingautoDiscover: trueinuseAppInitialization.tsx.
- Allow
- Update Check Control (#1738 / PR #1757):
- Honor
updateCheck: falseor throttle intervals so update checks can be suppressed in constrained/offline runs.
- Honor
- Ink Frame Rate Limiting (
maxFps):- Introduce
maxFpsin Ink render options (e.g., configui.maxFpsdefault 30-60, but configurable down to 10-15 FPS) insource/cli.tsxto dramatically cut CPU idle cycles on low-spec systems.
- Introduce
- Lazy Syntax Highlighting & Compact Welcome:
- Provide a toggle for a compact one-line header in place of the multi-line ASCII banner.
- Defer syntax highlighting and heavy terminal styling when running in low-resource mode.
- Lazy MCP Server Spawning (Design & Experiment):
- Defer starting configured MCP servers until the first tool execution requiring MCP, preventing unnecessary memory footprint and child processes at initial startup.
- External Cost/Token Lookups:
- Provide an offline/cached toggle to skip network roundtrips to external cost providers (e.g. models.dev).
Phase 2: Define and Compose the --lite Preset Profile
- CLI Flag & Config Schema:
- Add
--liteCLI argument andlite: booleanin configuration. - When
--lite/lite: trueis enabled, it acts as a default preset that sets:{ lsp: { autoDiscover: false }, updateCheck: false, ui: { maxFps: 15, compactBanner: true }, mcp: { lazyConnect: true }, costLookup: false }
- Add
- Precedence Rule: Explicit user flags/config (e.g.
nanocoder --lite --lsp) take precedence over the preset values.
Phase 3: Documentation & Testing
- Document the
--litepreset and each constituent option underdocs/configuration/. - Add unit tests verifying preset resolution, flag combinations, and fallback behavior.
Looking forward to maintainer feedback on the scope and order of operations before landing the sub-tasks!
Hey @rishu685, thanks for the detailed plan!
This is actually a meta-issue that can't be implemented yet - the individual switches it bundles (LSP opt-out, update check control, maxFps, etc.) don't exist in the codebase yet. The issue description mentions it "should be done after the individual switches exist." I'd suggest picking one of the foundational issues like #1819, #1820, #1822, #1823, or #1825 instead - those are ready to work on now (if not already taken by someone else) and will eventually feed into this preset.
Appreciate you thinking ahead though!