Jump to content

AI LLM for Coding: Difference between revisions

From Torben's Wiki
mNo edit summary
No edit summary
Line 1: Line 1:
==Opencode==
==Opencode==
https://opencode.ai
[https://opencode.ai]
  brew install anomalyco/tap/opencode
  brew install anomalyco/tap/opencode
   
   
Line 7: Line 7:
   
   
  # initialize Opencode and create/update/improve/compress AGENTS.md file
  # initialize Opencode and create/update/improve/compress AGENTS.md file
/init
  /init
    
    
  # update
  # update
Line 24: Line 24:
==Claude==
==Claude==
===Web===
===Web===
https://claude.ai <br>
[https://claude.ai]
Pros: Daily reset free quota<br>
* Pros: Daily reset free quota
Cons: Need to manually upload single files
* Cons: Need to manually upload single files


===Console===
===Console===
Claude Console via API and VISA Pre-Paid: https://console.anthropic.com <br>
Claude Console via API and VISA Pre-Paid: [https://console.anthropic.com]
Pros: fully integrated in code base<br>
* Pros: Fully integrated in codebase
Cons: costs money, 5€ are easily spent
* Cons: Costs money (e.g., 5€ are easily spent)
  npm install -g @anthropic-ai/claude-code
  npm install -g @anthropic-ai/claude-code
  cd myProject
  cd myProject
  claude
  claude
==Google Gemini==
==Google Gemini==
Pros: Free to use with google account
* Pros: Free to use with Google account
create your API key at https://aistudio.google.com/app/api-keys
Create your API key at [https://aistudio.google.com/app/api-keys]


Install
Install
Line 44: Line 45:
  # or just run
  # or just run
  npx https://github.com/google-gemini/gemini-cli
  npx https://github.com/google-gemini/gemini-cli
Usage
Usage
  cd /tmp
  cd /tmp
Line 58: Line 60:


==Google Antigravity==
==Google Antigravity==
https://antigravity.google/download
[https://antigravity.google/download]


==Tips==
==Tips==
Line 64: Line 66:
* Use tools for code formatting, linting, type-hints
* Use tools for code formatting, linting, type-hints
* Configure these tools to produce minimum output to reduce token consumption. e.g. for
* Configure these tools to produce minimum output to reduce token consumption. e.g. for
** Prettier: --log-level silent
** Prettier: --log-level silent
** Cypress: cypress run --e2e --quiet
** Cypress: cypress run --e2e --quiet
* For Refactoring/renaming: better do it manually, via VSCode, that is a lot faster
* For Refactoring/renaming: better do it manually, via VSCode, that is a lot faster


===Cavemen style===
===Cavemen style===
https://github.com/JuliusBrussee/caveman
[https://github.com/JuliusBrussee/caveman]
  npx skills add JuliusBrussee/caveman -a github-copilot
  npx skills add JuliusBrussee/caveman -a github-copilot
It has an option to install to local home dir instead of to project repo.
It has an option to install to local home dir instead of to project repo.


According to https://medium.com/@KubaGuzik/i-benchmarked-the-viral-caveman-prompt-to-save-llm-tokens-then-my-6-line-version-beat-it-d8e565f95e15
According to [https://medium.com/@KubaGuzik/i-benchmarked-the-viral-caveman-prompt-to-save-llm-tokens-then-my-6-line-version-beat-it-d8e565f95e15]
 
It can be replaced by 6 hard coded lines in AGENTS.md:
It can be replaced by 6 hard coded lines in AGENTS.md:
  Respond like smart caveman. Cut all filler, keep technical substance.
  Respond like smart caveman. Cut all filler, keep technical substance.
Line 84: Line 85:


===Context7===
===Context7===
https://context7.com offers an MCP server of latest spec to many languages, enabling the LLM to support latest versions and best practice.
[https://context7.com] offers an MCP server of latest spec to many languages, enabling the LLM to support latest versions and best practice.
  npx ctx7 setup
  npx ctx7 setup
In prompt write:
In prompt write:
  use context7. do xxx
  use context7. do xxx

Revision as of 07:10, 9 June 2026

Opencode

[1]

brew install anomalyco/tap/opencode

# add context7 MCP
npx ctx7 setup --opencode

# initialize Opencode and create/update/improve/compress AGENTS.md file
 /init
 
# update
brew update
brew upgrade anomalyco/tap/opencode

For saving of tokens, add Caveman speech to AGENTS.md

Mistral Devstral

Obtain API key from [2]

uv tool install mistral-vibe
# run via
vibe

Claude

Web

[3]

  • Pros: Daily reset free quota
  • Cons: Need to manually upload single files

Console

Claude Console via API and VISA Pre-Paid: [4]

  • Pros: Fully integrated in codebase
  • Cons: Costs money (e.g., 5€ are easily spent)
npm install -g @anthropic-ai/claude-code
cd myProject
claude

Google Gemini

  • Pros: Free to use with Google account

Create your API key at [5]

Install

npm install -g @google/gemini-cli@latest
gemini
# or just run
npx https://github.com/google-gemini/gemini-cli

Usage

cd /tmp
export GEMINI_API_KEY="xxx"
git clone https://github.com/entorb/meeting-meter
cd myProject
gemini

To switch model from pro to flash:

export GEMINI_MODEL="gemini-2.5-flash"

Secret alternative: .env file

GEMINI_API_KEY=xxx

Google Antigravity

[6]

Tips

  • E2E tests (e.g. Cypress) are very important
  • Use tools for code formatting, linting, type-hints
  • Configure these tools to produce minimum output to reduce token consumption. e.g. for
    • Prettier: --log-level silent
    • Cypress: cypress run --e2e --quiet
  • For Refactoring/renaming: better do it manually, via VSCode, that is a lot faster

Cavemen style

[7]

npx skills add JuliusBrussee/caveman -a github-copilot

It has an option to install to local home dir instead of to project repo.

According to [8] It can be replaced by 6 hard coded lines in AGENTS.md:

Respond like smart caveman. Cut all filler, keep technical substance.
- Drop articles (a, an, the), filler (just, really, basically, actually).
- Drop pleasantries (sure, certainly, happy to).
- No hedging. Fragments fine. Short synonyms.
- Technical terms stay exact. Code blocks unchanged.
- Pattern: [thing] [action] [reason]. [next step].

Context7

[9] offers an MCP server of latest spec to many languages, enabling the LLM to support latest versions and best practice.

npx ctx7 setup

In prompt write:

use context7. do xxx