[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"project-2929":3},{"id":4,"name":5,"fullName":6,"owner":7,"repo":5,"description":8,"homepage":9,"htmlUrl":10,"language":11,"languages":10,"totalLinesOfCode":10,"stars":12,"forks":13,"watchers":14,"openIssues":15,"contributorsCount":15,"subscribersCount":15,"size":15,"stars1d":16,"stars7d":17,"stars30d":18,"stars90d":15,"forks30d":15,"starsTrendScore":14,"compositeScore":19,"rankGlobal":10,"rankLanguage":10,"license":20,"archived":21,"fork":21,"defaultBranch":22,"hasWiki":23,"hasPages":21,"topics":24,"createdAt":10,"pushedAt":10,"updatedAt":29,"readmeContent":30,"aiSummary":31,"trendingCount":15,"starSnapshotCount":15,"syncStatus":17,"lastSyncTime":32,"discoverSource":33},2929,"litecode","razvanneculai\u002Flitecode","razvanneculai","CLI Tool for 8k context ai models","",null,"TypeScript",114,12,3,0,1,2,8,47.14,"ISC License",false,"main",true,[25,26,27,28],"ai-agent","cli-tool","llm","ollama","2026-06-12 04:00:16","# LiteCode\n\n> The AI coding agent built for the models everyone actually has — free tiers, local models, and 8k context windows.\n![](.\u002Flitecodegif.gif)\n\nLiteCode lets you describe a code change in plain English and have an AI execute it across your entire project. No paid subscription. No 200k-token model required. Works right now with a free Groq account, a free OpenRouter key, or just Ollama on your laptop.\n\n\n\n---\n\n## What it does\n\n- **Multi-file edits from one instruction** — \"rename validateToken to verifyToken everywhere\" touches every file that needs changing, in the right order\n- **Never exceeds 8k tokens** — token budget is enforced in code before every single LLM call, not by hoping the model behaves\n- **Runs edits in parallel** — independent file changes happen at the same time; sequential ones wait for their dependencies\n- **Short-term memory** — LiteCode remembers the last 4 things it did in your project. Say \"undo the last change\" or \"also add a goodbye() function\" and it knows exactly what you mean. Memory is now passed to both the planner and executor *(expanded in v1.1)*\n- **Auto-sequential for local models** — when the configured provider is on `localhost`, executors run one at a time automatically, eliminating the parallel connection pressure that causes Ollama to drop requests\n- **Interactive TUI with scroll + mouse wheel** — persistent chat session, live token sidebar, scrollable history, diff viewer. Run `litecode` with no arguments, or use `--ansi` for the plain terminal mode\n- **Works with any free model** — Groq, OpenRouter, Ollama, LM Studio, Gemini, DeepSeek — all supported out of the box\n- **Context maps are plain Markdown** — readable by humans, cheap on tokens, safe to commit to git\n- **Diff preview before every write** — see exactly what the AI wants to change, file by file, before anything touches disk\n\n---\n\n## Short-Term Memory\n\nAs of v1.1, LiteCode remembers the last 4 actions it performed in each project. This memory is stored in `.litecode\u002Fmemory.json` inside your project and is injected into both the planner's and executor's prompts on every request so the AI can reason about what it previously did.\n\n**What this enables:**\n\n```bash\nlitecode \"add a hello() function that logs 'hi' to utils.js\"\n# → Planner adds hello(), applies, saves memory\n\nlitecode \"undo the last change\"\n# → Planner reads memory, knows hello() was added to utils.js, removes it\n\nlitecode \"also add a goodbye() function\"\n# → Planner sees recent context and makes the right decision\n```\n\n**How it works:**\n\n1. After the planner produces a task list, it also outputs a one-sentence `synthesis` describing what the plan will do (e.g. `\"Added a hello() function in utils.js\"`).\n2. After at least one file is successfully written to disk, LiteCode saves an entry with the user's original request, the synthesis, the files that were written, and a timestamp.\n3. The memory is a **ring buffer of 4** — the oldest entry is evicted when a fifth is added. This keeps the token cost negligible (~80–90 tokens per entry).\n4. On every subsequent request, the memory block is prepended to both the planner's and executor's system prompts so both the planning and editing stages can reason about \"last time\", \"undo\", \"revert\", \"previous\", etc. The executor only injects memory when it fits within the remaining token budget.\n\n**Token cost:** ~80–90 tokens per entry (~320–360 tokens for a full buffer of 4). The budget check (`canFit`) accounts for memory — if the project context is very large, folder context is dropped first, then memory, to ensure the planner always fits within your configured token limit. The executor guards memory injection independently with the same logic.\n\n**Storage:** `.litecode\u002Fmemory.json` — per-project, not global. You can add `.litecode\u002F` to your `.gitignore` if you don't want it committed.\n\n---\n\n## TUI by default (and how to opt out)\n\nLiteCode ships with a full TUI (terminal user interface) enabled by default, built on Ink + React. You get a two-pane layout — a scrollable chat\u002Fdiff view on the left and a live token\u002Fmodel sidebar on the right — plus per-task spinners, inline diff previews, and mouse-wheel scrolling. The TUI auto-activates whenever stdout is a TTY.\n\nIf you prefer the older plain-ANSI REPL — for piping, logging, recording sessions, or running inside environments where the TUI misbehaves — pass `--ansi`:\n\n```bash\nlitecode --ansi \"add a test for foo\"\nlitecode --ansi chat\n```\n\nNo other behavior changes — memory, diffs, and confirmation prompts all work identically in both modes.\n\n---\n\n## Why LiteCode?\n\nMost AI coding tools assume you have access to a 200k-token model. In practice, the free tiers and local models most developers actually use have **8k context windows** — barely enough for one large file, let alone a whole project.\n\nLiteCode was built from the ground up for this constraint. It never sends your entire codebase to the AI at once. Instead, it uses a three-stage system:\n\n```\nYou: \"rename the login function to authenticate everywhere\"\n         │\n         ▼\n┌─────────────────────────────┐\n│  PLANNER (1 AI call)        │\n│                             │\n│  Reads your project map     │\n│  + last 4 memory entries.   │\n│  Figures out which files    │\n│  need to change and in      │\n│  what order.                │\n│                             │\n│  Output: { synthesis, tasks }\n└────────────┬────────────────┘\n             │\n             ▼\n┌─────────────────────────────┐\n│  ORCHESTRATOR (pure code)   │\n│                             │\n│  Reads the task list.       │\n│  Figures out what can run   │\n│  in parallel vs. in order.  │\n│  Loads just the right code. │\n│  Checks token budgets.      │\n└──┬──────────┬───────────────┘\n   │          │\n   ▼          ▼\n┌──────┐   ┌──────┐   ← One AI call per file, running in parallel\n│ auth │   │login │\n│ .js  │   │ .js  │\n└──┬───┘   └──┬───┘\n   │          │\n   ▼          ▼\n  Edit       Edit       ← Pure code writes results back to disk\n             │\n             ▼\n    ┌─────────────────┐\n    │ memory.json     │  ← Synthesis + files saved after successful apply\n    └─────────────────┘\n```\n\nThe key insight: **only one file's worth of code ever goes to the AI at a time.** The AI doesn't need to see the whole project — it just needs to know what to change in this one file.\n\n---\n\n## Understanding the Context Map System\n\nBefore editing, LiteCode needs to understand your project. Running `litecode init --fast` generates plain Markdown files alongside your code:\n\n```\nyour-project\u002F\n├── project_context.md          ← \"What is this project?\" (~300–500 tokens)\n│                                  Tech stack, entry points, folder descriptions\n├── src\u002F\n│   ├── folder_context.md       ← \"What's in src\u002F?\" (~200–400 tokens)\n│   │                              Every file, one-line description, key imports\u002Fexports\n│   ├── auth.js\n│   ├── auth.js.file_analysis.md  ← Only for files >150 lines\n│   │                               Line-range index: what lives on which lines\n│   └── ...\n└── routes\u002F\n    ├── folder_context.md\n    └── ...\n```\n\n**Layer 1 — `project_context.md`:** The 30-second overview. Tech stack, which folder does what, entry points. The AI reads this first on every request.\n\n**Layer 2 — `folder_context.md`:** One per folder. Lists every file with a one-liner description. The AI uses this to know exactly which file to open.\n\n**Layer 3 — `*.file_analysis.md`:** Generated only for large files (over ~150 lines). Contains a line-by-line index so the AI can request only the section it needs — fitting even huge files into an 8k window.\n\nThese files are plain Markdown. You can read them. They're safe to commit to git — they act as a persistent record of your project's structure between sessions.\n\n---\n\n## Token Budget\n\nEvery LLM call is budgeted like this:\n\n```\nTotal context window:           8192 tokens\n─────────────────────────────────────────────\nSystem prompt + instructions:  ~1000 tokens\nReserved for AI response:      ~2000 tokens\nMemory (up to 4 entries):       ~360 tokens\n─────────────────────────────────────────────\nAvailable for your code:       ~4800 tokens  (≈ 140–190 lines)\n```\n\nThe token counter runs **before every LLM call**. If the code doesn't fit, LiteCode automatically falls back to loading just the relevant section using the file's analysis index. This check never gets skipped.\n\nPriority when budget is tight: folder context is dropped first, then memory, to preserve the most recent history as long as possible.\n\n---\n\n## Requirements\n\n- **Node.js** v18 or later\n- **npm**\n- An LLM provider (pick any — free options listed below):\n  - [Ollama](https:\u002F\u002Follama.com) — local, free, no account needed\n  - [LM Studio](https:\u002F\u002Flmstudio.ai) — local, free, no account needed\n  - [Groq](https:\u002F\u002Fgroq.com) — cloud, free tier, very fast\n  - [OpenRouter](https:\u002F\u002Fopenrouter.ai) — cloud, free tier, 100+ models\n  - [Google Gemini](https:\u002F\u002Faistudio.google.com) — cloud, generous free tier\n  - [DeepSeek](https:\u002F\u002Fplatform.deepseek.com) — cloud, very cheap, strong coder\n  - Any OpenAI-compatible endpoint\n\n---\n\n## Installation\n\n```bash\ngit clone https:\u002F\u002Fgithub.com\u002Frazvanneculai\u002Flitecode.git\ncd litecode\nnpm install\nnpm run build\nnpm link\n```\n\nAfter `npm link`, the `litecode` command is available globally in your terminal.\n\n> **Without installing globally:** Replace `litecode` with `npm run dev --` in all commands below.\n\n---\n\n## Quick Start (5 minutes)\n\n### Step 1 — Go to your project\n\n```bash\ncd \u002Fpath\u002Fto\u002Fyour\u002Fproject\n```\n\nLiteCode always operates on the **current directory**. Run all commands from inside the project you want to edit.\n\n### Step 2 — Connect to an LLM\n\n```bash\nlitecode connect\n```\n\nAn interactive menu will guide you through:\n- Selecting a provider (Ollama, Groq, OpenRouter, etc.)\n- Entering your API key (or leaving it blank for local models)\n- Picking a model from the live list\n- Setting your token limit\n\nThis saves a `litecode.json` file in your project directory. That file contains your API key — it is listed in `.gitignore` by default and will not be committed to git.\n\n### Step 3 — Map your project\n\n```bash\nlitecode init --fast\n```\n\nThis scans your project and writes the context map files. The `--fast` flag uses pattern matching to build maps instantly without any LLM calls. Use `litecode init` (without `--fast`) if you want AI-generated descriptions for every file.\n\n### Step 4 — Make a change\n\n```bash\nlitecode \"add error handling to the fetchUser function\"\n```\n\nLiteCode will plan the tasks, execute them, then show you a colored diff for each file and ask before writing anything:\n\n```\n  src\u002Fauth.js  modified ─────────────────────────────\n  --- src\u002Fauth.js\n  +++ src\u002Fauth.js\n  @@ -12,6 +12,10 @@\n   async function fetchUser(id) {\n  +  if (!id) throw new Error('id is required');\n     const res = await db.users.findById(id);\n  +  if (!res) throw new Error('user not found');\n     return res;\n   }\n\n  src\u002Fauth.js — apply? [y]es [n]o [a]ll [q]uit :\n```\n\nType `y` to apply, `n` to skip, `a` to apply all remaining files without prompting, or `q` to stop.\n\nTo skip all prompts (e.g. in scripts or CI):\n\n```bash\nlitecode --yes \"add error handling to the fetchUser function\"\n```\n\nOr start an interactive session:\n\n```bash\nlitecode\n```\n\n---\n\n## All Commands\n\n| Command | What it does |\n|---|---|\n| `litecode connect` | Choose your LLM provider, model, and API key |\n| `litecode init` | Scan project, generate AI-powered context maps |\n| `litecode init --fast` | Same, but instant — pattern matching only, no LLM |\n| `litecode map` | Regenerate all context maps |\n| `litecode map --fast` | Regenerate without LLM |\n| `litecode analyze \u003Cfile>` | Force-generate a detailed line-index for one specific file |\n| `litecode \"your request\"` | Run one request and exit (shows diff + prompts before each write) |\n| `litecode --yes \"your request\"` | Same, but applies all changes without prompting |\n| `litecode --sequential \"your request\"` | Force tasks to run one at a time (default for local providers) |\n| `litecode --parallel \"your request\"` | Force parallel execution even for local providers |\n| `litecode --verbose \"your request\"` | Print the chosen executor mode and token counts |\n| `litecode` | Start the interactive TUI (persistent chat, scroll, sidebar) |\n| `litecode --ansi` | Start the plain-terminal interactive mode (no TUI) |\n| `litecode chat` | Same as `litecode` |\n\n---\n\n## Writing Good Requests\n\nLiteCode works best with specific, concrete instructions:\n\n| Too vague | Better |\n|---|---|\n| `\"fix the bug\"` | `\"fix the null pointer crash in the login function in src\u002Fauth.js\"` |\n| `\"update the API\"` | `\"rename the POST \u002Fuser endpoint to POST \u002Fusers in routes\u002Fapi.js\"` |\n| `\"add logging\"` | `\"add a console.log at the start of every exported function in src\u002Futils.js\"` |\n| `\"refactor this\"` | `\"extract the database connection code from server.js into its own file src\u002Fdb.js\"` |\n\nYou don't need to name files if you don't know them — the Planner reads your project map and figures it out. But the more specific you are, the better the result.\n\n**Memory-aware requests** (v1.0+, expanded in v1.1):\n\n| Request | What LiteCode does |\n|---|---|\n| `\"undo the last change\"` | Reverses whatever it did in the previous run |\n| `\"revert what you did to auth.js\"` | Uses memory to find the specific change and reverses it |\n| `\"also add X\"` | Treats the current request as a continuation of the last one |\n\n---\n\n## Config Reference (`litecode.json`)\n\n```json\n{\n  \"provider\": {\n    \"baseURL\": \"https:\u002F\u002Fapi.groq.com\u002Fopenai\u002Fv1\",\n    \"apiKey\": \"gsk_...\",\n    \"model\": \"llama-3.3-70b-versatile\"\n  },\n  \"tokenLimit\": 8192,\n  \"reservedOutputTokens\": 2000,\n  \"systemPromptBudget\": 1000,\n  \"maxParallelExecutors\": 3\n}\n```\n\n| Field | What it controls |\n|---|---|\n| `provider.baseURL` | API endpoint. Must be OpenAI-compatible. |\n| `provider.apiKey` | Your API key. Set to `\"ollama\"` for local Ollama. |\n| `provider.model` | Model identifier as the provider expects it. |\n| `tokenLimit` | Hard cap per LLM call. Set to what your model actually supports. |\n| `reservedOutputTokens` | How many tokens to leave for the model's response. Default: 2000. |\n| `systemPromptBudget` | Tokens reserved for instructions. Default: 1000. |\n| `maxParallelExecutors` | How many file edits can run at the same time. Default: 3. |\n\nUsable code context per call = `tokenLimit - reservedOutputTokens - systemPromptBudget`\n\nAt the defaults (8192 \u002F 2000 \u002F 1000) = **~5192 tokens** for code.\n\n> **Note:** `litecode.json` is automatically added to `.gitignore` — it contains your API key and should never be committed. See `litecode.example.json` for the expected shape of this file.\n\n---\n\n## Free Provider Setup\n\n### Ollama (local, no account needed)\n\n```bash\n# Install Ollama from https:\u002F\u002Follama.com then:\nollama pull qwen2.5-coder:7b\nollama serve\n\n# In your project:\nlitecode connect   # Select \"Ollama\"\n```\n\nRecommended models:\n- `qwen2.5-coder:7b` — best instruction following for code edits\n- `codellama:7b` — solid, widely used\n- `deepseek-coder:6.7b` — great at structured JSON output (important for the planner)\n\n### Groq (cloud, free)\n\n1. Sign up at [groq.com](https:\u002F\u002Fgroq.com)\n2. Create an API key\n3. `litecode connect` → select **Groq**\n4. Paste your key, pick `llama-3.3-70b-versatile`\n\n### OpenRouter (cloud, free tier, most models)\n\n1. Sign up at [openrouter.ai](https:\u002F\u002Fopenrouter.ai)\n2. Create a free API key\n3. `litecode connect` → select **OpenRouter**\n4. Any model with `:free` in the name is free\n\n### Google Gemini (cloud, generous free tier)\n\n1. Get a key from [aistudio.google.com](https:\u002F\u002Faistudio.google.com)\n2. `litecode connect` → select **Google Gemini**\n3. Use `gemini-1.5-flash` for the best free tier limits\n\n---\n\n## Internal Architecture (for contributors)\n\n```\nlitecode\u002F\n├── src\u002F\n│   ├── cli\u002F\n│   │   └── index.ts          # Entry point, command definitions (Commander.js)\n│   │\n│   ├── orchestrator\u002F\n│   │   ├── planner.ts        # Sends project map + memory + request → gets { synthesis, tasks }\n│   │   ├── executor.ts       # Sends one file + one task to LLM → gets edited content\n│   │   ├── scheduler.ts      # Builds dependency graph, runs waves in parallel\n│   │   ├── applier.ts        # Writes LLM output to disk (or deletes files), returns applied paths\n│   │   └── memory.ts         # loadMemory \u002F appendMemory \u002F formatMemoryForPrompt (ring buffer of 4)\n│   │\n│   ├── context\u002F\n│   │   ├── mapper.ts         # Generates project_context.md and folder_context.md\n│   │   ├── analyzer.ts       # Generates *.file_analysis.md for large files\n│   │   └── loader.ts         # Reads maps and files, respects token budgets\n│   │\n│   ├── tokens\u002F\n│   │   ├── counter.ts        # Counts tokens for any string (tiktoken + fallback)\n│   │   └── budget.ts         # canFit() — checks if content fits before every LLM call\n│   │\n│   ├── llm\u002F\n│   │   ├── client.ts         # HTTP client for OpenAI-compatible APIs (plain fetch)\n│   │   └── prompts.ts        # System prompts for Planner and Executor roles\n│   │\n│   ├── tui\u002F\n│   │   ├── App.tsx           # Ink root component (two-pane layout)\n│   │   ├── store.ts          # Shared state for TUI (messages, spinners, usage)\n│   │   └── TuiDisplay.ts     # Display adapter that drives the TUI store\n│   │\n│   └── config\u002F\n│       └── config.ts         # Reads litecode.json, merges with ~\u002F.litecode\u002Fconfig.json\n│\n├── package.json\n├── tsconfig.json\n└── litecode.example.json     # Template config — copy to litecode.json and fill in your key\n```\n\n**Key design rules:**\n- The token counter runs before every LLM call. No exceptions.\n- The orchestrator never calls the LLM directly — only through `planner.ts` or `executor.ts`.\n- One executor = one file. Never two files in a single call.\n- Context maps are plain Markdown — readable by humans, cheap on tokens.\n- If one executor fails, the rest continue. Nothing crashes the whole run. Any files already written are rolled back to their original content.\n- File writes are atomic: content is written to a `.litecode.tmp` file first, then renamed into place. A crash mid-write never leaves a partial file.\n- Before writing a file, LiteCode re-reads it from disk. If it changed since execution started, the write is skipped to avoid overwriting external edits.\n- Memory is written only after at least one file is actually applied to disk — failed or skipped runs don't pollute history.\n- Memory is injected into both the planner and executor prompts. The executor only includes it when it fits within the remaining token budget.\n- No streaming. Full responses only — simpler and more reliable with small models.\n\n---\n\n## `.litecode\u002F` directory\n\nWhen you run LiteCode in a project, it creates a `.litecode\u002F` folder:\n\n```\n.litecode\u002F\n└── memory.json    ← Ring buffer of last 4 completed actions\n```\n\nYou can safely add this to `.gitignore` if you don't want it committed:\n\n```\n# .gitignore\n.litecode\u002F\nlitecode.json\n```\n\nOr commit it if you want memory to persist across machines and teammates. It's plain JSON — readable and diffable.\n\n---\n\n## Troubleshooting\n\n**\"No model configured\"**\nRun `litecode connect` in your project directory first.\n\n**\"Could not fetch model list\"**\nYour provider URL or API key is wrong. Run `litecode connect` again. You can also type a model name manually at the prompt.\n\n**Planner returns no tasks**\nThe project context maps are missing or empty. Run `litecode init --fast` first.\n\n**\"You mentioned 'X' but it doesn't exist on disk\"**\nYou referred to a file that doesn't exist yet. If you just created or renamed it, run `litecode init --fast` to refresh the maps, then retry.\n\n**\"Undo\" doesn't target the right file**\nMemory stores the last 4 completed runs. If more than 4 runs have passed since the change you want to undo, memory won't have it — name the file explicitly instead: `\"remove the hello() function from utils.js\"`.\n\n**Edits are wrong or incomplete**\n- Be more specific in your request (name the function, describe the exact change).\n- Run `litecode analyze src\u002Fyourfile.js` to give the agent a better line-level index before editing a large file.\n\n**Ollama drops connections**\nAs of v0.4, LiteCode detects local providers and runs tasks sequentially by default. If you're still hitting drops, confirm your `baseURL` is `http:\u002F\u002Flocalhost:11434\u002Fv1`. Use `--parallel` only if you've confirmed Ollama can handle concurrent requests.\n\n**Output has markdown fences (triple backticks) in the code**\nThe model wrapped its response in code blocks despite being told not to. LiteCode strips these automatically, but if it persists, switch to a model with stronger instruction-following (Qwen2.5-Coder or DeepSeek-Coder).\n\n---\n\n## Known Issues\n\n- **Weak models misclassify complex requests** — Models with poor instruction-following occasionally output non-JSON from the planner or generate markdown fences in executor output. Use Qwen2.5-Coder or DeepSeek-Coder for best results.\n- **Large binary files in project** — If your project contains large binary files (images, compiled assets) in the same directory, context map generation may be slow. Add them to a `.litecode_ignore` file (future feature) for now.\n- **Sequential task chains > 5 deep** — Very deep dependency chains may hit the planner's task limit on some small models. Break the request into smaller steps.\n\n---\n\n## Changelog\n\n### v1.1.0\n\n- **Atomic file writes** — Each file is written to a `.litecode.tmp` file first, then renamed into place. A crash or interruption mid-write can never leave a partial or corrupted file on disk.\n- **Conflict detection** — Before applying any edit, LiteCode re-reads the file from disk. If it changed since execution started (external editor, another process), the write is skipped with a warning rather than silently overwriting the change.\n- **Rollback on failure** — If a write fails partway through a multi-file run, all files already written in that batch are automatically restored to their original content.\n- **Deeper memory — 4 entries (was 2)** — The short-term memory ring buffer now holds the last 4 completed actions instead of 2, giving the AI more context for follow-up requests and \"undo\" operations.\n- **Memory reaches the executor** — Previously memory was only injected into the planner prompt. Now the executor (the component that actually edits each file) also receives memory context, so it can apply changes with full awareness of recent history. Memory is only injected when it fits within the remaining token budget.\n- **Accurate token counting fallback** — When tiktoken fails to initialize, the character-based fallback now uses a ratio of 4.0 chars\u002Ftoken (was 3.5), which is more accurate for source code. A warning is printed to stderr so the fallback is never silent.\n- **Rate limit delay respects config** — The inter-batch pause now reads `config.rateLimitDelayMs` (was hardcoded to 3000ms). Set it in `litecode.json` to tune for your provider.\n\n### v1.0.0\n\n- **Short-term memory** — LiteCode now remembers the last 2 completed actions per project in `.litecode\u002Fmemory.json`. The planner receives this history on every call and can reason about \"undo\", \"revert\", \"last time\", and contextual follow-ups like \"also add X\". Memory is only written after at least one file is successfully applied to disk — failed or query-only runs don't count.\n- **Planner synthesis** — The planner now outputs a `synthesis` field alongside `tasks`: a one-sentence plain-text description of what the plan will do (e.g. `\"Added a hello() function in utils.js\"`). This is stored in memory and used to inform the next request.\n- **Ring buffer eviction** — The memory file never grows beyond 2 entries. Each new successful run evicts the oldest entry automatically.\n- **Version bumped to 1.0.0.**\n\n### v0.4.0\n\n- **TUI by default** — Full Ink + React terminal UI with two-pane layout, live token sidebar, per-task spinners, and inline diff previews. Use `--ansi` to opt out.\n- **Mouse wheel + keyboard scroll** — Arrow keys, PgUp\u002FPgDn, `g`\u002F`G` for top\u002Fbottom, xterm SGR mouse wheel support.\n- **Auto-sequential for local models** — Any provider on `localhost` \u002F `127.0.0.1` \u002F `0.0.0.0` \u002F `::1` defaults to `maxParallelExecutors=1`. Use `--parallel` to override.\n\n### v0.3.0\n\n- **`--sequential` flag** — Force tasks to run one at a time (useful for Ollama and LM Studio).\n\n### v0.2.0\n\n- **Diff preview before every write** — Colored unified diff, per-file `[y]es \u002F [n]o \u002F [a]ll \u002F [q]uit` prompts.\n- **`--yes` flag** — Skip all prompts.\n- **`action_type: query`** — Read-only questions no longer write to files.\n\n### v0.1.x\n\n- **Stale map guard** — Explicit error when a mentioned file path isn't on disk, rather than silently misrouting the action.\n\n---\n\n## Contributing\n\nPull requests welcome. Before opening one:\n- Run `npm run build` to verify the TypeScript compiles clean.\n- Test against a small project with `litecode init --fast` followed by a simple edit request.\n- Keep the token-budget rules intact — every LLM call must go through `canFit()` before firing.\n- Memory must only be written when `appliedFiles.length > 0 && synthesis` — do not save memory for failed or query-only runs.\n- Copy `litecode.example.json` to `litecode.json` and fill in your own key for local testing. Never commit `litecode.json`.\n\n---\n\n## License\n\nISC — do whatever you want with it.\n\nLegal Disclaimer: LiteCode is an independent open-source project. It is not affiliated with, endorsed by, or in any way connected to any other company or product sharing the same name.\n","LiteCode 是一个专为8k上下文AI模型设计的命令行工具，支持多文件编辑、自动执行代码变更。其核心功能包括根据自然语言指令跨整个项目执行多文件修改，并确保每次调用LLM时不超过8k tokens限制；并行处理独立文件更改，同时维护短期记忆以支持撤销或追加操作。该工具特别适合于开发者希望在本地或使用免费服务如Groq、OpenRouter等进行快速代码迭代的场景。此外，它提供了交互式文本用户界面，支持滚动和鼠标滚轮操作，以及每个写入前的差异预览，确保了高度的可读性和安全性。","2026-06-11 02:51:44","CREATED_QUERY"]