Skip to content

Open source · AGPL-3.0 · Written in Rust

Code with any model
from your terminal

nyq is a coding agent that reads your code, runs your tests and edits files. Use the ChatGPT or Grok plan you already pay for, an Anthropic or OpenAI key, or a local model.

$ curl -fsSL https://nyq.zalthar.com/install.sh | sh

macOS and Linux, x86_64 and arm64. Windows builds are on the releases page.

nyq reads the code, runs the tests, edits one line in src/parse.rs, reruns the tests, and explains the fix.

Works with the subscriptions and keys you already have

  • ChatGPT subscription
  • SuperGrok and X Premium
  • Anthropic API
  • xAI API
  • OpenCode Zen
  • OpenCode Go
  • OpenRouter
  • Ollama
  • Any OpenAI compatible API

The problem

Every model vendor ships its own agent, and each one wants your habits

One CLI for your ChatGPT plan, another for Grok, a third for your API key, and none of them talk to your local models. Each has its own config, its own key bindings and its own idea of what it may run on your machine.

nyq is one tool for all of them. Press Ctrl+Lto switch model or provider in the middle of a conversation. Your sessions, permissions, skills and MCP servers stay where they are.

Features

Built for long sessions in a real repo

  • Switch models without switching tools

    Ctrl+L lists every model from every provider you are signed in to. Pick one and the conversation carries on with it.

  • Let it run commands without worry

    Shell commands run in a sandbox that writes only inside your workspace, with the network off unless you allow it. Landlock on Linux, Seatbelt on macOS.

  • Steer it while it works

    The input never locks. Enter steers the current task, Alt+Enter queues a follow up, and Esc stops it.

  • Undo what it changed

    /undo reverts nyq's file edits one at a time. Every session is saved, and nyq -c picks up where you left off.

  • Fits the setup you have

    MCP servers, skills, hooks and subagents work out of the box. Zed can drive nyq over the Agent Client Protocol.

  • Script it in CI

    nyq -p prints one answer and exits. nyq ask --json returns the answer, every tool call and an exit code.

Bring your own model.
Keep your own terminal.

How it works

From install to first fix in three commands

  1. 1

    Install

    One command downloads a single binary for your platform and verifies its SHA256 checksum. No runtime to install.

    $ curl -fsSL nyq.zalthar.com/install.sh | sh
  2. 2

    Sign in

    Use the browser login for ChatGPT or Grok, paste an API key, or point nyq at Ollama.

    $ nyq login
  3. 3

    Ask

    Describe the change. nyq reads, edits and tests until it can show you the answer.

    $ nyq "fix the failing test"

FAQ

Questions people ask before installing

Is nyq free?

Yes. nyq is open source under the GNU AGPL v3. You pay your model provider through the subscription or API key you already have, and local models through Ollama cost nothing.

Which models and providers does it support?

ChatGPT subscriptions (the Codex backend), Grok subscriptions (SuperGrok and X Premium), the Anthropic API and Anthropic compatible endpoints such as DeepSeek or Kimi, the xAI API, OpenCode Zen and OpenCode Go, and any OpenAI compatible API, including OpenAI, OpenRouter, vLLM, llama.cpp and Ollama.

Can I use my Claude Pro or Max subscription?

No. Anthropic's terms do not allow third party tools to use consumer subscriptions, so nyq uses Anthropic API keys and compatible endpoints only.

Is it safe to let it run shell commands?

Commands run in a sandbox by default: they can read everything but write only inside your workspace and temp folders, with the network off unless you pass --allow-network. Linux uses Landlock and macOS uses sandbox-exec. You also choose how tool calls are approved: ask, auto or yolo. Windows has no sandbox, and nyq warns you about that.

Does nyq collect telemetry?

No. nyq talks to the model provider you choose, fetches the public models.dev catalog at most once a day for model names and prices, and checks GitHub for new releases. You can turn the upgrade check off with auto_upgrade = false or NYQ_AUTO_UPGRADE=0.

Where are my keys stored?

In ~/.nyq on your machine, in files only your user can read (mode 0600). nyq logout removes every sign in it stored.

Does it work inside my editor?

Yes, in any editor that speaks the Agent Client Protocol, such as Zed. Run nyq acp as the agent server and you get streamed answers, diffs and permission prompts inside the editor.

Can I use it in scripts and CI?

Yes. nyq -p "prompt" prints the answer to stdout and exits. nyq ask --json returns one JSON object with the answer, every tool call and an exit code.

Can I run it fully offline with a local model?

Yes. Point NYQ_BASE_URL at Ollama or llama.cpp and pick a model. Give the model a context of at least 32k tokens, since Ollama's 4k default is too small for an agent.

Which platforms does it run on?

macOS and Linux on x86_64 and arm64, plus Windows. The Linux build is static, so it needs no particular glibc. On Windows, shell commands use Git Bash when it is installed.

Try it on your next bug

Free and open source. No account with us and no telemetry, and nyq logout removes every key it stored.

$ curl -fsSL https://nyq.zalthar.com/install.sh | sh

macOS and Linux, x86_64 and arm64. Windows builds are on the releases page.