aiforcecli-local
v0.1.0
Published
Standalone local coding-agent CLI for DeepSeek, GLM, and Qwen models through Ollama.
Downloads
20
Maintainers
Readme
aiforcecli-local
A standalone, local-first coding-agent CLI for DeepSeek, GLM, and Qwen models running through Ollama. The npm package is aiforcecli-local, and the installed executable is aiforce-local. It can run independently or through the aiforcecli-chat adapter.
Capabilities
- Inspect and search a selected repository.
- Create text files and apply exact, reviewable replacements.
- Ask before every shell command, including tests and builds.
- Stream tool activity and command output.
- Produce deterministic change summaries and compact diffs without requiring Git.
- Resume local sessions.
- Emit JSONL events for automation and future adapters.
- Use native Ollama tool calling with an enforced fallback for models without native tool support.
- Run entirely locally with no API keys or per-token fees.
Requirements
- Node.js 20 or newer
- Ollama
- Enough RAM or VRAM for the selected model
- A model pulled into Ollama
Install for local development
git clone https://github.com/apoorviy/aiforce-local.git
cd aiforce-local
npm test
npm linkVerify the runtime and available presets:
aiforce-local doctor
aiforce-local modelsModel setup
aiforce-local pull qwen
aiforce-local pull glm
aiforce-local pull deepseekAliases currently resolve to:
deepseek->deepseek-coder-v2:16bglm->glm4:9bqwen->qwen2.5-coder:7b
You can supply any exact Ollama tag instead. Upstream availability and model licenses should be checked before redistribution.
Run the coding agent
From a repository:
cd C:\path\to\project
aiforce-local agent "Add input validation and tests" --model glmOr select a repository explicitly:
aiforce-local agent "Fix the failing parser test" --cwd C:\path\to\project --model qwenWhen the agent requests a command, the CLI displays the exact command, repository, and timeout:
Command requested in C:\path\to\project:
npm test
Timeout: 120000ms
Approve this command? [y/N]Only y or yes executes it. Non-interactive sessions deny commands automatically.
Resume a session using the identifier printed at startup:
aiforce-local agent "Continue and address the remaining failure" --resume local-... --cwd C:\path\to\projectEmit machine-readable JSONL events:
aiforce-local agent "Explain the project structure" --jsonInference-only commands
The original simple prompt and chat commands remain available:
aiforce-local run "Explain dependency injection" --model qwen
aiforce-local chat --model glmType /exit to leave interactive chat.
Safety model
- Model-directed paths are resolved against the repository's real path.
- Absolute paths, traversal, symlink escapes,
.git, dependency/build directories, and common credential files are blocked. - Reads, searches, output, command duration, file size, and agent turns are bounded.
- Existing files can only be changed through exact text replacement.
- File deletion is not available.
- Every shell command requires a separate approval; there is no approve-all option.
- An ungrounded model response is rejected until the model inspects the repository.
- Successful edits are fed back as authoritative state to prevent duplicate or stale actions.
Use the agent in a Git repository so ordinary Git review and rollback remain available.
Configuration
OLLAMA_HOST: Ollama server URL. Default:http://127.0.0.1:11434.AIFORCE_LOCAL_DATA_DIR: optional base directory for resumable session data.
By default, sessions are stored under the platform's local application-data directory. Session records include prompts and tool results; do not ask the agent to read secrets.
Development and evaluation
npm test
npm run checkThe suite includes deterministic behavior evaluations for tool trajectory, command denial, path confinement, editing, grounding enforcement, native-tool fallback, loose GLM tool syntax, and session persistence. Live model quality still depends on the selected model and machine.
Current boundaries
- Local CLI only; no cloud deployment.
- Integration with
aiforcecli-chatis available through its built-inaiforce-localadapter. - No file deletion, browser automation, MCP, or unattended command execution.
- Smaller local models can be slower and less reliable than hosted coding agents; the grounding and state gates prevent several common failure modes but cannot make every model equally capable.
