cd /news/ai-agents/show-hn-open-source-native-ai-harnes… · home › topics › ai-agents › article
[ARTICLE · art-175925] src=github.com ↗ pub= topic=ai-agents verified=true sentiment=↑ positive

Show HN: Open-source native AI harness that's trying to do less by default

A developer has released Hm, an open-source native desktop code editor with a built-in AI coding agent, written in Go and rendered with the GPU-based Yoga (WebGPU) UI toolkit so it runs natively on macOS, Linux and Windows without a browser engine. Hm is bring-your-own-key, supporting Anthropic, Google Gemini, OpenAI, Azure OpenAI and any OpenAI-compatible endpoint including OpenRouter, Groq, Mistral, xAI, Ollama and LM Studio, and sends nothing off the machine except the calls the user configures. The agent is designed to do less by default: it shows every change in a real editor with language server diagnostics and git diff, offers rubber-duck and lazy modes, asks before running shell commands or deleting files, follows guard.yaml rules, and lets users undo the last turn or branch from any earlier message.

key takeaway

Hm ships a bring-your-own-key coding agent that asks before running shell commands or deleting files, enforces guard.yaml rules, and lets you undo the last turn or branch from any earlier message.

read20 min views5 publishedNov 25, 2026
Show HN: Open-source native AI harness that's trying to do less by default
Image: Michielbdejong (auto-discovered)

Hm is a desktop code editor with an AI coding agent built in. It is written in Go and draws its UI with Yoga, a GPU-rendered (WebGPU) UI toolkit, so it starts quickly, stays light, and runs natively on macOS, Linux and Windows without a browser engine. It is a sibling of Chapar and shares its look and feel.

Everything is configured in plain YAML, with a settings page on top. The agent is bring-your-own-key: Anthropic, Google Gemini, OpenAI, Azure OpenAI or any OpenAI-compatible endpoint (OpenRouter, Groq, Mistral, xAI, Ollama, LM Studio, ...), and nothing leaves your machine except the calls you configure.

Hm is the sound you make when you are evaluating a solution: the short after reading a diff, a stack trace or a suggestion, before you decide whether it is right.

That is what Hm is built around. The agent can write code quickly, but the decision about whether it belongs in your codebase stays with you. That is why Hm:

  • shows every change in a real editor, with the language server, diagnostics and git diff right next to it;
  • has modes that slow the agent down when you want them to: rubber-duck plans and pushes back before touching code, andlazy changes only what is necessary;
  • by default asks before it runs shell commands or deletes files, and always follows your guard.yaml rules;
  • lets you undo the agent's last turn, or go back to any earlier message and try again, keeping every branch.

Fast where it can be, and quiet when you need to think.

  • Tabs, split editor groups, back/forward navigation and session restore.

  • File explorer with file-type icons, git status colors, drag and drop, filter, and collapse all.

  • Syntax highlighting with Tree-sitter for Go, TypeScript/JavaScript, Python, Rust, Java, C, C++, C#, Zig, Lua, Ruby, PHP, Protobuf, YAML, TOML, JSON, Bash, Make, Dockerfile, CSS, HTML, Markdown, SQL and common config files.

  • Multiple cursors and column selection, find and replace with regex, code folding, soft wrap, indent guides, auto-closing brackets and quotes.

  • Auto indent (none ,keep oradvanced ), tabs or spaces, and trimming trailing whitespace on save.

  • Per-language settings: tab width, indentation, auto indent, soft wrap, format on save and trimming, set in YAML or from a language picker in Settings.

  • The footer shows the caret position, indentation, encoding and line endings: switch a file to spaces or tabs and a width for the session, convert LF and CRLF, or add or remove a UTF-8 BOM.

  • Markdown preview, and an image viewer for PNG, JPEG, GIF, WebP, BMP and TIFF.

  • CSV and TSV files open as a table (or source, or both split): filter rows, sort and resize columns, edit cells, add and delete rows. Each edit rewrites only its record, so the rest of the file keeps its quoting and line endings.

  • Untitled buffers to paste into without making a file first; pick their language from the command palette and save them later.

  • Minimap at the editor's right edge (editor.minimap ); click or drag it to scroll.

  • Files with Windows line endings (CRLF) stay CRLF: Enter, paste and the line commands write the file's own line ending.

  • Optional Vim keymap.

  • Whole-window zoom with cmd+= ,cmd+- andcmd+0 .

  • Auto save on focus change or after a delay.

  • Language servers (LSP): diagnostics, hover, completion, go to definition and implementation, find references, rename, document symbols and formatting.

  • Problems panel listing every diagnostic.

  • Formatters per language, run on save, on demand or after paste, piping the buffer or rewriting the file.

  • Missing servers and formatters can be installed with one click (go install ,brew ,npm , ...).

  • Adding a language, server or formatter is a few lines of YAML.

  • Project search with ripgrep (or a built-in engine): regex, replace one or all, results on the left and an editable preview on the right.

  • Quick open (cmd+p ), go to symbol, go to tab and a command palette (cmd+shift+p ).

  • Git panel from the footer: stage, commit, discard, branches, fetch, pull and push.

  • Change bars in the gutter: rest the pointer on one to see the lines before and after, and revert them.

  • Merge branches; files with conflicts are marked until every one is resolved.

  • Remotes over HTTPS with tokens kept in the OS keychain.

  • Integrated terminal with multiple sessions, opened from the footer.

