Skip to main content

AlpieLocal

AlpieLocal is a command-line coding agent for exploring repositories, editing code, debugging, and running verification commands. It supports online inference through a configured endpoint and offline inference with local GGUF models through llama.cpp.

For an in-depth explanation of the agent workflow, System 1 controller, tools, verification, and multimodal processing, see Inside AlpieLocal: Architecture Guide.

Requirements

  • Python 3.9 or newer. Python 3.11 or 3.12 is a practical choice for native runtime compatibility.
  • Windows, Linux, or macOS with a compatible Python architecture.
  • Internet access for package installation and the initial model/runtime downloads.
  • Sufficient disk space, RAM, and optional GPU memory for the selected model and context size.
  • Your project's own tools, such as Git, Node.js, or a test runner, when the task requires them.

Offline hardware guidance

The default Q3 text weights occupy approximately 4.4 GiB, and the vision projector adds approximately 0.86 GiB. Loading also needs memory for context/KV cache, compute buffers, the operating system, and project tools.

These are planning estimates for text tasks at 4,096–8,192 tokens, not certified minimum specifications:

Execution mode Practical starting configuration Preferred configuration
CPU only Compatible 64-bit CPU, 4 or more cores, 16 GB system RAM Modern CPU with 8 or more cores and 32 GB RAM
NVIDIA CUDA 16 GB system RAM and 6 GB VRAM with partial GPU offload 32 GB system RAM and 8 GB or more VRAM
Apple Silicon Metal Native arm64 Python and 16 GB unified memory 24–32 GB or more unified memory

Reserve at least 15 GB of free disk space for model assets, the environment, and download caches; source builds and project dependencies can need more. Machines with 8 GB RAM may run into memory pressure and are not the recommended baseline. Larger contexts, images, and video frames increase memory use; the configured 262,144-token ceiling is not a laptop memory recommendation.

A dedicated GPU is optional. CPU inference is slower, and the runtime must match the CPU architecture and instruction support. Bundled CPU wheels cover supported Windows x64 and Linux x64/ARM64 platforms; Intel Macs require a compatible manual build. Apple Silicon uses shared memory rather than separate GPU VRAM. Development probes loaded the model on an RTX 3050 with 6 GB VRAM using partial offload and a 16,384-token context; this does not establish compatibility with every 6 GB GPU.

Before loading, AlpieLocal reports available memory and an attention-cache estimate where the model metadata supports it. A known cache allocation exceeding the applicable memory pool stops before model allocation. Partial offload, unknown layouts, and runtime/vision overhead remain estimates rather than a guarantee of fit. Choose a smaller context explicitly with --ctx-size when needed; setup preserves saved context and output budgets instead of raising them during migration.

To force CPU operation, set the variable before starting chat:

# Windows PowerShell
$env:ALPIELOCAL_CPU = "1"
alpielocal chat --offline --no-thinking --ctx-size 8192
# Linux or macOS
ALPIELOCAL_CPU=1 alpielocal chat --offline --no-thinking --ctx-size 8192

Installation

Global command with pip or pip3

Outside an activated virtual environment, install for your user account with either command:

pip install --user alpielocal
or
pip install alpielocal
pip3 install --user alpielocal
or
pip3 install alpielocal

Use the command associated with your Python 3 installation. Interpreter-specific alternatives are py -m pip install --user alpielocal on Windows and python3 -m pip install --user alpielocal on Linux or macOS.

Ensure Python's user scripts directory is on PATH, reopen your terminal, then check and start the CLI:

alpielocal --version
alpielocal

If pip reports an externally-managed-environment error, use pipx, uv, or a virtual environment as described below. To upgrade a user installation, run pip install --user --upgrade alpielocal or pip3 install --user --upgrade alpielocal.

Global command with pipx

pipx makes alpielocal available across projects while keeping its Python dependencies in a dedicated environment.

Windows PowerShell

py -m pip install --user pipx
py -m pipx ensurepath

Linux, Ubuntu or Debian

sudo apt update
sudo apt install pipx
pipx ensurepath

macOS, with Homebrew

brew install pipx
pipx ensurepath

Open a new terminal, then install and check the command:

pipx install alpielocal
alpielocal --version

For other Linux distributions, use the pipx installation guide linked above. A pipx installation is available from your terminal without activating a project environment.

Python virtual environment

Windows PowerShell

py -3.12 -m venv .venv
.\.venv\Scripts\Activate.ps1
python -m pip install --upgrade pip
python -m pip install alpielocal

If PowerShell blocks activation, install and run through the environment's interpreter directly:

.\.venv\Scripts\python.exe -m pip install alpielocal
.\.venv\Scripts\alpielocal.exe --version

Linux or macOS

python3 -m venv .venv
source .venv/bin/activate
python -m pip install --upgrade pip
python -m pip install alpielocal

On Debian or Ubuntu, install python3-venv if creating the environment fails. Use an installed Python version in place of py -3.12 when necessary.

Install with uv

Install uv using the command for your platform.

Windows PowerShell

powershell -ExecutionPolicy ByPass -c "irm https://astral.sh/uv/install.ps1 | iex"

Linux or macOS

curl -LsSf https://astral.sh/uv/install.sh | sh

Open a new terminal. To make AlpieLocal available across projects in a managed tool environment:

uv tool install --python 3.12 alpielocal
uv tool update-shell

Reopen the terminal if PATH was updated, then run alpielocal --version. Alternatively, create a project environment:

uv venv --python 3.12 .venv

Activate .venv using the Windows or Linux/macOS activation command above, then run:

uv pip install alpielocal
alpielocal --version

uv environments do not need pip installed to use uv pip. Choose either a global tool installation or a project environment so it is clear which CLI and runtime you are using. See the uv tools guide for details.

Existing environments

Activate your existing venv, virtualenv, Conda, uv, or Poetry environment, then install into its Python interpreter:

python -m pip install --upgrade alpielocal
python -c "import sys; print(sys.executable)"
alpielocal --version

If the environment has no pip, use its package manager; for example, uv pip install alpielocal or poetry add alpielocal. AlpieLocal does not require a uv-created environment. Its runtime installer may use uv when available, but targets the interpreter running AlpieLocal.

From this repository

From the repository root, with your chosen environment activated:

python -m pip install -e .
alpielocal --version

For a global command from the checkout, use pipx install . instead. Source installation includes changes that may not yet be available in a published package.

First use

Start interactive chat

Run AlpieLocal from the project you want to work on:

cd path/to/project
alpielocal

The explicit chat command is equivalent:

alpielocal chat

After completing offline initialization, start local chat with:

alpielocal chat --offline --no-thinking --ctx-size 8192

Type your request at the prompt. Use /help for chat commands, /status for session diagnostics, and exit or quit to leave. If installed into a virtual environment, activate it before starting chat.

Interactive terminals accept input while a task runs automatically; --queue-input is optional. The execution harness also runs by default. Use /harness off in chat or --no-harness at startup to select the ordinary coding loop.

This mode keeps one pending request and an editable draft. The pending request starts after the current task finishes and saves its checkpoint; workspace, model, and slash-command changes also wait. Approvals use a separate prompt and require a fresh answer. /cancel or Ctrl+C requests cancellation and clears the pending request; /exit waits for cleanup before leaving. Queued text and drafts belong to the current chat and are not saved across restarts. Redirected input uses standard chat input; --no-queue-input also selects sequential input.

Use /btw What does requestAnimationFrame do? to ask a separate question while the agent works. Online answers use an independent request to the configured model. Offline answers run between task model calls because the local model handles one inference at a time; the task then resumes. Side answers have no tools or access to task history, cannot change the task's instructions, and are not included in its verification. One side question may be pending at a time. They also work at the idle chat prompt. Answers received during an approval are displayed after that approval is answered.

Each verbose turn displays whether reasoning was requested. Received reasoning activity is shown separately; full reasoning text is shown only with --debug. Native offline tool turns that disable reasoning report that mode explicitly. --quiet suppresses these notices.

