ollama-code

Ollama Code - Complete Feature Reference

Language: English Русский

Complete documentation of all implemented features in Ollama Code.


Table of Contents


Development Tools

Python Development

Tool Name: python_dev
Aliases: py, python, pip, pytest

Comprehensive Python development tool for managing projects, virtual environments, and executing Python commands.

Supported Actions

Action Description Example
run Execute Python script Run main.py with arguments
test Run pytest Execute tests with pattern
lint Run pylint Analyze code quality
format Run black Format code
venv_create Create virtual environment Create .venv directory
venv_activate Get activation command Return source command
pip_install Install packages Install requests, numpy
pip_list List packages Show installed packages
pip_freeze Generate requirements Output to requirements.txt
mypy Type checking Run mypy on source
custom Custom command Any Python command

Example Usage

{
  "action": "test",
  "test_pattern": "tests/unit/",
  "args": ["-v", "--cov=src"]
}

Node.js Development

Tool Name: nodejs_dev
Aliases: node, npm, yarn, pnpm, bun

Full Node.js/JavaScript development support with auto-detection of package managers.

Supported Actions

Action Description Example
run Execute Node.js script Run server.js
install Install dependencies Run npm install
add Add packages Install express
remove Remove packages Uninstall package
update Update packages Update dependencies
run_script Run package.json script Execute npm run build
test Run tests Execute test suite
build Run build Compile project
dev Run dev server Start with hot reload
lint Run linter ESLint, TSLint
exec Run npx command Execute npx create-app
info Show package info Display package details
list List packages Show installed deps
outdated Check outdated Find updates
audit Security audit Check vulnerabilities
clean Clean project Remove node_modules
init Initialize project Create package.json
custom Custom command Any npm/yarn command

Package Manager Auto-Detection

The tool automatically detects the package manager based on lock files:

Lock File Package Manager
pnpm-lock.yaml pnpm
yarn.lock yarn
bun.lock / bun.lockb bun
package-lock.json npm

Golang Development

Tool Name: golang_dev
Aliases: go, golang

Complete Go development support including module management and testing.

Supported Actions

Action Description Example
run Run Go file Execute main.go
build Build program Compile binary
test Run tests Execute test suite
test_cover Tests with coverage Generate coverage report
test_bench Run benchmarks Performance testing
fmt Format code Run go fmt
vet Static analysis Run go vet
lint Run golangci-lint Comprehensive linting
mod_init Initialize module Create go.mod
mod_tidy Tidy dependencies Clean up imports
mod_download Download deps Fetch modules
mod_verify Verify deps Check integrity
mod_graph Dependency graph Show dep tree
get Add dependency Install package
install Install tool Install CLI tool
list List packages Show all packages
doc Show documentation Display docs
env Go environment Show config
version Go version Display version
clean Clean cache Clear build cache
generate Run go generate Code generation
custom Custom command Any go command

PHP Development

Tool Name: php_dev
Aliases: php, composer, phpunit, artisan

Complete PHP development support including Composer and Laravel integration.

Supported Actions

Action Description Example
run Run PHP script Execute index.php
test Run PHPUnit Execute tests
lint Run phpcs Code style check
format Run PHP-CS-Fixer Format code
composer_install Install deps Run composer install
composer_update Update deps Run composer update
composer_require Add package Install package
composer_remove Remove package Uninstall package
composer_dump_autoload Regenerate autoload Update autoloader
composer_outdated Check outdated Find updates
phpunit Run PHPUnit directly Execute tests
psalm Psalm analysis Static analysis
phpstan PHPStan analysis Type analysis
artisan Laravel commands Run Artisan
custom Custom command Any PHP command

File Operations

read_file

Read single file content with pagination support.

read_many_files

Read multiple files efficiently in one operation.

write_file

Write content to file, creating parent directories if needed.

edit

Find and replace text in files with exact matching.


Search & Navigation

Fast file pattern matching.

{ "pattern": "**/*.ts" }

Search file contents with regex.

{ "pattern": "function\\s+\\w+", "glob": "*.ts" }