Chat with the agent beside the editor or full screen; ask about a selection with cmd+alt+l . #

Sessions in tabs, several working at once: cmd+t opens one,ctrl+tab /ctrl+shift+tab switch, and a spinner or dot marks a tab that is working, waiting for you or was interrupted. #

Full screen, a sidebar replaces the explorer: New chat, Projects, Artifacts, a filterable history of every session (across all your folders, with sub-agents and forks nested under the session they came from). Settings open in the agent's tabs while it is full screen. #

Providers: Anthropic, Google Gemini (with an API key, or on Vertex AI with your gcloud sign-in), OpenAI, Azure OpenAI (a deployment with api_version , or the v1 API) and any OpenAI-compatible endpoint./think setsreasoning_effort on OpenAI's reasoning models (o-series, gpt-5) on OpenAI and Azure. OpenRouter, Baseten, Groq, Cerebras, Mistral, xAI, DeepSeek, Together, Fireworks, Hugging Face, Ollama and LM Studio are known by name (type: groq ), so adding one only asks for a key. #

Settings → Providers lists the providers you set up with their connection, key and models; open one to change its key, default model or endpoint, test the connection, or turn it off (disabled: true ) without losing its setup.Add provider walks through the service, name, endpoint and key. Gemini streams its thinking, and its thought signatures go back with the history as the API requires. #

A model registry: ~/.config/hm/models.json and.hm/models.json add models or change what hm knows of them (context window, max output, prices, what they support, effort levels), the workspace's file winning. The context meter, compaction and the cost of each reply use it. Changes apply as soon as you save. #