To add direction to the running task, enter /steer Keep the public API unchanged. Steering is accepted during model generation and applied at the next model boundary. The previous response cannot execute tools once superseded. Original requirements and completed edits remain, and verification must cover the added direction. During tools, approvals, or final verification, steering is rejected explicitly and kept in your draft; retry when generation resumes or use /cancel. Steering does not grant command approval or reset execution budgets.

Classic chat and single-task runs share the same display for tool activity, command diagnostics, diffs, and final status. Streamed answers appear once. Final statuses distinguish completed, partial, failed, cancelled, and needs-input tasks; a disconnected or incomplete response is reported as unverified.

Use --quiet to suppress per-turn output while retaining the final result, or --debug to show available reasoning and diagnostic events. Animation is disabled when output is redirected to a file or pipe. These flags control presentation; --thinking and --no-thinking control model reasoning where supported.

Textual interface

Running alpielocal, alpielocal chat, or alpielocal resume in an interactive terminal opens the full-screen Textual interface automatically. Textual is included in the standard installation. It provides streaming Markdown, collapsible tool logs, highlighted diffs, a multiline editor, and approval dialogs through the same task service, verification, session storage, permissions, and online/offline backends as plain terminal chat.

The dark interface uses restrained teal accents, compact expandable tool rows, and a multiline prompt. Press Ctrl+D to toggle session and context details. Tool rows show the file or command; expand a row to inspect its exact arguments and output. The activity line reports current execution and the final verified status.

From this checkout, install into your active environment:

uv pip install -e .
alpielocal

The pip equivalent is python -m pip install -e .. For a published package containing this feature, choose one isolated global installation:

uv tool install --python 3.12 alpielocal
pipx install alpielocal

The existing alpielocal entry point is used for all installation methods. Upgrade with uv tool upgrade alpielocal or pipx upgrade alpielocal, according to the installer used. These environments isolate CLI dependencies from project dependencies; model files and llama.cpp initialization still require the offline setup below.

alpielocal --permissions review
alpielocal --offline --ctx-size 8192
alpielocal resume --keymap vim
alpielocal --ui terminal
Control Action
Enter Insert a newline
Ctrl+Enter, Ctrl+S, F4, or Send button Submit the prompt in Emacs or Vim mode; Ctrl+S and F4 work without enhanced keyboard support
Ctrl+J Submit; also handles terminals that encode Ctrl+Enter as a line feed
Ctrl+C or Cancel button Request cancellation and clear the pending request; idle Ctrl+C copies a selection
Ctrl+Q Exit after task cleanup
Ctrl+G Edit the draft in VISUAL or EDITOR, then return without submitting
Ctrl+V or Alt+V Paste clipboard images, copied files or text; Alt+V works when the terminal intercepts Ctrl+V
Ctrl+Backspace Remove the last draft attachment
F2 Switch between Emacs editing and Vim mode
Ctrl+End Scroll to the latest output
Tab / Shift+Tab Move between controls; use Enter or Space on a focused tool heading to expand it

If your terminal sends the same signal for Ctrl+Enter and Enter, use Ctrl+S or F4 to send. Enter continues to insert a newline; submission shortcuts also work in Vim normal mode and never approve an open permission dialog.