list_directory

List directory contents with filtering.

{ "path": "/project/src", "ignore": ["node_modules"] }

Database & Cache

Database Tool

Tool Name: database

Execute database operations across multiple engines.

Supported Engines

Engine Operations
SQLite Query, schema, backup
PostgreSQL Query, migrations
MySQL Query, procedures
MongoDB Find, aggregate

Example Operations

# Execute query
> Run SELECT * FROM users LIMIT 10

# Show schema
> Show schema of users table

# Create backup
> Backup database to /backup/db.sql

Redis Tool

Tool Name: redis

Redis cache and message broker operations.

Supported Operations

Category Commands
Strings GET, SET, DEL, INCR
Lists LPUSH, RPUSH, LRANGE
Sets SADD, SMEMBERS, SREM
Hashes HSET, HGET, HGETALL
Pub/Sub PUBLISH, SUBSCRIBE
Keys KEYS, SCAN, TTL

Container & DevOps

Docker Tool

Tool Name: docker

Complete Docker container management.

Supported Actions

Action Description
run Run container
build Build image
ps List containers
images List images
logs View logs
exec Execute command
stop Stop container
rm Remove container
rmi Remove image
compose_up Start compose
compose_down Stop compose
network Network operations
volume Volume operations

Web & Network

Search the web using configured providers.

web_fetch

Fetch and process web content.

api_tester

Test REST API endpoints.

{
  "method": "POST",
  "url": "https://api.example.com/users",
  "headers": {"Content-Type": "application/json"},
  "body": {"name": "Test"}
}

Code Quality

Code Analyzer

Tool Name: code_analyzer

Analyze code quality with A-F grading.

Metrics

LSP Integration

Tool Name: lsp

Language Server Protocol integration.

Diagram Generator

Tool Name: diagram_generator

Generate diagrams from descriptions.


Git Operations

Git Advanced Tool

Tool Name: git_advanced

Advanced git operations beyond basic commands.

Supported Operations

Category Operations
Stash save, pop, apply, list, drop
Cherry-pick pick, abort, continue
Rebase interactive, abort, continue
Bisect start, good, bad, reset
Worktree add, remove, list
Submodule add, update, init

Task Management

todo_write

Create and manage task lists for tracking progress.

Statuses: pending, in_progress, completed

task

Delegate tasks to specialized subagents.


Memory & Knowledge

save_memory

Save facts to long-term memory.

Scopes:

skill

Execute specialized skills.


UI Components

Progress Components

<ProgressBar
  progress={45}
  label="Downloading"
  speed="5.2 MB/s"
  eta="2m 30s"
/>

Thinking Indicator

<ThinkingIndicator
  message="Analyzing..."
  elapsedTime={45}
  showContent
/>

Token Usage Display

<TokenUsageDisplay
  totalTokens={1500}
  promptTokens={500}
  completionTokens={1000}
  tokensPerSecond={45}
/>

GPU/Memory Indicator

<GPUUsage
  name="NVIDIA RTX 4090"
  utilization={85}
  memoryUsed={20 * 1024 * 1024 * 1024}
  memoryTotal={24 * 1024 * 1024 * 1024}
/>

Tool Aliases

Short names for common tools:

Alias Tool Alias Tool
run run_shell_command read read_file
write write_file edit edit
grep grep_search glob glob
ls list_directory todo todo_write
memory save_memory web web_search
agent task py python_dev
npm nodejs_dev go golang_dev
php php_dev fetch web_fetch

Environment Configuration

The model receives environment information at session start:

## Environment

### Ollama Configuration
- **OLLAMA_BASE_URL**: http://localhost:11434
- **OLLAMA_MODEL**: llama3.2
- **OLLAMA_KEEP_ALIVE**: 5m
- **OLLAMA_API_KEY**: (set/not set)

### System Information
- **Node.js Version**: v24.13.1
- **Platform**: linux
- **Current Working Directory**: /home/user/project
- **Home Directory**: /home/user

### Debug Settings
- **DEBUG Mode**: disabled


Last updated: v0.10.6