provozni zaloha
This commit is contained in:
115
cml/raw/_done/claude-code-goal-command.md
Normal file
115
cml/raw/_done/claude-code-goal-command.md
Normal file
@@ -0,0 +1,115 @@
|
||||
# Keep Claude working toward a goal - Claude Code Docs
|
||||
|
||||
Source: https://code.claude.com/docs/en/goal
|
||||
|
||||
The `/goal` command sets a completion condition and Claude keeps working toward it without you prompting each step. After each turn, a small fast model checks whether the condition holds. If not, Claude starts another turn instead of returning control to you. The goal clears automatically once the condition is met.
|
||||
|
||||
Use a goal for substantial work with a verifiable end state:
|
||||
|
||||
- Migrating a module to a new API until every call site compiles and tests pass
|
||||
- Implementing a design doc until all acceptance criteria hold
|
||||
- Splitting a large file into focused modules until each is under a size budget
|
||||
- Working through a labeled issue backlog until the queue is empty
|
||||
|
||||
## Compare ways to keep a session running
|
||||
|
||||
Three approaches keep the current session running between prompts:
|
||||
|
||||
| Approach | Next turn starts when | Stops when |
|
||||
| --- | --- | --- |
|
||||
| `/goal` | The previous turn finishes | A model confirms the condition is met |
|
||||
| `/loop` | A time interval elapses | You stop it, or Claude decides the work is done |
|
||||
| Stop hook | The previous turn finishes | Your own script or prompt decides |
|
||||
|
||||
`/goal` and a Stop hook both fire after every turn. `/goal` is a session-scoped shortcut: you type a condition and it's active for the current session only. A Stop hook lives in your settings file, applies to every session in its scope, and can run a script for deterministic checks or a prompt for model-evaluated ones.
|
||||
|
||||
Auto mode on its own approves tool calls within a single turn but doesn't start a new one. Claude stops when it judges the work done. `/goal` adds a separate evaluator that checks your condition after every turn, so completion is decided by a fresh model rather than the one doing the work. The two are complementary: auto mode removes per-tool prompts, and `/goal` removes per-turn prompts.
|
||||
|
||||
## Use `/goal`
|
||||
|
||||
One goal can be active per session. The same command sets, checks, and clears it depending on the argument.
|
||||
|
||||
### Set a goal
|
||||
|
||||
Run `/goal` followed by the condition you want satisfied. If a goal is already active, the new one replaces it.
|
||||
|
||||
```
|
||||
/goal all tests in test/auth pass and the lint step is clean
|
||||
```
|
||||
|
||||
Setting a goal starts a turn immediately, with the condition itself as the directive. You don't need to send a separate prompt. While the goal is active, a `◎ /goal active` indicator shows how long the goal has been running.
|
||||
|
||||
After each turn, the evaluator returns a short reason explaining why the condition is or isn't met. The most recent reason appears in the status view and in the transcript so you can see what Claude is working toward next.
|
||||
|
||||
### Write an effective condition
|
||||
|
||||
The evaluator judges your condition against what Claude has surfaced in the conversation. It doesn't run commands or read files independently, so write the condition as something Claude's own output can demonstrate. "All tests in `test/auth` pass" works because Claude runs the tests and the result lands in the transcript for the evaluator to read.
|
||||
|
||||
A condition that holds up across many turns usually has:
|
||||
|
||||
- **One measurable end state**: a test result, a build exit code, a file count, an empty queue
|
||||
- **A stated check**: how Claude should prove it, such as "`npm test` exits 0" or "`git status` is clean"
|
||||
- **Constraints that matter**: anything that must not change on the way there, such as "no other test file is modified"
|
||||
|
||||
The condition can be up to 4,000 characters.
|
||||
|
||||
To bound how long a goal runs, include a turn or time clause in the condition, such as `or stop after 20 turns`. Claude reports progress against that clause each turn and the evaluator judges it from the conversation.
|
||||
|
||||
### Check status
|
||||
|
||||
Run `/goal` with no arguments to see the current state.
|
||||
|
||||
```
|
||||
/goal
|
||||
```
|
||||
|
||||
If a goal is active, the status shows:
|
||||
|
||||
- The condition
|
||||
- How long it has been running
|
||||
- How many turns have been evaluated
|
||||
- The current token spend
|
||||
- The evaluator's most recent reason
|
||||
|
||||
If no goal is active but one was achieved earlier in the session, the status shows the achieved condition along with its duration, turn count, and token spend.
|
||||
|
||||
### Clear a goal
|
||||
|
||||
Run `/goal clear` to remove an active goal before its condition is met.
|
||||
|
||||
```
|
||||
/goal clear
|
||||
```
|
||||
|
||||
`stop`, `off`, `reset`, `none`, and `cancel` are accepted as aliases for `clear`. Running `/clear` to start a new conversation also removes any active goal.
|
||||
|
||||
### Resume with an active goal
|
||||
|
||||
A goal that was still active when a session ended is restored when you resume that session with `--resume` or `--continue`. The condition carries over, but the turn count, timer, and token-spend baseline all reset on resume. A goal that was already achieved or cleared is not restored.
|
||||
|
||||
### Run non-interactively
|
||||
|
||||
`/goal` works in non-interactive mode, in the desktop app, and through Remote Control. Setting a goal with `-p` runs the loop to completion in a single invocation:
|
||||
|
||||
```
|
||||
claude -p "/goal CHANGELOG.md has an entry for every PR merged this week"
|
||||
```
|
||||
|
||||
Interrupt the process with Ctrl+C to stop a non-interactive goal before the condition is met.
|
||||
|
||||
## How evaluation works
|
||||
|
||||
`/goal` is a wrapper around a session-scoped prompt-based Stop hook. Each time Claude finishes a turn, the condition and the conversation so far are sent to your configured small fast model, which defaults to Haiku. The model returns a yes-or-no decision and a short reason. A "no" tells Claude to keep working and includes the reason as guidance for the next turn. A "yes" clears the goal and records an achieved entry in the transcript.
|
||||
|
||||
The evaluator runs on whichever provider your session is configured for. It does not call tools, so it can only judge what Claude has already surfaced in the conversation.
|
||||
|
||||
## Requirements
|
||||
|
||||
`/goal` runs only in workspaces where you have accepted the trust dialog, because the evaluator is part of the hooks system. `/goal` is also unavailable when `disableAllHooks` is set at any settings level or when `allowManagedHooksOnly` is set in managed settings. In each case, the command tells you why instead of silently doing nothing.
|
||||
|
||||
## See also
|
||||
|
||||
- Run a prompt repeatedly with `/loop`: re-run on a time interval instead of until a condition holds
|
||||
- Prompt-based hooks: write your own Stop hook when you need custom evaluation logic
|
||||
- Auto mode: approve tool calls automatically so each goal turn runs unattended
|
||||
- Scheduling comparison: run work on a schedule independent of any open session
|
||||
@@ -0,0 +1,94 @@
|
||||
# Run Claude Code with Local & Cloud Models in 5 Minutes (Ollama, LM Studio, llama.cpp, OpenRouter)
|
||||
|
||||
**Autor:** Luong NGUYEN
|
||||
**URL:** https://medium.com/@luongnv89/run-claude-code-on-local-cloud-models-in-5-minutes-ollama-openrouter-llama-cpp-6dfeaee03cda
|
||||
**Datum:** Jan 31, 2026
|
||||
|
||||
---
|
||||
|
||||
Průvodce nastavením Claude Code s alternativními modely — Ollama (lokální i cloud), LM Studio, llama.cpp, OpenRouter a další. Většina konfigurace se dělá přes env vars `ANTHROPIC_BASE_URL`, `ANTHROPIC_AUTH_TOKEN`, `ANTHROPIC_API_KEY`, `ANTHROPIC_MODEL`.
|
||||
|
||||
## Doporučené modely pro coding
|
||||
|
||||
- **devstral-small-2 (24B)** — dobrý start pro coding quality
|
||||
- **qwen3-coder:30b** — lepší coding ability, stále praktický na 32GB RAM
|
||||
- **GLM4.7-flash:q8_0** — silný poměr cena/výkon (kvantizovaný)
|
||||
|
||||
Minimální spec: 32GB RAM, model 24B+ parametrů. Na 16GB to jde, ale experience je rough.
|
||||
|
||||
## Option 1: Ollama Local
|
||||
|
||||
```bash
|
||||
ollama pull devstral-small-2
|
||||
ollama launch claude --model devstral-small-2
|
||||
```
|
||||
|
||||
Nebo manuálně přes env vars:
|
||||
```bash
|
||||
export ANTHROPIC_AUTH_TOKEN="ollama"
|
||||
export ANTHROPIC_API_KEY=""
|
||||
export ANTHROPIC_BASE_URL="http://localhost:11434"
|
||||
claude --model devstral-small-2
|
||||
```
|
||||
|
||||
## Option 2: llama.cpp + HuggingFace
|
||||
|
||||
Build llama.cpp s Metal (macOS) nebo CUDA (Linux), spusť server s `--jinja` flag (nutný pro tool calling), připoj Claude Code přes `ANTHROPIC_BASE_URL=http://localhost:8000`.
|
||||
|
||||
```bash
|
||||
llama-server -hf bartowski/cerebras_Qwen3-Coder-REAP-25B-A3B-GGUF:Q4_K_M \
|
||||
--alias "Qwen3-Coder-REAP-25B-A3B-GGUF" \
|
||||
--port 8000 --jinja --kv-unified \
|
||||
--cache-type-k q8_0 --cache-type-v q8_0 \
|
||||
--flash-attn on --batch-size 4096 --ubatch-size 1024 --ctx-size 64000
|
||||
```
|
||||
|
||||
## Option 3: LM Studio
|
||||
|
||||
GUI i CLI varianta (`llmster`). Server na portu 1234, env vars `ANTHROPIC_BASE_URL=http://localhost:1234`, `ANTHROPIC_AUTH_TOKEN=lmstudio`.
|
||||
|
||||
## Option 4: Ollama Cloud Models
|
||||
|
||||
```bash
|
||||
ollama pull kimi-k2.5:cloud
|
||||
ollama pull minimax-m2.1:cloud
|
||||
claude --model kimi-k2.5:cloud
|
||||
```
|
||||
|
||||
Stejný workflow jako lokální, compute v cloudu. Free tier má omezený usage.
|
||||
|
||||
## Option 5: Cloud Provider APIs (OpenRouter atd.)
|
||||
|
||||
```bash
|
||||
export ANTHROPIC_BASE_URL=https://openrouter.ai/api
|
||||
export ANTHROPIC_AUTH_TOKEN=YOUR_OPENROUTER_KEY
|
||||
export ANTHROPIC_API_KEY=
|
||||
export ANTHROPIC_MODEL="openai/gpt-oss-120b:free"
|
||||
```
|
||||
|
||||
Prázdný `ANTHROPIC_API_KEY` je záměr — zabraňuje autentikaci přes Anthropic API přímo.
|
||||
|
||||
Minimax přes OpenRouter: ~98% levnější než Opus 4.5. Podobně GLM, DeepSeek, Kimi.
|
||||
|
||||
## Klíčové env vars
|
||||
|
||||
| Var | Purpose |
|
||||
|-----|---------|
|
||||
| `ANTHROPIC_BASE_URL` | API endpoint |
|
||||
| `ANTHROPIC_AUTH_TOKEN` | API key pro provider |
|
||||
| `ANTHROPIC_API_KEY` | Prázdný = žádný Anthropic fallback |
|
||||
| `ANTHROPIC_MODEL` | Model identifier |
|
||||
|
||||
## Závěr
|
||||
|
||||
- Lokální na M1 32GB: devstral-small-2 (24B) OK, větší modely pomalé
|
||||
- Nvidia DGX Spark: široký výběr modelů
|
||||
- Cloud: nejrychlejší cesta, Ollama Cloud free tier pro emergency, jinak Kimi/Minimax/DeepSeek/GLM přes OpenRouter
|
||||
- Opus 4.5 stále nejlepší quality+speed, ale drahý
|
||||
|
||||
## Zdroje
|
||||
|
||||
- [Ollama Claude Code Integration](https://docs.ollama.com/integrations/claude-code)
|
||||
- [OpenRouter Integration](https://openrouter.ai/docs/guides/guides/claude-code-integration)
|
||||
- [cc-compatible-models](https://github.com/Alorse/cc-compatible-models)
|
||||
- [claude-flow wiki](https://github.com/ruvnet/claude-flow/wiki/Using-Claude-Code-with-Open-Models)
|
||||
43
cml/raw/_done/claude-code-ollama-workflow-free.md
Normal file
43
cml/raw/_done/claude-code-ollama-workflow-free.md
Normal file
@@ -0,0 +1,43 @@
|
||||
# I Tried New Claude Code Ollama Workflow (It's Wild & Free)
|
||||
|
||||
**Autor:** Joe Njenga
|
||||
**URL:** https://medium.com/@joe.njenga/i-tried-new-claude-code-ollama-workflow-its-wild-free-cb7a12b733b5
|
||||
**Datum:** Jan 19, 2026
|
||||
**Status:** 🔒 Member-only (paywall) — pouze preview dostupný
|
||||
|
||||
---
|
||||
|
||||
## Dostupný obsah (preview)
|
||||
|
||||
Claude Code nyní funguje s Ollama — lokální i cloud modely. Ollama v0.14.0+ je kompatibilní s Anthropic Messages API, takže Claude Code může komunikovat přímo s Ollama modely.
|
||||
|
||||
### Klíčové body z preview
|
||||
|
||||
- Ollama v0.14.0+ podporuje Anthropic Messages API → Claude Code kompatibilita
|
||||
- Ideální pro privacy-conscious projekty, air-gapped systémy, nebo vyhnutí se API costům
|
||||
- Autor testoval integraci od oznámení a dokumentoval chyby/pastýřky
|
||||
- Workflow: lokální modely bez odesílání každého requestu do cloudu
|
||||
|
||||
### Nastavení Ollama s Claude Code
|
||||
|
||||
```bash
|
||||
# Lokální Ollama
|
||||
export ANTHROPIC_AUTH_TOKEN="ollama"
|
||||
export ANTHROPIC_API_KEY=""
|
||||
export ANTHROPIC_BASE_URL="http://localhost:11434"
|
||||
claude --model devstral-small-2
|
||||
|
||||
# Cloud modely přes Ollama
|
||||
ollama pull kimi-k2.5:cloud
|
||||
claude --model kimi-k2.5:cloud
|
||||
```
|
||||
|
||||
### Varování z preview
|
||||
|
||||
- Autor zmiňuje "všechny chyby, které tě budou stát čas" — konkrétní detaily za paywallem
|
||||
- Free tier Ollama Cloud má omezený usage
|
||||
|
||||
## Zdroje
|
||||
|
||||
- [Ollama Claude Code Integration](https://docs.ollama.com/integrations/claude-code)
|
||||
- [cc-compatible-models](https://github.com/Alorse/cc-compatible-models)
|
||||
40
cml/raw/_done/claude-code-openrouter-beast-mode-low-cost.md
Normal file
40
cml/raw/_done/claude-code-openrouter-beast-mode-low-cost.md
Normal file
@@ -0,0 +1,40 @@
|
||||
# How I'm Using Claude Code Like Cline With OpenRouter (To Go Beast Mode at Low Cost)
|
||||
|
||||
**Autor:** Joe Njenga
|
||||
**URL:** https://medium.com/@joe.njenga/how-im-using-claude-code-like-cline-with-openrouter-to-go-beast-mode-at-low-cost-8c78e0bdcb67
|
||||
**Datum:** Jan 18, 2026
|
||||
**Status:** 🔒 Member-only (paywall) — pouze preview dostupný
|
||||
|
||||
---
|
||||
|
||||
## Dostupný obsah (preview)
|
||||
|
||||
Claude Code + OpenRouter integrace pro low-cost coding. OpenRouter nedávno přidal Claude Code do své unified API platformy. Článek ukazuje, jak nastavit Claude Code s OpenRouter podobně jako Cline (VS Code extension) — svoboda volby modelu bez lock-in na jednoho providera.
|
||||
|
||||
### Klíčové body z preview
|
||||
|
||||
- OpenRouter integroval Claude Code do unified API
|
||||
- Cline-like workflow: volit jakýkoliv model (GPT-4, Claude, nové modely) bez provider lock-in
|
||||
- Nastavení přes env vars: `ANTHROPIC_BASE_URL`, `ANTHROPIC_AUTH_TOKEN`, `ANTHROPIC_API_KEY`, `ANTHROPIC_MODEL`
|
||||
- Cílem: x10 budget efficiency oproti nativnímu Claude API
|
||||
|
||||
### Nastavení OpenRouter s Claude Code
|
||||
|
||||
```bash
|
||||
export ANTHROPIC_BASE_URL=https://openrouter.ai/api
|
||||
export ANTHROPIC_AUTH_TOKEN=YOUR_OPENROUTER_KEY
|
||||
export ANTHROPIC_API_KEY=
|
||||
export ANTHROPIC_MODEL="openai/gpt-oss-120b:free"
|
||||
```
|
||||
|
||||
Prázdný `ANTHROPIC_API_KEY` zabraňuje fallback na Anthropic API.
|
||||
|
||||
### Modely zmíněné v článku
|
||||
|
||||
- Minimax přes OpenRouter: ~98% levnější než Opus 4.5
|
||||
- GLM, DeepSeek, Kimi — další low-cost alternativy přes OpenRouter
|
||||
|
||||
## Zdroje
|
||||
|
||||
- [OpenRouter Integration](https://openrouter.ai/docs/guides/guides/claude-code-integration)
|
||||
- [cc-compatible-models](https://github.com/Alorse/cc-compatible-models)
|
||||
3
cml/raw/_done/lego-mindstorms-continued-use.md
Normal file
3
cml/raw/_done/lego-mindstorms-continued-use.md
Normal file
@@ -0,0 +1,3 @@
|
||||
https://blog.robotmak3rs.com
|
||||
|
||||
Topic: How to continue using LEGO Mindstorms products (after discontinuation / in alternative ways).
|
||||
49
cml/raw/_done/pi-coding-agent-mario-zechner.md
Normal file
49
cml/raw/_done/pi-coding-agent-mario-zechner.md
Normal file
@@ -0,0 +1,49 @@
|
||||
# I Hated Every Coding Agent, So I Built My Own — Mario Zechner (Pi)
|
||||
|
||||
**Source URL:** https://www.youtube.com/watch?v=Dli5slNaJu0
|
||||
**Type:** Video / Talk
|
||||
**Date:** 2026 (approx)
|
||||
**Speaker:** Mario Zechner (creator of Pi coding agent, also known as badlogic — libGDX author)
|
||||
|
||||
## Why Pi was created
|
||||
|
||||
Mario was frustrated by existing coding agents (Claude Code, OpenCode, Codex CLI, AMP) for several reasons:
|
||||
|
||||
1. **Feature bloat** — agents pile on features (built-in to-dos, complex tool suites) that aren't needed and add hidden context injection
|
||||
2. **Hidden behaviors** — vendors change things under the hood (system prompts, context injection) that make LLMs behave unpredictably with existing workflows
|
||||
3. **Poor observability** — hard to see what the agent is actually doing, what context it's using, how much it costs
|
||||
4. **Lack of extensibility** — no way for power users to add custom tools or modify behavior without forking
|
||||
5. **Approval fatigue** — agents offer either full autonomy or approval for every action; both are bad UX
|
||||
6. **Poor context management** — agents like OpenCode rely on session compaction but lose important context
|
||||
|
||||
Key quote: *"So obviously they're doing things right, but not for me."*
|
||||
|
||||
## Pi's design philosophy
|
||||
|
||||
- **Minimal core** — only 4 tools: read file, write file, edit file, bash. That's all you need.
|
||||
- **Tiny system prompt** — frontier RL-trained models don't need massive system prompts
|
||||
- **Tree-structured sessions** — not linear chat history; sub-agents can branch and read files independently while preserving context/lineage
|
||||
- **Full cost tracking** — built-in, not an afterthought
|
||||
- **Hot-reloadable TypeScript extensions** — users can define custom tools, UIs, multi-agent setups without modifying core
|
||||
- **No hidden context injection** — what you see is what the model gets
|
||||
|
||||
## Community extensions
|
||||
|
||||
- **pi-annotate** — visual feedback on live websites
|
||||
- **pi-messenger** — multi-agent chatroom with custom UI
|
||||
- Custom UIs, tool integrations — all as hot-reloadable TS modules
|
||||
|
||||
## Performance
|
||||
|
||||
On TerminalBench, Pi (with Claude Opus 4.5) scored close to Terminus even before advanced optimizations like compaction.
|
||||
|
||||
## Key insight
|
||||
|
||||
*"We are in the messing around and finding out stage, and nobody has any idea what the perfect coding agent should look like."* — simplification can lead to effective performance without unnecessary complexity.
|
||||
|
||||
## Related
|
||||
|
||||
- Pi website: https://pi.dev/
|
||||
- Pi GitHub: https://github.com/earendil-works/pi
|
||||
- Pi is part of OpenClaw ecosystem
|
||||
- Mario Zechner is also the author of libGDX (Java game dev framework)
|
||||
5
cml/raw/_done/pi-dev-terminal-limitation.md
Normal file
5
cml/raw/_done/pi-dev-terminal-limitation.md
Normal file
@@ -0,0 +1,5 @@
|
||||
# pi.dev — terminálová limitace
|
||||
|
||||
pi.dev je pěkný projekt, ale limitace na terminal je až moc přísná a omezující. Bez IDE to ztrácí všechny výhodné vlastnosti — podobně jako opencode.
|
||||
|
||||
Terminal-only přístup výrazně omezuje uživatelskou zkušenost a produktivitu oproti plnohodnotnému IDE integrovanému řešení.
|
||||
Reference in New Issue
Block a user