Paste or drag local image, video, PDF or text/source file paths into the prompt. File-only pastes become draft attachments labeled [Image #1], [Video #1], [PDF #1] or [File #1]; ordinary prose remains text. Quoted paths with spaces, local file:// URLs and Windows paths under WSL are supported. This does not change the working directory. Add your request and press Send. Up to eight files can belong to one draft; a queued request keeps its own attachments while the current task continues.

For a screenshot copied as image data, press Alt+V (or Ctrl+V if the terminal forwards it). WSL uses the Windows clipboard through an available powershell.exe; native platforms use Pillow and optional clipboard support. Headless or unsupported clipboard access reports a clear message; pasting a file path remains available. Terminals do not universally deliver binary clipboard contents through their ordinary paste shortcut.

Attachment snapshots remain under .alpielocal/attachments/. Images use the vision pipeline; videos use sampled frames, without implied audio or full-video coverage. PDFs require alpielocal[documents] and provide bounded page text with coverage labels, not OCR of scans. Text/source documents use bounded UTF-8 extraction. Limits are 8 MiB per image, 512 MiB per video and 32 MiB per document. /image and /video remain available for persistent session attachments.

Emacs controls include Ctrl+A/E, Ctrl+B/F, Ctrl+P/N, Alt+B/F, Ctrl+K/U, and the TextArea selection/undo controls. Vim starts in insert mode; Escape enters normal mode, with h/j/k/l, w/b, 0/$, G, x, u, and i/a/o. This is a focused set of prompt-editing bindings, not a full Vim emulator. For your complete editor configuration, set VISUAL or EDITOR; include a wait flag for graphical editors that return before editing finishes. Linux/macOS fall back to an installed nano or vi, and Windows falls back to Notepad.

Input during execution keeps one queued request and one editable draft. /steer and /btw use the same boundaries described above. Approval dialogs require a separate explicit choice, default to rejection, and preserve the draft. The sidebar labels context counts as estimates and shows reasoning, harness, task-route and approval settings. Narrow terminals hide the sidebar. Displayed history and outputs are bounded; saved task history remains separate. Drafts and the pending request are not restored after exit. Redirected input/output automatically uses plain terminal chat; --ui terminal selects it explicitly, and --no-queue-input selects sequential terminal input. The older alpielocal[tui] installation alias and explicit --ui textual option remain supported.

After an unfinished staged full-stack task, continue or please continue in the same session resumes its original requirements. The harness validates the saved contract and reruns application gates against the current files; it does not treat old receipts as proof that the application still works. An edited contract requires explicit review and a new project request. Builder recovery preserves unfinished source and verifies repairs before any failure-based rollback; repeated inspection alone does not extend the task budget.

Slash commands in chat

Start alpielocal or alpielocal chat, then enter these commands at the chat prompt:

Command Purpose
/help Show the command directory. Alias: /?
/tags Show inline prompt flags and attachment shortcuts
/status Show the model, mode, estimated context usage, working directory, and attachments. Alias: /info
/compact Compact idle conversation context while preserving saved history and protected task evidence
/cost Show observed online/offline tokens, response latency, reported cache usage, and missing accounting
/permissions [MODE] Select guarded, suggest, auto-edit, full-auto, or read-only; reset clears session allowances
/harness [on|off] Enable or disable the execution harness for subsequent tasks; omit the value to show the setting
/task-type [auto|os|code|fullstack|gui] Select automatic routing or a specific task type; setting a value also enables the harness
/auto-approve [on|off] Explicitly enable or revoke automatic host approvals for this chat; read-only and sandbox restrictions remain enforced
/network-policy [auto|allow|deny] Set tool networking; deny also switches inference offline
/ctx-size [TOKENS] Set a positive context-window size for subsequent requests
/max-turns [COUNT] Set the hard model-turn ceiling for subsequent requests or full-stack workers
/adaptive-turns [on|off] Renew smaller turn windows when executed tools show recent progress; enabled by default
/force-thinking [on|off] Request forced reasoning where the backend/harness supports it; off restores normal reasoning routing
/cancel With interactive input, request cancellation of the active task and clear the pending request
/steer <instruction> With interactive input, add direction to the running task at a safe model boundary
/btw <question> Ask a separate question without changing the current task
/terminal help Show commands for managed interactive and background processes
/thinking on or /thinking off Enable or disable model reasoning. Alias: /reasoning
/no-thinking Disable reasoning for subsequent requests. Alias: /non-thinking
/debug on or /debug off Enable or disable discovery diagnostics
/offline Select local GGUF inference. Alias: /local
/online Return to the configured online endpoint, preserving the endpoint used before /offline
/model NAME Set the model identifier used for API requests; omit NAME to show it
/image "PATH" Attach image files; /image clipboard captures a screenshot explicitly
/image clear Remove active image attachments
/video "PATH" Set video attachments; frames are extracted on the next request
/video clear Remove active video attachments
/url YOUTUBE_URL Set a YouTube video URL for the next request; requires permitted network access
/github OWNER/REPO Set the target GitHub repository for subsequent requests
/cd "DIRECTORY" Change the active workspace. Alias: /workdir
/pwd Show the active workspace
/diff Show the current uncommitted Git diff
/undo Review and restore eligible journaled task changes, with conflict checks
/undo --list List reversible filesystem sessions
/undo --session ID Restore a specific reversible session
/doctor Run environment and development-tool diagnostics
/research QUERY Ask the researcher subagent to inspect the codebase
/review Ask the reviewer subagent to audit the current diff, or the project if the diff is empty
/test [INSTRUCTIONS] Ask the tester subagent to run project checks with optional instructions
/subagents List specialist subagents and their permitted tools
/sessions List saved conversations. Alias: /history
/save Save the current conversation. Alias: /checkpoint
/init [basic|standard|advanced] Scaffold project documentation and persistent-memory files
/clear Reset the conversation context. Alias: /reset
/exit Leave chat. Aliases: /quit, /q; exit, quit, and q also work

/init creates project documentation; run alpielocal init from your terminal to set up model files and the GGUF runtime. For local coding tasks, use /no-thinking after /offline. /model selects an API model identifier; local GGUF weights are selected through the model configuration described below.

/undo and terminal command alpielocal undo use recorded task changes. Restoration is refused when later edits conflict; unrelated user changes are preserved. Arbitrary shell side effects may fall outside the recorded undo scope.

Execution settings are shared by Textual and plain terminal chat. They apply between tasks and are not saved as global defaults. A setting submitted during a task waits in the pending-input slot; it does not change the running task's permissions or routing. Stop managed terminals before changing these settings. /status shows the active configuration.

Coding tasks start with a 24-turn window online or 16 turns offline. Recent, distinct source changes or passing registered checks can renew that window up to --max-turns (200 by default). Full-stack builders use the same renewable windows within each worker. Repeated reads, identical writes, rejected edits, and arbitrary successful shell commands do not earn extensions. /adaptive-turns off or --no-adaptive-turns restores the fixed configured budget. Cancellation, approvals, loop guards, and verification still apply; extra turns never count as proof of completion.

alpielocal run "Finish the application and verify its requested behavior" --adaptive-turns --max-turns 200

For example, start alpielocal, then enter:

/harness on
/task-type os
Copy README.md to README.backup.md and verify the copy.
/undo --list
/task-type code
Find and fix the failing test in this project.
/task-type auto

/task-type fullstack selects the staged web application harness; /task-type gui selects desktop automation. /harness off returns to the ordinary task loop. Pasted commands such as alpielocal run "Organize these files" --harness --task-type os also apply the routing flags inside chat.

Managed terminal sessions

At the chat prompt, start a process and use its returned session ID:

/terminal start python -u -c "print(input('Name: '))"
/terminal read <id>
/terminal send <id> Arya
/terminal read <id> <next_cursor>
/terminal list
/terminal stop <id>

read returns buffered output and a next_cursor; pass that cursor to read subsequent output. send appends a newline. For exact whitespace or control input, use a JSON string, such as /terminal write <id> " value = 1\n". /terminal eof <id> closes pipe input after queued bytes. Input receipts distinguish queued bytes from delivered bytes; neither proves the application processed them.

Pipe sessions are the portable path. Linux and macOS additionally support /terminal pty <command> and /terminal resize <id> <rows> <cols>; Windows ConPTY is not implemented. Output is polled and sanitized rather than rendered as a full-screen terminal. Each chat permits four running processes, with a 256 KiB output buffer per process, a 16 KiB pending input limit, and a one-hour runtime ceiling. Processes close on chat exit and are not recreated by session resume.

The agent also has a task-owned terminal tool in both inference modes. Model-proposed input requires approval, except in Full-Auto for a process already running under that same sandbox policy. Task-owned processes must stop before verification and close when the task ends. User-started /terminal processes belong to the chat and may remain between tasks. Stop running chat terminals before changing permission modes.

Coordinated specialist tasks

For larger coding tasks, the agent can use run_subagents to delegate up to three independent jobs to specialists, then integrate_subagents to combine their proposals. These tools are offered for medium/high-complexity tasks or when you explicitly ask for specialists or subagents. Each worker receives the original request, an assigned task, separate context, a workspace copy, and an explicit list of files it may edit. The parent should agree on shared interfaces first and schedule dependent work in a later batch.

Online jobs can run concurrently against the configured endpoint. Offline jobs use the same local model sequentially to avoid overlapping access to its inference context or loading extra model copies. Both modes support the same proposal and integration workflow; delegation adds model calls and is usually unnecessary for a small fix.

Workers can inspect files and propose edits. The parent runs commands and checks the combined application. Integration rejects overlapping file assignments, changed user files, altered proposals, and invalid syntax. It respects patch permissions and records changes for /undo. A worker's successful report is a proposal, not evidence that the application works.

Example prompts:

Build a responsive gift shop. Use specialists for independent UI, cart logic, and test preparation. Agree on DOM IDs and module interfaces before delegating; integrate and test the complete site.

Create a Pong game. Split independent game logic, presentation, and regression tests into small specialist tasks. Verify controls, collisions, scoring, and restart after integration.

Investigate this failing test with independent code-tracing and regression-test specialists. Keep the final diagnosis and minimal repair with the parent, then rerun the original failing check.

Each parent task permits four batches, with at most six model turns per worker and eight assigned files per job. Each assigned or proposed file is limited to 1 MiB, with an 8 MiB content budget per batch. Workspace copies exclude dependencies and common state/credential paths; copies are limited to 5,000 files and 50 MiB. Proposal manifests and patches remain under .alpielocal/jobs/. These copies isolate ordinary file edits; they are not OS process sandboxes.

The bundled full-stack-development workflow covers verifiable milestones, API contracts, database migrations, authorization, external integrations, and checks across the browser, server, and database. Staged full-stack runs load focused architecture, backend, frontend and integration workflows as each phase begins.

Execution harness

The CLI enables bounded ACI tools, task routing and context policies by default in online and offline modes. Full-stack build/fix requests mentioning full-stack, or both frontend and backend, use fresh architecture, backend, frontend, and integration sessions. Informational questions remain ordinary answers:

alpielocal run "Build a full-stack notes application with persistent storage"
alpielocal
alpielocal run "Fix the failing parser tests" --offline --ctx-size 16384
alpielocal run "Fix the failing parser tests" --no-harness

For a new project without a specified stack, the picker offers Vanilla, React, Vue, Angular, Go, Flask, Django and FastAPI. Specify the stack in your prompt to skip the question. Existing manifests inform selection. Setup checks the selected runtime and installs declared project dependencies through the existing permission flow. Missing system runtimes require approval for a native package-manager installation; network-disabled sessions require cached or preinstalled dependencies. Python frameworks use a project environment. In staged full-stack work a Python backend still needs a frontend; the architecture defaults to Vanilla unless another frontend is requested.

Relevant SKILL.md workflows load automatically before generation in online and offline modes, including with --no-harness. Selection uses your request, explicit skill names, the observed stack and the active phase. Coding tasks also select testing guidance within the context budget. Django's native verifier uses manage.py test unless the project explicitly configures pytest.

Task skills

AlpieLocal ships 69 workflows for coding, debugging, testing, web stacks, automation, data, documentation and other engineering tasks. To request one explicitly, write Use systematic-debugging to investigate this crash or Use test-engineering to add regression coverage in chat.

Project workflows live in .agents/skills/<name>/SKILL.md and override user and bundled workflows of the same name. .alpielocal/skills/ and verified reusable workflows in .alpie/skills/ are also discovered. A project skill needs YAML frontmatter with name matching its directory and a concise description explaining when it applies, followed by its instructions.

Only relevant workflows enter the active prompt: up to three complete bodies, within 12,000 characters offline or 16,000 online and the space remaining after required context, tool schemas and response reserves. Workflows that cannot fit are deferred with a visible explanation. Phase changes replace conflicting domain workflows. Instructions survive compaction, refresh when their source changes, and are selected independently for delegated workers. The agent can use list_skills and activate_skill (load_skill without the harness) for a different subtask. After manual activation or a workflow change during generation, further mutations wait for the next model turn to receive those instructions.

Using skills: ... and /status show loaded workflows. Task records include their source paths and content hashes; missing or oversized workflows produce visible diagnostics instead of silently truncated instructions. Skills guide decisions; permissions, guarded edits and verification gates still control execution and completion. Loading a skill is not evidence that every instruction was followed or that an application works.

JavaScript/TypeScript grammars are included in supported Python installations. Add browser support into the same environment when needed:

uv pip install -e ".[browser]"
python -m playwright install chromium

Online/offline profiles retain 5/2 recent observation turns, show at most 100/60 lines per file view, cap searches at 50/30 results, and trigger repeated-error recovery after 3/2 strikes. Active-context compaction targets 16,000/8,000 estimated tokens, bounded further by the configured context window. These are harness budgets, not changes to the model's supported context length.

The ACI tools are open_file, search_code, find_files, edit_file_guarded, activate_skill, and verify_fullstack_service. Search is literal and excludes dependency/build trees. Edits retain existing permissions and conflict checks. JSX, including JSX in .js, uses a JSX-aware parser; plain JavaScript retains Node syntax checks. Missing parsers produce an explicit unavailable result. The project's actual build must still support the chosen file extensions: new Vite React components should use .jsx/.tsx. Syntax checks do not replace type checking or application tests. Architecture and failure diagnosis use separate text-only thinking passes; routine tool calls use non-thinking generation, including the offline structured-tool protocol.

open_file is the single file viewer exposed to harness workers. Repeated default reads advance to the next window, explicit line offsets select a section, and source changes reset pagination. Repeating an unchanged window produces navigation feedback without counting as an application failure. Large cat, head, tail, and sed file dumps are redirected to the viewer.

The full-stack contract lives at .alpie/contract.json; it declares models, endpoint request/response schemas and smoke samples, ports, local service commands, a frontend build, and an E2E command. Later stages must preserve its hash. Backend gates probe declared endpoint samples. Integration runs both services, the declared behavioral check, and a Playwright page-load/console/network probe. Screenshots are stored as evidence; capturing them does not establish visual correctness. Recorded backend source is withheld from frontend inspection through the harness ACI. This is context separation, not an OS confidentiality boundary.

Online architecture first attempts a compact typed contract. If that response is malformed, truncated, or remains invalid, it switches to a database/route/service outline and small endpoint proposals. Offline architecture starts with these smaller parts to avoid decoding a large nested contract on local hardware. Validated endpoints stay in memory while only a rejected part is retried, up to three attempts per part and at most 96 total inference calls within --max-turns. Parts initially use flat arguments; invalid embedded JSON switches that part to native object/array arguments with the same host validation. Progress and validation diagnostics appear in the terminal and Textual UI. The host saves only a complete validated contract; partial proposals never replace an existing file. Placeholder launch/build commands and structurally repaired tool JSON are rejected. Generated contract tests cannot establish this gate.

Later workers automatically hand off when their host-owned gate passes, compact their context, and start the next stage in a fresh session. Coding workers start with a window of up to 24 online or 16 offline turns. Distinct source changes or verification progress can renew that window up to --max-turns; repeated identical actions do not earn more turns. A passing backend sample or frontend build alone does not complete the project; the integration gate must also pass.

Service verification is bounded and cleans up owned process groups. Occupied ports are reported; unrelated listeners are never killed. Full-Auto's network isolation currently makes this host-loopback verifier unavailable. Prepare dependencies and use an appropriate permission mode for local service verification. Missing browsers/parsers, failed checks, or exhausted stage budgets produce an incomplete result and preserve work.

Conditional rollback uses task-owned snapshots in .alpie/snapshots/ and restores only recorded agent mutations whose current bytes and permissions still match. Conflicting user edits survive. Shell mutations and arbitrary external state are outside this rollback guarantee. Gate receipts are saved in .alpie/harness-state.json; they document sampled coverage, not a guarantee of production readiness. --harness remains accepted for compatibility; --no-harness and /harness off provide an explicit opt-out. Permission, cancellation and verification controls remain active.

Host automation and desktop tasks

The harness routes action requests to OS automation, coding, full-stack development, or desktop interaction. Use --task-type to override automatic selection. It cannot be combined with --no-harness.

When you ask to repair an existing frontend and backend, automatic routing looks for application source or a manifest in the workspace. It sends the repair through the coding workflow so the agent can inspect the services and tests already there. New full-stack builds and explicit --task-type fullstack requests use the staged builder.

alpielocal run "Copy the reports into an archive folder and verify the result" --task-type os
alpielocal run "Find the process listening on port 8000"
alpielocal run "Fix the parser and run its tests" --task-type code --offline
alpielocal

Typed tools inspect the host, manage files and processes, launch applications, access clipboard text, and manage AlpieLocal-owned schedules. They use native paths and OS adapters. Process inspection and clipboard support can be extended with:

python -m pip install -U 'alpielocal[automation]'
python -m pip install -U 'alpielocal[desktop]'

A host inspection such as “list files in this folder” records the tool observation used to finish the task. For calendar automation, denied networking produces a local .ics invitation. To create Google Calendar events when networking is allowed, install google-api-python-client and google-auth-oauthlib and configure Google OAuth. The tool reports the Google event ID after confirmed creation. If submission is unconfirmed, check the calendar before retrying.

Desktop tasks use --task-type gui. They require an accessible graphical session and OS screenshot/input permissions. Accessibility integration uses installed platform bridges; without those bridges, observation supplies a numbered coordinate grid. A grid mark identifies a location, not a detected button. Linux AT-SPI bindings are supplied by the operating system. Headless sessions return an unavailable result and can continue with CLI tools. Windows desktop control from WSL requires a separately accessible Windows adapter; a WSL Linux display is not the Windows desktop.

Filesystem mutations and guarded code edits in universal harness tasks are recorded under .alpie/trash/<session-id>/. Undo simulates the restoration first and refuses to replace later user edits. Operations are bounded to 4,096 entries and 256 MiB per snapshot; larger jobs should use smaller batches. Arbitrary shell side effects, process termination, application actions, and scheduled jobs are not covered by file undo.

alpielocal undo --list
alpielocal undo --session SESSION_ID
alpielocal undo

Read-only tools run without approval. Changes outside the workspace, process termination, scheduling, desktop input and system-altering commands require approval. Noninteractive sessions deny required approvals by default. --auto-approve explicitly grants approval for that invocation; it does not override read-only mode, sandbox boundaries, path protection or stale-file checks. Isolated Full-Auto does not grant control over host desktop applications or host processes.

OS automation that changes host state must pass verify_state post-conditions before reporting completion. Coding tasks retain their test/syntax gates and additionally verify their requested final state. After at least three observed tool steps and successful verification, the harness can save a parameterized workflow in .alpie/skills/. These workflows are indexed progressively and do not grant permissions or replay actions automatically. Failed checks, missing adapters or exhausted budgets preserve work and produce an incomplete result.

Resumable projects

Large projects can run as a dependency-ordered sequence of milestones. Each milestone gets a fresh coding session, the original request, prerequisite summaries, and its declared checks. The runner rechecks completed milestones after later changes and on resume, then runs the whole-project integration checks. An integration failure can receive one fresh repair session within the invocation's budget. Failed or interrupted work is preserved.

Milestone sessions verify syntax and their fixed behavioral checks without demanding that unfinished future stages already pass. Their results are explicitly marked as milestone verification. Ordinary tasks keep full verification, and the parent still requires the assembled project's integration gate before reporting project completion.

A worker reaching its turn limit can advance only when fresh declared checks pass, recorded test inputs remain unchanged, and supported syntax checks pass. This recovery currently requires explicit local Python test selectors that existed when the plan was registered; opaque commands and discovery-only checks cannot trigger it. The saved record retains the worker's partial result and the host's verification decision. Cancellation, denied actions, and other worker failures remain blocking outcomes.

Ask the agent to register a durable project plan with create_project_plan, or supply a JSON plan:

{
  "request": "Build the agreed notes application with persistent storage and a browser UI.",
  "milestones": [
    {"id": "api", "task": "Implement and test note persistence and the HTTP API.", "depends_on": [], "checks": ["python -m unittest tests.test_api -v"]},
    {"id": "ui", "task": "Connect and test browser note creation and deletion.", "depends_on": ["api"], "checks": ["python -m unittest tests.test_browser -v"]}
  ],
  "integration_checks": ["python -m unittest discover -s tests -v"]
}

Choose behavioral commands for your actual stack and test suite. Registration validates the plan but executes no work. It prints a project ID:

alpielocal project register project-plan.json --workdir /path/to/project
alpielocal project run PROJECT_ID --workdir /path/to/project --max-milestones 4 --max-turns 24
alpielocal project status PROJECT_ID --workdir /path/to/project
alpielocal project resume PROJECT_ID --workdir /path/to/project --offline --ctx-size 16384

Plans support up to 24 milestones with explicit dependencies and one to six checks per milestone and integration gate. --max-milestones bounds fresh coding sessions per invocation; --max-turns bounds each session. State lives in .alpielocal/projects/, with an exclusive lease for project runners in that workspace. Resume inspects current files and reruns checks; it never blindly replays saved commands. A completed status records observed checks against a source snapshot, not exhaustive coverage or unchanged external services. Register a new plan to change its requirements or checks. Project execution currently uses the terminal CLI; ordinary chat does not automatically become a durable project run.

Development stack setup

After interactive stack selection, AlpieLocal checks prerequisites before coding. The setup_stack tool can repeat setup after creating a dependency manifest. You can also inspect or apply setup directly:

alpielocal setup-stack react --workdir /path/to/project
alpielocal setup-stack react --apply --workdir /path/to/project
alpielocal setup-stack fastapi --apply --workdir /path/to/project
alpielocal setup-stack python --apply --offline --workdir /path/to/project

Supported stacks are vanilla, react, vue, angular, golang, flask, django, fastapi, node, and python. Vanilla needs no framework installation. Missing Node.js or Go runtimes can use installed native package managers: WinGet on Windows, Homebrew on macOS, or apt/dnf/pacman on Linux. System installation requires approval for the displayed command. Setup preserves declared npm/pnpm/Yarn choices, uses existing lockfiles, and targets a project environment for Python. Conflicting lockfiles or pinned package-manager mismatches stop setup. It does not install global framework CLIs or replace the selected stack.

Offline setup uses available dependency caches and blocks system downloads. Full-Auto retains its isolated network policy; install missing runtimes beforehand. A successful installer exit is followed by a runtime check; PATH changes may require reopening the terminal. Application builds, tests, and browser behavior still require separate verification.

For a repeated evaluation of browser actions, HTTP validation, and database restart persistence, use the development fixture below. It needs Playwright and an installed Chromium headless shell; missing validator prerequisites are reported as unavailable, not a model failure or a pass.

alpielocal evaluate --mode offline --suite repository --manifest test/repository_cases/fullstack_v1/cases.json --repeat 2 --ctx-size 16384 --max-turns 24 --output fullstack-results.json

For example, inside chat:

/status
/cd "path/to/project"
/no-thinking
/image "screenshots/error.png"
Investigate the error in this screenshot and fix its cause in this project.
/image clear
/diff
/save

For a local video request:

/offline
/no-thinking
/video "path/to/lesson.mp4"
Create concise revision notes from the concepts visible in the sampled frames.
/video clear

Capture a screenshot explicitly with /image clipboard, or start a session with alpielocal chat --image clipboard. alpielocal run "Explain this screenshot" --image clipboard also works. Clipboard text is never ingested. PNG snapshots are stored under .alpielocal/attachments, with owner-only permissions on POSIX systems; /image clear detaches them without deleting saved snapshots. Clipboard access depends on the host desktop; when unavailable, use /image path/to/screenshot.png. Both chat interfaces also accept image files through --image at startup.

Run a single task

Submit a task directly when an interactive conversation is unnecessary:

alpielocal run "Investigate the failing tests, make a targeted fix, and verify it."

Online mode uses the configured inference endpoint. To select your own deployment:

alpielocal run "Explain this repository." --endpoint "https://your-server.example/v1" --model "your-model"

Offline mode requires the setup below.

Permission modes

Choose a mode when starting chat or running a task:

alpielocal chat --permissions suggest
alpielocal --permissions auto-edit
alpielocal run "Fix the failing tests and verify the repair." --permissions full-auto
alpielocal run "Inspect the authentication flow." --permissions read-only
Mode Behavior
guarded Compatibility default: guarded file edits, with approval for commands classified as dangerous
suggest Approve file-tool edits, scaffolding, and executable commands; review is an alias for this policy
auto-edit Apply validated file-tool edits automatically; approve executable commands, including runtime verification
full-auto Automatic file tools and isolated executable tools; tool networking is denied while model inference stays outside the sandbox
read-only Agent tools can inspect files and prepare an answer; file mutations and execution tools are disabled

Patch approval applies to the displayed changes and recorded file versions. Intervening user edits still reject stale commits. Oversized previews require smaller patches. In Textual, use y to approve, n to reject, a for the displayed session allowance, or e to review a patch in $VISUAL/$EDITOR. Editor changes do not alter the immutable proposal; reject with feedback to request a revised patch. Typing in the feedback field does not activate approval shortcuts. Classic prompts accept y, n <feedback>, or a when a session scope is displayed.

Session allowances cover one exact command and directory, or future edits to the exact displayed set of files. They do not authorize other paths or commands, cannot override read-only mode, and are not restored from saved sessions. /permissions reset, a mode change, or a workspace change clears them. Use /permissions suggest between tasks, or configure "permission_mode": "suggest" for subsequent launches. Existing explicit auto-edit configurations now require command approval; choose guarded to retain the previous command policy.

Full-Auto requires an installed Linux bwrap with working user namespaces and seccomp on x86-64 or ARM64, or macOS sandbox-exec. Startup probes isolation and stops on failure; it never retries unsandboxed. Native Windows Full-Auto is unavailable; use a supported Linux/WSL environment or another permission mode. The macOS profile is implemented but still needs native validation. Linux tests exercise workspace writes, denied external writes, and blocked TCP and Unix-socket connections. Executable tools, verification workers, language servers, and managed terminals use the shared boundary. Online inference and trusted in-process file parsing remain in the parent.

The tool sandbox keeps host files readable, allows project writes and worker temporary files, and strips inherited inference credentials from worker environments. It is not a confidentiality boundary or a rollback mechanism for shell side effects. Install project dependencies before Full-Auto; its tools cannot download packages, access web integrations, or connect to servers. The older --sandbox flag still isolates the entire Linux CLI and has separate network semantics. See the bubblewrap security model.

/cost reports observed main-task token totals separately for online and offline responses, response latency, and provider-reported cached input when available. Cache percentages use only responses that report cache counts. Missing usage, unclassified historical responses, side questions, delegated calls, and monetary prices are not inferred.

Offline setup

Initialize models and llama.cpp

While connected to the internet, run this once from your intended workspace:

alpielocal init

Initialization saves configuration, downloads missing model files, and installs or checks llama-cpp-python, the Python binding used to run llama.cpp. A separate llama.cpp CLI installation is not required.

The default assets are:

Asset File
Text model alpie-vl-text-q3_k_m.gguf
Vision projector alpie-vl-mmproj-f16.gguf
Model repository 169Pi/alpie_learn_gguf
Automatic runtime version llama-cpp-python 0.3.35

The default model distribution resolves its built-in credential automatically; users do not normally need to enter HF_TOKEN. Downloads still require valid repository access. Custom private repositories require an authorized Hugging Face login or token.

The automatic installer selects compatible, hash-checked wheels and checks that the runtime imports. It does not compile native code. Setup can be cancelled and rerun; completed downloads are reused. An import check does not establish model generation or task accuracy.

Windows

Use 64-bit Python for the bundled Windows x64 wheels. In PowerShell, activate the environment where AlpieLocal is installed, then run:

alpielocal init
alpielocal run "Say hello" --offline --no-thinking --ctx-size 8192

The installer tries compatible NVIDIA CUDA, Vulkan, and CPU runtimes. GPU use depends on the selected wheel and installed drivers. Native Windows and WSL have separate Python environments and runtime installations; run setup inside the environment you will use.

Linux

Activate your environment and run:

alpielocal init
alpielocal run "Say hello" --offline --no-thinking --ctx-size 8192

The installer selects wheels matching the interpreter architecture and Linux platform. NVIDIA systems can use CUDA; compatible Vulkan and CPU builds are also considered. Linux ARM64 CPU wheels are included for supported platforms.

macOS

On Apple Silicon, use a native arm64 Python installation. Check its architecture:

python -c "import platform; print(platform.machine())"
alpielocal init
alpielocal run "Say hello" --offline --no-thinking --ctx-size 8192

Apple Silicon should report arm64; setup tries Metal, then CPU. An x86_64 Python running under Rosetta does not match the bundled arm64 wheels. The pinned automatic runtime has no Intel Mac wheel; Intel users need a compatible manual runtime installation.

Manual llama.cpp runtime installation

Use alpielocal init first. If your platform has no supported bundled wheel, install a compatible llama-cpp-python into the same environment, then rerun initialization.

The commands below target an activated Python environment. In an activated uv environment without pip, replace python -m pip with uv pip.

NVIDIA CUDA: Windows x64

Check that nvidia-smi detects your GPU. The pinned runtime uses a CUDA 12.4 build and needs a compatible NVIDIA driver and GPU. Install the matching wheel:

python -m pip install --force-reinstall --no-cache-dir --only-binary=:all: "https://github.com/abetlen/llama-cpp-python/releases/download/v0.3.35-cu124/llama_cpp_python-0.3.35-py3-none-win_amd64.whl#sha256=84f7218c1e9cf21014b9770c65064c5a3674dd2f4fbc312c5d6bb40cec0fb269"

NVIDIA CUDA: Linux x64

This bundled CUDA wheel targets glibc 2.35 or newer. On another platform, let initialization select an alternative or use the upstream build instructions.

python -m pip install --force-reinstall --no-cache-dir --only-binary=:all: "https://github.com/abetlen/llama-cpp-python/releases/download/v0.3.35-cu124/llama_cpp_python-0.3.35-py3-none-manylinux_2_35_x86_64.whl#sha256=62fc788a4ecee5a579f40708ccfe0c4d566dd5c9959497bdc0544dbba94d82aa"

Apple Silicon: macOS Metal

Use native arm64 Python and install the Metal wheel. CUDA is for NVIDIA GPUs; Apple Silicon acceleration uses Metal.

python -m pip install --force-reinstall --no-cache-dir --only-binary=:all: "https://github.com/abetlen/llama-cpp-python/releases/download/v0.3.35-metal/llama_cpp_python-0.3.35-py3-none-macosx_11_0_arm64.whl#sha256=faf9a2b38df5cbf9427a074f974c00abbb799185753c474672fd461c198b7a0a"

CPU or source build

For an available CPU wheel, try:

python -m pip install --only-binary=:all: llama-cpp-python==0.3.35 --extra-index-url https://abetlen.github.io/llama-cpp-python/whl/cpu

If no compatible wheel exists, a source build requires a native compiler and build tools. A CPU build can be installed with:

python -m pip install --no-binary=llama-cpp-python llama-cpp-python==0.3.35

Source builds require a C/C++ toolchain on Windows, GCC or Clang on Linux, or Xcode command-line tools on macOS. See the upstream llama-cpp-python installation documentation for CUDA, Metal, and other build options.

Verify the environment afterward:

python -c "from llama_cpp import Llama; print('Runtime import OK')"
alpielocal init

For pipx installations, use pipx runpip alpielocal install in place of python -m pip install so the runtime is installed into AlpieLocal's environment. For a global uv tool installation, prefer alpielocal init, which targets that environment automatically. For manual installation, run uv tool dir, locate alpielocal/bin/python on Linux/macOS or alpielocal/Scripts/python.exe on Windows beneath that directory, and use uv pip install --python "/full/path/to/that/python" with the wheel URL above.

To check whether the installed runtime supports GPU offload:

python -c "import llama_cpp; print('GPU offload support:', llama_cpp.llama_supports_gpu_offload())"

This reports build capability. Confirm actual device use in the model-loading output when starting offline chat. Run import checks through the same environment's Python; a global tool environment is separate from your project's Python.

Run without networking

Once the package, model files, runtime, and project dependencies are installed:

alpielocal --offline --no-thinking --ctx-size 8192
alpielocal run "Fix the failing tests and verify the changes." --offline --no-thinking --ctx-size 8192

Use alpielocal --network-policy deny init to check existing setup assets without downloading them. Offline inference does not provide online services or download missing project dependencies.

--network-policy deny disables network-aware agent tools and selects local inference. Arbitrary shell subprocesses require operating-system isolation for an enforced network boundary. On Linux with bubblewrap installed:

alpielocal run "Inspect and repair the failing test." --offline --no-thinking --sandbox --ctx-size 8192

The configured context ceiling is 262,144 tokens in both modes, with a maximum output setting of 65,537 tokens. Actual generation is constrained by task budgets, available context, model support, and memory. The smaller examples above reduce local memory requirements. Native offline structured tool calls currently require non-thinking generation; use --no-thinking for local coding tasks.

Essential commands

Command Purpose
alpielocal Start interactive chat in the current directory
alpielocal run "TASK" Execute a task
alpielocal plan "TASK" Prepare a plan with an enforced read-only tool allowlist
alpielocal explain path/to/file.py Explain a file or concept
alpielocal diff Inspect recorded changes
alpielocal undo Restore file-tool changes from the last session where possible
alpielocal sessions List saved sessions
alpielocal resume SESSION_ID Resume a saved session
alpielocal doctor Check the environment and available tools
alpielocal doctor --offline Check cached text-model and native structured-tool prerequisites without contacting a server or loading model weights
alpielocal --help Show available commands and options

Use --workdir path/to/project to select another workspace. In chat, /help lists commands and /status shows the active model, mode, context usage, and attachments.

Planning returns its answer without changing project files. It uses the configured model with local read-only tool dispatch, even when a legacy API server is configured. Ordinary CLI session state may still be saved.

Place repository-specific setup commands, test commands, and constraints in AGENTS.md. AlpieLocal loads instructions from the Git root through the working directory in both online and offline coding modes. File reads and edits also discover instructions along the target's directory path. More specific directories take precedence; AGENTS.override.md takes precedence over AGENTS.md in the same directory. Outside Git, discovery starts at the working directory. Newly discovered or changed rules reach the model before a subsequent file-tool mutation; instructions do not grant command or filesystem permissions. Instruction files share a 32 KiB reading budget. Unreadable or oversized rules are reported and block affected file-tool edits until resolved.

Repository navigation ranks definitions and locally resolvable imports against the task, including files that import a relevant module. Python uses the standard AST parser. Optional JavaScript, JSX, TypeScript, and TSX parsing uses Tree-sitter:

python -m pip install "alpielocal[index]"
# From this source checkout:
python -m pip install -e ".[index]"

The optional grammars require Python 3.10 or later. Install them before disconnecting for offline work; no parser is downloaded during a task. Indexing is bounded to 200 source-file attempts and 8 MiB per discovery pass, and cached facts are validated against current content. Missing parsers, syntax errors, and incomplete coverage are identified. Static imports are navigation hints; dynamic imports and runtime behavior still require inspection and tests. With the grammars installed, JSX/TypeScript edits also receive parser-based syntax validation before commit.

Images, video, and optional tools

Attach media to a task using quoted paths:

alpielocal run "Explain the error shown in this screenshot." --image "screenshot.png"
alpielocal run "Summarize the concepts shown in this video." --video "lesson.mp4" --offline --no-thinking --ctx-size 16384

In chat, use /image "path/to/image.png" or /video "path/to/video.mp4", then submit your request. Image understanding requires a working vision model/projector. Video analysis samples frames; it does not establish full video or audio understanding. Video extraction uses system FFmpeg when available, otherwise the included imageio-ffmpeg binary on supported platforms.

Optional integrations:

Tool Installation or prerequisite
Browser interaction checks python -m pip install "alpielocal[browser]", then python -m playwright install chromium
PDF text extraction python -m pip install "alpielocal[documents]"
Local speech transcription Installed whisper-cli, FFmpeg, and local weights selected by ALPIELOCAL_WHISPER_MODEL
Language-server diagnostics An installed server configured through ALPIELOCAL_LSP_COMMAND as a JSON argument list

For pipx, expose Playwright's command when installing browser support:

pipx inject --include-apps alpielocal playwright
playwright install chromium
pipx inject alpielocal pypdf

Optional runtimes and weights must also be prepared before disconnecting. See the pipx inject reference for environment management.

Configuration

Configuration normally lives in .alpielocal/config.json under the setup directory. Existing .alpiecode configuration and caches remain readable. Model lookup reuses existing home-directory caches or the workspace cache; setup prints the selected path.

Environment variable Purpose
ALPIELOCAL_HOME State and configuration directory
ALPIELOCAL_MODELS_DIR Model cache directory
ALPIELOCAL_MODEL_PATH Explicit local text-model GGUF file
ALPIELOCAL_BASE_URL Online inference endpoint
ALPIELOCAL_API_KEY Online endpoint authentication
ALPIELOCAL_MODEL Online model identifier
ALPIELOCAL_CPU=1 Disable GPU offload

Set a persistent ALPIELOCAL_HOME before initialization if you want to share one setup across workspaces. Keep credentials out of version control.

Troubleshooting

  • Command not found: reopen the terminal after pipx ensurepath, or activate the environment containing AlpieLocal. Check its interpreter with python -c "import sys; print(sys.executable)".
  • Source changes do not appear: inspect python -c "import codeagent; print(codeagent.__file__)" in the environment running the CLI. For source development, install the checkout with python -m pip install -e . or uv pip install -e ., then restart chat. Editing a repository does not update a separately installed package.
  • Runtime installed in another environment: install or initialize using the same interpreter as the CLI. A pipx installation and a project virtual environment are separate.
  • Wheel extraction or hash error: the installer retries a fresh download once. If it still fails, check the reported asset and platform, update AlpieLocal, and rerun alpielocal init. Do not bypass integrity checks.
  • Model authentication error: cached models may work even when fresh downloads cannot authenticate. Check repository access and the installed distribution's credential configuration.
  • Insufficient memory: reduce --ctx-size, reduce GPU offload with ALPIELOCAL_GPU_LAYERS, or select CPU mode with ALPIELOCAL_CPU=1.
  • Video extraction unavailable: install or update imageio-ffmpeg in the environment running AlpieLocal.

Upgrade AlpieLocal

Use the upgrade command matching your installation method:

Installation Upgrade command
Global uv tool uv tool upgrade alpielocal
Global pipx tool pipx upgrade alpielocal
Python/pip environment python -m pip install --upgrade alpielocal
Activated uv environment uv pip install --upgrade alpielocal
Editable source checkout Update the checkout, then run python -m pip install -e . or uv pip install -e .

Close existing AlpieLocal sessions before upgrading. Activate the relevant environment for environment-based installs, then verify and check offline setup:

alpielocal --version
alpielocal init

Initialization reuses valid cached model files. Upgrading the CLI does not automatically replace existing model weights or guarantee a different runtime build; use the runtime installation instructions when changing acceleration backends.

Execution and session recovery

CLI tasks, interactive chat, API chat, and repository evaluations share a task service around the existing agent runtime. Each task has an ID and ordered events. The service closes the runtime and saves its final checkpoint before delivering the terminal result. Persisted sessions hold operating-system file locks to reject overlapping owners across processes; the locks release when a process exits. The API also serializes access to its shared model backend.

A SQLite journal beside session snapshots records bounded event metadata, tool-call identities, and argument/result hashes. It does not store raw prompts, generated code, credentials, or command output; ordinary session transcripts remain separate. Tool receipts are persisted before UI delivery. After interruption, resume checks this journal even when the last snapshot is older. Unmatched calls have unknown outcomes: inspect current files and processes before retrying. Recovery never replays a tool automatically or claims exactly-once execution. Completed records have a retention limit; unresolved interrupted records are retained for inspection.

Session snapshots preserve tool-call arguments, results, attachments, and active context separately from the audit history. Retired source excerpts stay retired after resume. Interrupted tasks remain unverified; continuing a session does not automatically replay commands. Running commands poll task cancellation and stop their owned process group on POSIX or request tree cleanup on Windows. Escaped processes require OS isolation; Windows cleanup depends on the parent process still existing. Streaming backends check cancellation between received chunks and close the current request stream. Cancellation remains cooperative during a blocked network read or native model prefill; it does not unload the shared model.

Context assembly and inference share a token counter that includes tool schemas and reserves output space. Once the local GGUF model is loaded, accounting uses its text tokenizer; otherwise it uses a conservative UTF-8 estimate. Chat-template overhead and visual encoder usage remain estimates, which /status labels explicitly. Context pressure removes optional historical recall before shortening source excerpts; current requirements and tool-call/result pairing are preserved.

Project memory retains up to 256 observations within a 512 KiB archive and selects relevant entries using the current request. Important or pinned entries receive retention priority. Recalled observations are historical data, not current verification; file-backed observations are omitted when their recorded hashes no longer match. Existing memory archives remain readable. Prompt recall and the token-count cache are bounded; the full session audit is retained separately.

Historical retrieval caches lexical terms by content digest, within 512 entries and a 1 MiB estimated storage budget. It rechecks observation eligibility and extracts excerpts after ranking. This reduces repeated processing without dropping older history solely because of its age; full audit storage still grows with the session.

Interactive CLI tasks request approval through the terminal adapter. Commands classified as dangerous require an explicit y or yes for the displayed command and working directory after command preparation. Approval applies to that request only. Denied or unavailable interaction stops the remaining tool calls in the batch, and task snapshots record the decision without storing a reusable grant.

API and evaluation tasks do not read the server's terminal. When required input or approval is unavailable, they end with needs_input; the API does not yet accept approval replies for continuing that task. Unattended framework selection keeps the existing Vanilla default. /undo reviews journaled task changes and refuses restoration when later user changes conflict.

The CLI capability inventory records the comparison baseline, evidence, remaining work, and acceptance criteria for future milestones. It is a development roadmap rather than a feature-parity claim.

Measure context overhead

Run the same synthetic fixture with and without the history cache:

alpielocal profile --turns 256 --samples 5 > context-cached.json
alpielocal profile --turns 256 --samples 5 --no-history-cache > context-uncached.json

The JSON report includes context assembly latency, Python allocation estimates, cache usage, audit growth, and request-preservation checks. It uses synthetic conversation data, requires no model or network, and executes no project tools. Compare repeated runs on the same machine; this measures context handling, not model speed, GPU memory, or coding accuracy.

Verification

AlpieLocal records file mutations and command results, requires behavioral acceptance checks for coding completion, and reruns relevant verification. Review the resulting diff and tests before relying on generated changes. Undo protects detected concurrent edits, but does not cover every arbitrary shell mutation or external side effect.

Bash pipelines preserve failures from earlier stages. Run verification commands with the correct test-runner syntax and without truncating their output.

Python verification recognizes stdlib unittest.TestCase suites and runs them with the project interpreter, including tests in nested directories. Explicit pytest configuration, pytest tests, and mixed or uncertain suites retain pytest verification. A missing runner remains an environment problem. Package commands preserve their requested installer and interpreter; missing pip receives environment-specific recovery guidance.

During creation and repairs, the agent receives current test-file and manifest evidence to help select a compatible runner. Explicit JavaScript file paths passed to Python unittest are rejected before registration. Ambiguous module names and custom collectors remain advisory; valid Python tests that drive JavaScript are supported. New-project templates leave unobserved runtimes, entry points, and test commands unspecified.

Browser verification supports bounded keyboard presses and holds as well as clicks and form input. It records page errors and supplied behavioral assertions. Explicit PLAYWRIGHT_BROWSERS_PATH settings take precedence; source installations can reuse a compatible Chromium cache from the CLI checkout when the standard cache is absent, independently of the project being checked. Verification never downloads browsers automatically.

When Chromium is unavailable, the limited Node fallback inspects only client scripts linked by the page. It excludes unrelated test and server files, and reports unsupported loading contexts as unavailable. It does not certify browser interactions.

Verification commands use a temporary Python bytecode-cache namespace to avoid reusing stale code after rapid edits, without deleting existing caches. This applies to Python processes that honor the supplied environment; commands that override it or use -E or -I require separate consideration.

Registering an unchanged acceptance plan preserves its current verification result; it does not execute commands or restore invalidated results. Recognized test-runner summaries that report failures cannot pass on exit code alone. Empty, skipped-only, or expected-failure-only results remain inconclusive. Missing checks receive guidance to repair the check before changing application code.

Rejected behavioral check commands can trigger up to two guided recovery attempts within the task's existing turn budget. Bounded syntax, linked-page DOM, and available browser diagnostics help distinguish an implementation defect from a check-invocation problem. These diagnostics cannot certify completion or replace acceptance tests. Source changes invalidate their evidence before an action runs. If cancellation, active writers, unavailable tooling, or snapshot limits prevent reliable inspection, the agent receives that limitation instead of a guessed code defect. This recovery path is shared by online and offline execution and does not require another model.

After acceptance checks pass, coding tasks can receive a coverage review using bounded current source/test excerpts and the original request, with omissions identified. It uses the selected backend and a proposal-only reporting tool, with room for follow-up actions within the existing turn budget. File editing and command execution are unavailable to the reviewer. The reviewer can propose up to three executable behavioral checks anchored to the request. Valid checks run through normal command policy and become required acceptance checks; replacing the agent's own plan cannot remove them. Changes invalidate their results, and the final verification gate reruns them. Source snapshots detect rewrites during a review-check batch and invalidate its result without rolling back files. Invalid or unavailable proposals receive one retry, then leave the task unverified with its files preserved. Model-proposed checks remain fallible; a passing review is not independent proof of complete requirement coverage.

Repeated failed checks or inspection of unchanged source can trigger a brief diagnostic review. Reviews consume the existing turn budget and cannot execute changes or establish completion. Initial source excerpts are retired after edits or executable checks so subsequent decisions use fresh observations.

When a review identifies an invocation or quoting defect in a registered check, a structured diagnosis can restrict the next action to correcting that check's command or reading missing evidence. Other check commands, descriptions, and requirement mappings are preserved. Source, plan, and failure evidence must still match before dispatch. The revised command remains subject to normal validation and execution; the diagnosis alone does not prove that its assertions are correct. Offline thinking reviews use JSON text when native structured tools are unsupported.

Repeated successful check commands do not replace a failed acceptance run. For recognized check commands with identical results and unchanged source, AlpieLocal prompts the agent to reconcile the registered plan after three successes and stops a fourth unchanged repetition as unverified. A justified plan correction still requires execution through check_acceptance.

Rejected overwrites, unmatched edits, and invalid candidate syntax produce targeted recovery guidance without bypassing mutation safeguards. After an unmatched edit, the host reads a bounded current-source window near the intended change and includes it in the rejection. It refreshes at most twice per file and six times per task, through the same permissions and phase restrictions. The model must still submit an exact replacement that passes the syntax gate. Repeated failures without progress remain bounded and preserve files.

If behavioral acceptance checks pass on the final model turn, the ordinary full verification gate can finish the task without another model call. A final edit or an earlier, invalidated check does not qualify.

The source-file overwrite guard permits revisions of a file created by the current task when its mutation record proves ownership and its content and permissions still match the last committed version. The write is bound to that snapshot and canonical path. Pre-existing files, prior-task files, and detected external changes retain their protections; unavailable ownership records do not grant overwrite permission. Revisions still undergo syntax checks, produce diffs and mutation receipts, and participate in undo.

An output-limit interruption without tool calls continues within the existing task budget instead of consuming a completion-verification retry. Progress guidance uses each command's latest observed failure; superseded failures remain historical evidence.

For reproducible checks, alpielocal evaluate writes JSON reports with runtime settings, source fingerprints, and available model-file hashes. From a source checkout, run the bundled repository repair cases in fresh workspaces:

alpielocal evaluate --mode offline --suite repository --manifest test/repository_cases/nov11_v1/cases.json --no-thinking --ctx-size 16384 --max-turns 24 --max-output-tokens 4096 --output offline-results.json
alpielocal evaluate --mode online --suite repository --manifest test/repository_cases/nov11_v1/cases.json --no-thinking --max-turns 24 --max-output-tokens 4096 --output online-results.json

Offline evaluation requires cached model files; use --gguf-model path/to/model.gguf to select weights explicitly. The repository cases require Python and Node.js. Reports separate agent completion from independent validation and flag changes outside the allowed files. Existing report files are protected; use a new output filename for each run. These small development cases are regression checks, not a general model benchmark. Use --suite core for model smoke checks, or --suite multimodal to include image checks; both use a fixed 512-token output budget. Thinking can be selected explicitly with --thinking where supported by the backend.

Repository evaluation artifacts include progress checkpoints and a bounded event journal with command outcomes, rejected tool calls, and generation limits. Token usage and finish reasons are recorded when the backend supplies them; missing values remain unknown. An interrupted run does not count as verified completion.

The four-case nov11_v1 suite freezes fixture and validator hashes, keeps validators outside candidate workspaces, and checks the validators against broken, reference, and incomplete repairs. Once results guide development, reruns are development comparisons; use additional unseen tasks to measure generalization.

Metadata

Release files for alpielocal 10.12.9

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for alpielocal 10.12.9
File Size Uploaded Provenance Actions
alpielocal-10.12.9.tar.gz 1.2 MB Without provenance Details for alpielocal-10.12.9.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for alpielocal 10.12.9
File Interpreter ABI Platform Actions
alpielocal-10.12.9-py3-none-any.whl Python 3 none any Details for alpielocal-10.12.9-py3-none-any.whl

Total release size: 2.1 MB

Release files / alpielocal-10.12.9.tar.gz

Download URL alpielocal-10.12.9.tar.gz
Size 1.2 MB
Tags Source
SHA-256 checksum
How to use checksums
3fadb39bf44e3968bb7722197ba73a2f7ad442aa5ef8b2e2113e82268228320e
BLAKE2b-256 checksum
How to use checksums
cee18712d10c94aa74f2b6f141877ea59bec127a4ea6efb018db413e0a0396fe
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.12.13

Release files / alpielocal-10.12.9-py3-none-any.whl

Download URL alpielocal-10.12.9-py3-none-any.whl
Size 835.6 kB
Tags Python 3
SHA-256 checksum
How to use checksums
60b2170850604e9f531589ebd053d4d5c4a1a46931f3b3d49d458f7b7a5bece6
BLAKE2b-256 checksum
How to use checksums
ec8144572823392f5fc8d85c8d29ddbc08f8753a15b66011f453f4ca0496f321
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.12.13

Security for alpielocal 10.12.9

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release

10.12.9 This release

2 release files No provenance

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page