CLI coding agent using ollama for local LLMs
Project description
Ollama CLI Code Agent
A hobby project implementing an experimental command-line coding agent. Use it to generate code, analyze repositories, and manage development tasks directly from your terminal.
Warning: This is experimental software and may be unstable or incomplete. Use at your own risk. Functionality, performance, and APIs are subject to change without notice.
Features
- Ollama-first; local LLM support.
- OpenAI support for more powerful models.
- Session management and context usage tracking.
- Project-centric storage and configuration.
- Support for Linux & Windows.
Dependencies & Installation
TODO.
Configuration
ocla supports configuration through three sources, in the following order of precedence (highest to lowest):
- Command-line arguments
- Environment variables
- Configuration file –
.ocla/config.jsonin the current working directory
Each configuration setting specifies which of these sources it supports.
config_file
Path to the config file
- CLI:
N/A - Environment variable:
OCLA_CONFIG_FILE - Config file:
N/A - Default value:
./.ocla/config.json
context_window
Context window size in tokens
- CLI:
N/A - Environment variable:
OCLA_CONTEXT_WINDOW - Config file:
contextWindow - Default value:
16384
log_level
Log level
- CLI:
N/A - Environment variable:
OCLA_LOG_LEVEL - Config file:
logLevel - Default value:
WARNING - Allowed values:
CRITICALERRORWARNINGINFODEBUG
model
The model to use for agent inference. Must be available in the Ollama API
- CLI:
-m --model - Environment variable:
OCLA_MODEL - Config file:
model - Default value:
qwen3
ollama_host
Override the OLLAMA_HOST for the Ollama API
- CLI:
N/A - Environment variable:
OCLA_OLLAMA_HOST - Config file:
ollamaHost - Default value:
N/A
project_context_file
the relative path to a file that gives ocla more context about your project (case-insensitive)
- CLI:
N/A - Environment variable:
OCLA_PROJECT_CONTEXT_FILE - Config file:
projectContextFiles - Default value:
AGENTS.md
prompt_mode
How you want to interact with the assistant
- CLI:
-p --prompt-mode - Environment variable:
OCLA_PROMPT_MODE - Config file:
promptMode - Default value:
INTERACTIVE - Allowed values:
ONESHOT: The program quits after a single promptINTERACTIVE: You issue prompts until quit
provider
Model provider to use
- CLI:
N/A - Environment variable:
OCLA_PROVIDER - Config file:
provider - Default value:
ollama - Allowed values:
ollama: Use local Ollama modelsopenai: Use the OpenAI API
session_dir
Path to the session directory
- CLI:
N/A - Environment variable:
OCLA_SESSION_DIR - Config file:
sessionDir - Default value:
./.ocla/sessions
session_storage_mode
how we store session data on disk
- CLI:
N/A - Environment variable:
OCLA_SESSION_STORAGE_MODE - Config file:
sessionStorageMode - Default value:
COMPRESS - Allowed values:
PLAIN: Plain text (JSON). Can get large.COMPRESS: Compressed via gzip
state_file
Path to the state file
- CLI:
N/A - Environment variable:
OCLA_STATE_FILE - Config file:
stateFile - Default value:
./.ocla/state.json
thinking
Enable & show model thinking. If the model does not support thinking, this has no effect and thinking is disabled.
- CLI:
-t --thinking - Environment variable:
OCLA_THINKING - Config file:
thinking - Default value:
ENABLED - Allowed values:
DISABLED: The model will not think and nothing is shownHIDDEN: The model will think, but thinking output is not displayedENABLED: The model will think and ocla prints this output
tool_permission_mode
How tools request permission to run
- CLI:
N/A - Environment variable:
OCLA_TOOL_PERMISSION_MODE - Config file:
toolPermissionMode - Default value:
DEFAULT - Allowed values:
DEFAULT: Ask for permission for non-trivial toolsALWAYS_ASK: Always ask for permission for all toolsALWAYS_ALLOW: Always run any tool; use with caution
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file ocla-0.1.1.tar.gz.
File metadata
- Download URL: ocla-0.1.1.tar.gz
- Upload date:
- Size: 22.7 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.7.16
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
015a5b0fbdb5a79229a015b9dd37e0b4dea42d2adbd605d7bce16a8863d244a8
|
|
| MD5 |
05f7a040e5ff8adecc8bec296aac2d21
|
|
| BLAKE2b-256 |
95f294ff9bedf54ea578cea48e9b3c357a1ba44afe25070ddd88cf7894d6bad2
|
File details
Details for the file ocla-0.1.1-py3-none-any.whl.
File metadata
- Download URL: ocla-0.1.1-py3-none-any.whl
- Upload date:
- Size: 24.1 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.7.16
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
957a22589fbd33945d3f114cde4756c6f575f165f790b6ffa3ed0785a5eb232e
|
|
| MD5 |
f27bdb58bb6a6d232bfca518df0bf976
|
|
| BLAKE2b-256 |
76e5e68a3863570ed08d4ca6f15ffd2764fde9ca39914c7cd1bd7b08a7ec5537
|