Switch models mid-session: ctrl+l (alt+m on Windows and Linux, or the composer's model menu → All models…) searches every provider's models,/model <name> picks one byprovider/model , model id or part of one, andctrl+p (alt+n on Windows and Linux) steps throughagent.favorite_models . The history goes along; thinking written by another provider is left out./think off|low|medium|high|xhigh|max sets how hard the model thinks for the session (/think default goes back to the provider's), shown next to the model's name. A reopened session goes on with the model and thinking it last ran. #

Projects: a title, description and context that the agent is given before every task in the project's sessions. Pick one in the composer. #

Reads the instruction files other agents use: AGENTS.md , orCLAUDE.md when there is none, from~/.config/hm and from each folder between your home folder and the workspace, outer folders first. ASYSTEM.md (.hm/SYSTEM.md , else~/.config/hm/SYSTEM.md ) replaces the base prompt, or adds to it when its first line is<!-- append --> . The book icon in the session header and/context list the files a session uses. A session reads them once when it starts, so its prompt stays cached. #

Prompt templates: each .md file in~/.config/hm/prompts ,.hm/prompts ,.claude/commands or.pi/prompts is a/name command in the message box, listed in its completions with its description.$ARGUMENTS is what you type after the command,$1 ,$2 … its words (quotes group them), and a line@path inlines a workspace file (guard.yaml rules apply). Front matter can setdescription ,argument-hint ,mode andmodel (a provider's name, the model it runs, orprovider/model ). Claude Code commands work as they are. Built-in commands win over a template of the same name. #

Images: paste a screenshot into the message box ( cmd+v ; on Linux this needswl-paste orxclip ), drop picture files on the window, or mention one as@shot.png . They wait in the box as thumbnails, with an × to take one out, and show in the chat once sent.read on a PNG, JPEG, GIF or WebP file gives the model the picture. Pictures over 1568 pixels on the long side or 5 MB are scaled down first. A model whosemodels.json entry says"images": false gets[image omitted: model has no vision] instead, and you are told once. Saved sessions keep each picture once insessions/images/ , named by its hash. Dropping other files mentions them; with the agent closed, dropped files open in the editor. #

Type while the agent works. Enter steers: the running tool call finishes, the rest of the batch is skipped and the model reads your message. Alt+Enter sends a follow-up that waits for the turn to end. Queued messages show above the message box with their kind, and can be edited or removed before they are sent. #

Sessions are saved after every step, as an append-only JSON Lines file (older sessions convert when first opened; the original goes to sessions/v1/ ). If hm stops mid-task, the session reopens marked as interrupted, with aResume button. #

Replay a session one message at a time, with when each one happened. #

Sessions are trees. Hover a message you sent to edit and resend it, which starts a new branch from that point, or tobranch here and go on from the end of that turn. The old branch stays./tree shows every branch (search the text, filter by user, assistant, tools or labels); choose a message to edit it, or any other entry to go on from there./fork [id] opens a new session that starts from a point of this one, and/label <text> bookmarks the latest message so/tree can find it. Withagent.branch_summary on, a branch you leave gets a few lines on what it did. Files on disk are not changed when you switch branches. #

Rate limits, an overloaded API and dropped connections don't end the turn: the call is retried with growing waits (or as long as the API asks), and the chat says so ("Rate limited, retrying in 8s (2/5)"). Esc stops the wait. A call is never retried once its answer has started to stream. #

A context meter in the composer shows how much of the model's window the conversation fills ("42k / 200k"), in the warning colour from 80%. #

Long sessions keep working: when the conversation nears 85% of the model's window, or the API says the prompt is too long, older messages are summarised (goal, decisions, files touched, open tasks, unsolved errors, next step) and the model sees the summary plus the latest messages. /compact [focus] does it by hand, keeping what you name. A divider in the chat ("Compacted 148k → 12k tokens") opens to show the summary; the saved session and replay keep every message. #

Sub-agents: the task tool hands work to an agent in a session of its own, in the foreground or the background, read-only unless allowed to write. Several run at once. Agents message each other withsend_message ,wait_message andlist_agents ; a message steers the receiver unlessfollow_up is set, and a background task's report arrives as a follow-up. #

Modes, switched with /mode :

  • lazy changes only what is necessary;
  • rubber-duck plans and pushes back before touching code;
  • auto does what is best;
  • fullstack builds apps from the ground up.

Tools: read, write, edit and multi-edit files, grep, list, run shell commands, LSP diagnostics and rename, format, project search, todos, web search and fetch, and asking you questions. #

Extensible with MCP servers, your own command-line tools and skills (also read from .cursor/skills and.claude/skills ). #

Approval per tool and mode, plus a guard.yaml of deny, read-only and ask rules. A project's rules can only tighten yours. #

Undo the agent's last turn: the conversation goes back to before your message, which returns to the message box, and the files the turn changed are put back. The undone turn stays in /tree . #

Embeddable: the Go package github.com/usehm/hm/pkg/hm/agent runs the same agent without the window, with the same config,guard.yaml , skills, MCP servers, instruction files and saved sessions. Your program decides approvals by implementingApprover , and reads what happens fromEvents() :

r, err := agent.New(agent.Options{Root: ".", Approver: myApprover{}})
if err != nil { ... }
defer r.Close()
err = r.Prompt(ctx, "list the packages") // r.Steer and r.FollowUp work meanwhile
err = r.Prompt(ctx, "what is wrong here?", agent.Image{Data: png}) // images go along
fmt.Println(r.Answer())

Without an Approver, calls that need approval are refused and the model is told why. #

Headless on the command line, with no window or display: hm agent -p "prompt" runs the agent in the current folder and prints its final answer. Piped input is added to the prompt, or is the prompt:git diff | hm agent -p "review this" ,echo 'list the packages' | hm agent -p . Flags, before or after the prompt:

  • --mode ,--provider ,--model pick what runs;--cwd DIR the workspace.
  • --session ID or--continue resume a saved session (the newest of the folder);--no-session saves nothing.
  • --max-steps N bounds the model calls of a turn (default 80).
  • --approve never|edits|all decides the calls the mode would ask you about, since nobody is there to ask:never (the default) refuses them and tells the model how to rerun,edits allows file edits only,all allows them all.guard.yaml deny rules always apply.
  • -v shows tool calls and retries on standard error. Warnings always go there; standard output gets only the answer.
  • --output json writes every event instead, one JSON object per line (text deltas, tool calls and results, approvals, usage, the answer and exit code at the end), for scripts andjq . The format is indocs/events.md . hm agent --rpc lets another program drive a session: it sends JSON commands on standard input (prompt, steer, follow-up, abort, approve, answer, set the mode or model, compact, fork, export, list sessions, get the state) and reads the events and a response to each command. Prompts, steering and follow-ups can carry images as base64. It approves calls itself (--approve ask , the default) unless--approve edits|all allows them. Seedocs/rpc.md and the Python client inexamples/rpc_client.py .Exit codes: 0 done,1 the agent failed (a model call, a missing key, out of steps),2 bad usage,3 a call was refused for want of approval (the answer is still printed),130 interrupted.

AI inline completions: ghost text at the caret, Tab to accept. #

API keys live in the OS keychain or come from environment variables.

  • Themes, including Tokyo Night, following the system light/dark setting if you like.
  • Settings page backed by YAML: user config in ~/.config/hm/config.yaml , project config in.hm/config.yaml , applied live on save, with errors shown at their line.
  • Keyboard shortcuts in Settings or YAML, with two-chord sequences and VS Code-style when conditions.
  • In-app updates and notifications.
  • hm . shell command to open a folder from the terminal.

macOS keys; on Windows and Linux cmd is ctrl, except where a column says otherwise. Every key can be changed in Settings → Keyboard Shortcuts or in YAML.

Action macOS Windows/Linux
Find in file cmd+f ctrl+f
Replace in file cmd+r ctrl+r
Search in project cmd+shift+f ctrl+shift+f
Next / previous match enter /shift+enter enter /shift+enter
Replace (in the replace field) / replace all enter /cmd+enter enter /ctrl+enter
Match case, whole word, regex cmd+alt+c ,cmd+alt+w ,cmd+alt+r alt+c ,alt+w ,alt+r
Find in selection, preserve case cmd+alt+l ,cmd+alt+p alt+l ,alt+p
Close find escape escape
Action macOS Windows/Linux
Move by word alt+left /alt+right ctrl+left /ctrl+right
Delete by word alt+backspace /alt+delete ctrl+backspace /ctrl+delete
Start / end of line (first press goes to the first non-blank) cmd+left /cmd+right home /end
Start / end of file cmd+up /cmd+down ctrl+home /ctrl+end
Extend the selection add shift to any of these add shift to any of these
Extend the selection to a click shift+click shift+click
Add a cursor alt+click alt+click
Column selection alt+shift+drag alt+shift+drag
Add cursor above / below cmd+alt+up /cmd+alt+down ctrl+alt+up /ctrl+alt+down
Add next occurrence cmd+d ctrl+d
Select all occurrences cmd+shift+l ctrl+shift+l
Back to one cursor escape escape
Action macOS Windows/Linux
Duplicate lines down / up shift+alt+down /shift+alt+up shift+alt+down /shift+alt+up
Move lines down / up alt+down /alt+up alt+down /alt+up
Delete lines cmd+shift+k ctrl+shift+k
Toggle line comment cmd+/ ctrl+/
Action macOS Windows/Linux
Fold / unfold at the cursor cmd+alt+[ /cmd+alt+] ctrl+alt+[ /ctrl+alt+]
Fold all / unfold all cmd+alt+0 /cmd+alt+shift+0 ctrl+alt+0 /ctrl+alt+shift+0
Fold or unfold a block click its chevron in the gutter click its chevron in the gutter
Action macOS Windows/Linux
Command palette cmd+shift+p ctrl+shift+p
Go to file cmd+p ctrl+p
Go to symbol in file cmd+shift+o ctrl+shift+o
Reopen closed tab cmd+shift+t ctrl+shift+t
New untitled file cmd+alt+n ctrl+alt+n
Next / previous change against git HEAD alt+f5 /shift+alt+f5 alt+f5 /shift+alt+f5
Next / previous hm window cmd+alt+` /cmd+alt+shift+` —
Toggle sidebar cmd+b ctrl+b
Toggle agent cmd+l ctrl+l
Ask the agent about the selection cmd+alt+l ctrl+alt+l
While the agent works: steer / send after the turn enter /alt+enter enter /alt+enter
Agent: pick a model / next favourite model ctrl+l /ctrl+p alt+m /alt+n
Terminal ctrl+` ctrl+`
Settings cmd+, ctrl+,
Zoom in / out / reset cmd+= /cmd+- /cmd+0 ctrl+= /ctrl+- /ctrl+0
  • macOS:brew install --cask usehm/tap/hm , or the DMG for your Mac (Apple silicon:arm64 , Intel:amd64 ) fromReleases . The cask also installs thehm command.
  • Linux: thetar.xz for your architecture fromReleases .
  • Windows: thezip fromReleases .

Hm updates itself from inside the app; Homebrew installs update through brew upgrade --cask hm. Maintainers: see RELEASING.md.

Hm needs Go (see go.mod for the version).

make run            # run from source in the current folder
make test           # run the tests
make install_deps   # install the yoga CLI used for packaging
make app            # build Hm.app and a DMG into dist/darwin
make install        # build Hm.app, copy it to /Applications and install `hm`

Open Settings (cmd+,) for a form, or Edit as YAML for the file behind it. View defaults shows the built-in config with comments for every key. For example:

editor:
  theme: tokyo-night
  font_size: 14
  tab_width: 4
  auto_indent: advanced
  zoom: 1

languages:
  yaml:
    editor: { tab_width: 2, insert_spaces: true }
  go:
    formatters:
      - { command: gofmt, args: ["-w", "{file}"], on: [save, manual] }

agent:
  default_provider: anthropic
  providers:
    openrouter: { type: openrouter, api_key: "${OPENROUTER_API_KEY}" } # a preset: base_url filled in
    ollama: { type: ollama, model: qwen3, context_window: 32768 }       # context_window: for models hm doesn't know
    gemini: { type: google, api_key: "keychain:gemini", model: gemini-2.5-pro }
    vertex: { type: google, project: "${GOOGLE_CLOUD_PROJECT}", location: us-central1, model: gemini-2.5-pro } # gcloud auth application-default login
    azure: { type: azure, base_url: "https://my-resource.openai.azure.com", api_key: "keychain:azure", api_version: "2024-10-21", model: my-gpt-5 } # model: the deployment
    work: { type: openai, base_url: "https://llm.example.com/v1", api_key: "keychain:work" }
  favorite_models: [anthropic/claude-opus-5-5, openrouter/openai/gpt-5] # ctrl+p (alt+n off macOS) steps through them
  retry: { max_attempts: 5 }                       # retries after a failed model call; 0 = off
  compaction:                                      # summarise older messages near the window's limit
    enabled: true                                  # by itself; /compact works either way
    threshold: 0.85                                # fraction of the window that starts it
    reserve_tokens: 16384                          # room kept for the answer
    keep_tokens: 20000                             # latest history kept as it is
    provider: ""                                   # agent.providers entry that summarises; "" = the session's
    model: ""                                      # e.g. a smaller, cheaper model; "" = the provider's
  branch_summary: { enabled: false, min_messages: 6 } # describe a branch you leave, for /tree (one call to the compaction model)
  share: { viewer_url: "" }                        # link /share copies, with {id}, {user}, {file}; "" = the gist's page
  subagents: { max_depth: 1, max_concurrent: 4 }   # max_depth: 0 turns the task tool off
  context:                                         # AGENTS.md and friends in the system prompt
    enabled: true
    files: [AGENTS.md, CLAUDE.md]                  # first one found per folder wins
    max_bytes: 65536                               # larger files are skipped with a warning
  prompts:                                         # /name prompt templates; a later folder wins
    paths: [~/.config/hm/prompts, .hm/prompts, .claude/commands, .pi/prompts]

keybindings:   # swap Enter and Alt+Enter while the agent works
  - { key: enter, command: agent.followUp, when: "agentFocus && agentRunning" }
  - { command: -agent.followUp }
  - { key: alt+enter, command: agent.steer, when: agentFocus }

artifacts:
  storage: none   # none | gcs | s3 | git (not wired up yet)

models.json (beside config.yaml in ~/.config/hm or .hm) is a list of models. Every field but id is optional; one you leave out comes from hm's own table or a shorter id that matches (claude-opus-5 covers claude-opus-5-20261101). provider limits an entry to one name under agent.providers. Prices are USD per million tokens and fill in the cost when the API does not report one. supports.images says whether the model takes pictures; hm's table marks the Claude, Gemini and GPT-4o/4.1/5, o3 and o4-mini models, and a model it knows nothing of is sent them.

[
  { "id": "qwen3", "provider": "ollama", "name": "Qwen 3", "context_window": 32768, "max_output": 8192,
    "supports": { "tools": true, "images": false, "thinking": true } },
  { "id": "claude-opus-5-5", "price": { "input": 4, "output": 20, "cache_read": 0.2, "cache_write": 5 },
    "efforts": ["low", "medium", "high", "xhigh", "max"] }
]
  • Vim insert mode inserts a plain newline and a literal tab, so it ignores auto_indent andinsert_spaces .

  • On macOS the window controls (traffic lights) keep their native position when the window is zoomed instead of centering in the taller title bar.

  • Reset in the per-language settings removes your overrides but not the built-in per-language defaults (such as two-space YAML); those can only be overridden.

  • Artifact storage in a GCS or S3 bucket or a git repository (the settings exist; the Artifacts tab is empty for now).

  • A diff option to ignore whitespace-only changes (ignore_trim_whitespace ).

  • Full-color file icons, once Yoga can draw multi-color SVG icons in the tree.

  • An Authenticode-signed Windows build.

Bug reports, ideas and pull requests are welcome; see CONTRIBUTING.md. Pull requests need a one-time Contributor License Agreement.

Copyright (C) 2026 Mohsen Mirzakhani.

Hm is free software: you can redistribute it and/or modify it under the terms of the GNU Affero General Public License v3.0. If you distribute a modified Hm, or let others use it over a network, you must make its source available under the same license.

For a commercial license without the AGPL's obligations, for example to embed pkg/hm/agent in a closed-source product, open an issue or contact the maintainer through GitHub.

The name "Hm" and the Hm logo are trademarks and are not covered by the license; see TRADEMARKS.md.

── more in #ai-agents 4 stories · sorted by recency
── more on @hm 3 stories trending now
sponsored brought to you by zahid.host 4,200+ EU-deployed projects
reading about agents? ship yours in a single git push.

Run your AI side-project on zahid.host

EU-based hosting, git-push deploys, automatic HTTPS, no cold starts. Free tier with a custom domain — perfect for shipping the agent you just read about.

$git push zahid main
→ Live at https://your-agent.zahid.host ✓
Get free account → Pricing
from €0/mo · no card required
LIVE [news/show-hn-open-source-…] indexed:0 read:20min 2026-11-25 · —