I'll guide you through setting up a complete, free, local debugging system on Manjaro Linux using Ollama (to run the LLM locally) and lite-cc (the agentic CLI tool). This combination lets you debug scripts without any cloud API calls or costs.


Step 1: Install and Configure Ollama

Ollama runs the actual language model on your local machine. The standard install script sometimes has issues with Manjaro, but here's the reliable method:

Install Required Dependencies (Especially for NVIDIA GPUs)

First, check your kernel version and install necessary packages:

uname -r
pamac search "linux.*header"
pamac install nvidia nvidia-utils cuda linux[version]-headers

Replace [version] with your kernel version from the uname -r command (e.g., linux69-headers). If you're unsure or don't have an NVIDIA GPU, you can skip the CUDA/NVIDIA packages and use CPU-only mode.

Restart your system after installing NVIDIA drivers to ensure they load properly.

Install Ollama via AUR (Recommended for Manjaro)

The AUR package is typically more up-to-date and better integrated with Arch-based systems:

pamac install ollama

Alternatively, you can use the official install script after ensuring your NVIDIA drivers are working:

curl -fsSL https://ollama.com/install.sh | sh

If you see the error VERSION_ID: unbound variable, your NVIDIA drivers aren't properly detected—go back to the dependency installation step.

Start Ollama Service and Download a Model

# Start the Ollama service
systemctl start ollama
systemctl enable ollama  # Auto-start on boot

# Download a model (I recommend qwen2.5-coder for debugging)
ollama pull qwen2.5-coder:7b

You can verify Ollama is working by running:

ollama run qwen2.5-coder:7b "print('hello')"

Verify GPU is Working (If Applicable)

nvidia-sim
journalctl -u ollama | grep "NVIDIA"

You should see your GPU model and available VRAM.


Step 2: Install lite-cc

lite-cc is a lightweight, safety-focused coding agent that connects to Ollama.

# Install via pip
pip install lite-cc

# Or with uv (faster, if you have it installed)
uv pip install lite-cc

Verify installation:

litecc --help

Step 3: Configure lite-cc for Ollama

Create a configuration file so lite-cc knows to use your local Ollama model:

mkdir -p ~/.cc
cat > ~/.cc/config.yaml << 'EOF'
model: ollama/qwen2.5-coder:7b
max_iterations: 30
timeout: 120
EOF

This configuration:

  • Uses the model you downloaded via Ollama
  • Limits the agent to 30 tool-calling iterations (prevents runaway loops)
  • Sets a 120-second timeout per command

Step 4: Debug Your Script

Navigate to your project directory and run lite-cc:

cd /path/to/your/project
litecc run "Debug the script myscript.py. Find and fix any errors, then explain what was wrong."

For more visibility into what the agent is doing:

litecc run "Debug myscript.py" -v

Example: Debugging a Python Script

Let's say you have broken.py:

def calculate_average(numbers):
    return sum(numbers) / len(nimbers)  # Typo: 'nimbers' instead of 'numbers'

result = calculate_average([1, 2, 3, 4, 5])
print(f"Average: {result}")

Running lite-cc will:

  1. Read the file with read_file
  2. Execute the script with bash to see the error
  3. Identify the typo
  4. Use write_file to fix it
  5. Re-run to verify the fix

The output will show colored, timestamped logs of each tool call:

14:32:05 [litecc]  Using model: ollama/qwen2.5-coder:7b
14:32:05 [litecc]  Starting task...
14:32:06 [tool]    read_file: broken.py
14:32:07 [tool]    bash: python broken.py
14:32:08 [ollama]  Identified typo: 'nimbers' should be 'numbers'
14:32:09 [tool]    write_file: broken.py
14:32:10 [tool]    bash: python broken.py
14:32:11 [litecc]  Fix complete. Script now outputs: Average: 3.0

Safety Features

lite-cc has built-in guardrails to prevent destructive actions:

  • Blocked commands: rm, sudo, kill, git push --force
  • Path restrictions: Cannot access ~/.ssh, /etc, or traverse outside project directory
  • Output limits: 2000 lines or 100KB per command
  • Timeouts: Commands automatically stop after configurable timeout

These make it safe to let the agent run autonomously.


Useful lite-cc Commands for Debugging

Command Purpose
litecc run "debug script.py" Basic debugging
litecc run "fix all tests" -v Verbose mode with full tool output
litecc run "explain the error" --max-iterations 10 Limit iterations for simple tasks
litecc run "refactor this module" --model ollama/deepseek-coder Switch to a different local model

Troubleshooting

Ollama not responding to lite-cc

Make sure the Ollama service is running:

systemctl status ollama
ollama list  # Should show your downloaded model

lite-cc can't find the model

Check your config file and ensure the model name matches exactly:

cat ~/.cc/config.yaml
ollama list

"Command blocked" warnings

If lite-cc blocks a command you actually need (like git push), this is intentional safety. You can temporarily override by running with --dangerous flag, but only do this if you understand the risk.


Next Steps

Once you're comfortable with basic debugging, explore:

  • Plugins: Add specialized knowledge with --plugin-dir
  • Different models: Try ollama pull deepseek-coder:6.7b for alternative debugging styles
  • Skills: Create reusable debugging workflows with SKILL.md files

Would you like help setting up a specific plugin or debugging a particular type of script?

no comments (yet)

sorted by: hot top controversial new old
there doesn't seem to be anything here