PluginWorld
Za

zames_pro

Claude Code

Terminal coding agent that drives a real browser to chat with DeepSeek, Qwen and other web LLMs — no API key required. Reads and edits files, runs commands, commits to git, like Claude Code / Codex CLI.

@Viqto0r · v2.82.49 · MIT · updated yesterday

SECURITY

B

SCORE

65

INSTALLS

▲ 30.7K

PLUG IN

/plugin marketplace add Viqto0r/zames_pro
/plugin install zames_pro

README

zames logo

zames_pro

A terminal coding agent that drives real web chat LLMs (DeepSeek, Qwen, GLM) through a browser — no API key required.

npm version npm downloads tests License: MIT Node.js TypeScript PRs welcome

English | Русский

A terminal coding agent that works on top of real web chat LLMs (chat.deepseek.com, chat.qwen.ai, chat.z.ai, …) through Playwright. In spirit it is similar to Claude Code / Codex CLI: it starts in the current directory, reads and edits files, runs commands, and commits to git.

No API key required — it drives a DeepSeek, Qwen or GLM web chat like a regular user through a real (headless) browser.

zames session in the terminal

Quick start

npm install -g zames_pro   # Chromium for Playwright is downloaded automatically
cd your-project            # any folder the agent should work in
zames                      # sign in once, then describe your task

There is no API key and no per-token bill: zames signs in to your own chat.deepseek.com, chat.qwen.ai or chat.z.ai account in a real (headless) Chromium and drives the web chat like a regular user. The first launch asks for your login once (the session is stored in ~/.zames/profile for DeepSeek, ~/.zames/qwen-profile for Qwen or ~/.zames/glm-profile for GLM); after that just run zames and type a task in plain language:

❯ refactor the config loader and add a test for the new default

While the agent works you can keep typing — a message sent mid-task is queued and runs right after it, in the same chat. Esc aborts the current generation, /help lists commands, /exit quits.

How it works

zames does not call the model API. It launches a headless Chromium with a persistent profile, signs in to a chat web app like a human, types the task into the chat box, and reads the answer back.

Three chat backends are available, switched with /provider <deepseek|qwen|glm>: DeepSeek (chat.deepseek.com, the default), Qwen (chat.qwen.ai) and GLM (chat.z.ai). The switch is live — zames closes the current backend and opens the other one in place, no restart needed. Each keeps its own persistent profile (~/.zames/profile, ~/.zames/qwen-profile and ~/.zames/glm-profile), so switching never signs the other one out.

how zames works

In text: you type a task → zames sends the system prompt plus the task into the active chat web app (DeepSeek, Qwen or GLM) → the model answers → zames parses the tool call, runs the tool locally, feeds the result back, and prints the final answer for you.

Key pieces:

  • The answer is read from the raw network stream (SSE), not the rendered DOM, so tool-call JSON with template strings and escapes survives intact.
  • A persistent per-provider profile (~/.zames/profile for DeepSeek, ~/.zames/qwen-profile for Qwen) keeps you signed in; the headless User-Agent is patched so the site's CDN does not 403 the login.
  • A send throttle (15 s on DeepSeek, ~1 s on Qwen, which tolerates rapid sends; GLM uses an adaptive pause that starts at 0) keeps the web chat's rate limit happy during long tool-heavy runs.
  • The agent is sandboxed to the directory it was started in — no tool can read or write above it.

Table of contents

Features

  • Tools like Claude Code / Codex — Read, Write, Edit, Bash, Glob, Grep, plus MultiEdit, ApplyPatch, LS, TodoWrite, git and web tools. Every edit is backed by /undo.
  • Runs while you keep typing — queue messages during a task; they run right after it, in the same chat (like typing during generation on the web).
  • Plan mode — /plan (or --plan) drops all mutating tools, so the agent can investigate the code without touching the tree.
  • Project context — reads AGENTS.md, MEMORY.md, skills (SKILL.md) and custom commands from the repo and ~/.zames, the same idea as Codex / Claude Code.
  • Subagents — the Task tool delegates a self-contained sub-task to an agent in its own separate chat (isolated context), which returns only a report, so heavy research does not flood the main context. On by default; tune with browser.subagents / browser.maxSubagents.
  • MCP support — plug in external tool servers (e.g. @playwright/mcp).
  • Scheduling — /loop, /cron and /jobs repeat tasks on a timer.
  • Bilingual UI — Russian / English (/config lang).

Why zames?

  • Built with itself — zames_pro is developed by zames_pro. No other coding agent is used on this repository: the agent in this very terminal reads the sources, runs the tests, fixes the bugs and commits the result. That is the daily proof that it works and is actually used.
  • No API key, no per-token bill — it uses your own DeepSeek, Qwen or GLM chat account, not the paid API. Good for long, tool-heavy tasks.
  • Same workflow as Claude Code / Codex — tools, AGENTS.md, skills, MCP and slash commands, so it feels familiar from day one.
  • Runs unattended — headless by default, resumable sessions, and /loop plus /cron for scheduled work.
  • Local-first — the browser profile, credentials and logs never leave your machine, and the agent is sandboxed to the project directory.

Requirements

  • Node.js >= 20
  • An account on the chat you want to use — DeepSeek (chat.deepseek.com, the default), Qwen (chat.qwen.ai) or GLM (chat.z.ai). Qwen also works in guest mode for a few messages. On first launch zames asks for your login in the terminal (and stores it in ~/.zames/config.json after a successful sign-in, so a later logout is handled automatically without asking you again). You can also sign in manually in the browser window when the browser is headed.

Signing in

The browser runs headless by default. When the active backend requires a sign-in, zames:

  1. reuses the session stored in the persistent profile (~/.zames/profile, ~/.zames/qwen-profile or ~/.zames/glm-profile) if it is still valid;
  2. otherwise signs in automatically with the saved credentials (browser.auth.username / browser.auth.password for DeepSeek, qwen.auth.* / glm.auth.* for the others);
  3. otherwise opens a visible browser window so YOU sign in there — a captcha (DeepSeek and z.ai both use one) cannot be typed into a terminal. zames notices the sign-in and returns to headless; the credentials you typed are saved for the next silent auto-login;
  4. only when no window can be shown (no display, a non-interactive run) does it fall back to the terminal form.

To sign in by hand (for example, if the site shows a captcha), run with a visible window:

zames --headed

The --headless flag (the default) and headless: true in the config keep the browser without a window; --headed / headless: false show it.

Headless works out of the box: a headless Chrome normally advertises a HeadlessChrome/... User-Agent that the site's CDN blocks with a 403, so zames strips that marker before loading the page (keeping the real engine version). You do not need --headed just to log in.

Credentials and toggles can also be edited from /config (browser.auth.username, browser.auth.password, browser.auth.saveSession).

Switching providers (DeepSeek / Qwen / GLM)

zames can drive either DeepSeek (chat.deepseek.com, the default) or Qwen (chat.qwen.ai):

/provider qwen      # switch to Qwen (persisted) — applied live, no restart
/provider deepseek  # switch back
/provider status    # show the active provider / model / login state
/provider login     # (re)run the sign-in check
/model              # list Qwen models
/model qwen3.7-plus # pick one

Notes:

  • The switch is live: zames closes the current backend and opens the other one in place, so no restart is needed. The two backends use separate persistent profiles (~/.zames/profile for DeepSeek, ~/.zames/qwen-profile for Qwen), so switching never signs the other one out.
  • A chat id belongs to ONE backend, so the new provider opens a fresh chat. If the previous chat had messages they are summarized and posted as a handoff with the next task; an empty chat is switched silently.
  • Qwen works in guest mode without an account, but a guest is limited to a handful of messages per day; for long agent runs sign in (email / Google / GitHub — no phone required). zames auto-logins from the saved credentials or asks in the terminal, exactly like DeepSeek. /model changes the Qwen model at runtime.
  • GLM (chat.z.ai) is the third backend. Its first message from a fresh profile is gated by a slider captcha, so sign in once in the visible window; after that the stored session is reused. /model lists and picks GLM models too.
  • GLM runs with a VISIBLE browser window. Measured: the SAME signed-in session is fine in a headed window but every send from HEADLESS is stopped by the site's slider captcha (a different puzzle each time, so it cannot be solved programmatically). zames therefore launches GLM headed by default and prints a note about it; --headless still forces headless (sends will hit the captcha). --headed is accepted everywhere.
  • Send telemetry: every send is recorded in ~/.zames/logs/sends-<provider>.jsonl (timing, mode flags, the outcome and the server error — never the prompt or the answer). Turn it off with /config set browser.sendTelemetry false. /limits shows the recent sends and the current pause. GLM additionally uses an adaptive pause: it starts at 0 and backs off from a REAL rate limit.
  • Warning: automating a web chat may violate the service's terms of use and can get an account blocked. GLM (z.ai) has an official API — prefer it for heavy automation.
  • File attachments on Qwen go through the mode menu's Upload attachment item; DeepSeek uses its own paperclip.
  • /doctor shows the active provider and the UI health of that provider's page.

Installation

npm install -g zames_pro

Chromium for Playwright is downloaded automatically on install. On Linux/WSL the required system libraries are installed too when passwordless sudo is available; otherwise run once by hand:

npx playwright install chromium
sudo npx playwright install-deps chromium

Usage

Go to your project folder and run:

zames

The agent works inside the directory it was started in and cannot leave it (sandbox).

While the agent is working you can keep typing: press Enter to queue a message (it is sent right after the current task, in the same chat), or Esc / Ctrl+C to abort the current generation. This mirrors typing during generation on the web chat.

Input line

The prompt is a small line editor with persistent history:

  • ↑ / ↓ — walk the message history (saved in ~/.zames/history.json, so it survives a restart); inside a multiline message the arrows move between lines.
  • Ctrl+R — incremental reverse search over the history (bash-style): type to filter, Ctrl+R for older matches, Enter to accept, Esc to cancel.
  • Ctrl+_ — undo the last edit in the input line (a fat-fingered Ctrl+U / Ctrl+K is recoverable).
  • Ctrl+U — clear the line, Ctrl+K — delete to end of line, Ctrl+W — delete the word before the cursor, Ctrl+←/Ctrl+→ — move by words.
  • \ + Enter, Ctrl+J, Ctrl+Enter or Shift+Enter — insert a newline.
  • / + Tab — slash-command hints and completion.
  • !command — run a shell command directly, bypassing the model (like Claude Code's bash mode). The same sandbox guard as the Bash tool applies, so a direct command cannot leave the project either.

Full-screen mode adds dialog navigation, so a long answer can be read and selected without leaving the terminal:

  • ui.mouseScroll=false (default) — the terminal owns the mouse: normal text selection works and the wheel is inert (it never scrolls the input history — history is arrow keys only).
  • ui.mouseScroll=true — the app consumes the wheel and scrolls the dialog; selecting text then needs Shift+click (the TUI convention).
  • PgUp / PgDn — move up/down the dialog half a screen.
  • Home / End — jump to the very top / bottom of the dialog (only while the input line is empty; with text typed they move the caret as usual).
  • To copy a LARGE block, use /export (writes the whole session as Markdown) or the transcript file (/transcript shows the path) — the terminal's own drag-select cannot reach past one screen.

Set NO_COLOR=1 to disable colors (a calm default palette is used otherwise).

Images and files

You can paste an image or a file into the input line (Ctrl+Shift+V / Shift+Insert or the terminal's own paste). zames saves it under <project>/tmp and shows a marker in the line - [image#1] for images, [file#1] for other files - then uploads the real file to the chat together with your message. These are the same formats the DeepSeek / Qwen / GLM web chat accepts (PNG, JPEG, GIF, WEBP, BMP, SVG and the usual document types).

Pasting an image works when the terminal sends it as a data: URL or as a base64 blob with a recognizable image signature. You can also paste a path to a local file (drag a file into the terminal or copy its path); if the file exists it is attached, otherwise the text is inserted as usual.

Press Ctrl+V (or use an empty paste) and zames reads the image straight from the clipboard: Linux via wl-paste (Wayland) or xclip/xsel (X11), macOS via pngpaste, Windows via PowerShell. The needed Linux tools are installed automatically on npm install (best-effort, through the detected package manager). If no image is found, zames says so and reports which tool it tried, instead of staying silent.

Options

zames --task <task text>
zames --chat <id>
zames --new-chat
zames --resend-prompt
zames --dir <path>
zames --headless
zames --headed
zames --plan
zames --output-format jsonl
zames --debug
zames --version
zames --help

Machine-readable output (scripts / CI)

For one-shot runs (--task) the agent can emit its event stream as JSON lines on stdout, keeping all human text on stderr:

zames --task "summarize the diff" --output-format jsonl

Each line is one event (tool_call, tool_result, assistant_final, ...), so it pipes straight into jq:

zames --task "..." --output-format jsonl \
  | jq -r 'select(.type=="assistant_final") | .message'

Tools

The agent has the same style of tools as Claude Code / Codex CLI:

  • File tools — Read, Write, Edit, Bash, Glob, Grep. Read returns raw content by default; pass numbered=true to get cat -n-style line numbers (for reference only — do not paste them into Edit).
  • Extra tools — LS (list a directory), MultiEdit (several edits to one file applied atomically), TodoWrite (session task checklist), ApplyPatch (multi-file patch in Codex's V4A format: *** Begin Patch … *** End Patch).
  • Git — GitStatus, GitDiff, GitLog, GitShow, GitBranchList, GitAdd, GitCommit, GitPush.
  • Web — WebFetch, WebSearch.
  • Service — respond (final answer to the operator, ends the task).

All file tools stay inside the working directory (sandbox). Write/Edit and MultiEdit/ApplyPatch make a backup (undo) before touching a file.

Slash commands

Type / in the prompt for hints (Tab completes). Besides the session and config commands (/new, /chats, /resume, /cd, /status, /config, /undo, /transcript, /mcp, /skills, /memory, /init, /reload, /debug-dom, /help, /exit) there are a few that mirror Claude Code / Codex CLI:

  • /diff [--staged] — show the working-tree git diff (--staged for the index).
  • /diffstat — a one-line change summary (git diff --stat).
  • /context — show what is loaded into the prompt (AGENTS.md, MEMORY.md, skills, custom commands) and the system-prompt size.
  • /retry — resend the last task into the same chat (handy after a truncated or empty answer).
  • /rename — set the current session title (shown in /sessions).</li> <li>/copy — copy the last assistant answer to the OS clipboard.</li> <li>/cost (alias /usage) — session stats: tasks, tool calls, duration, and the context size in tokens (DeepSeek's <code>accumulated_token_usage</code>, Qwen's <code>input_tokens</code>, GLM's <code>prompt_tokens</code>).</li> <li>/export [file] — write the session transcript to a Markdown file (zames-export-<stamp>.md by default).</li> <li>/doctor — diagnose node, git, config, browser, clipboard, MCP and the active chat provider (it also reports that provider's UI health).</li> <li>/provider <deepseek|qwen|glm> — switch the chat backend (applied live, no restart); /provider status shows the active provider/model/login; /provider login re-runs the sign-in check. /model [id] lists or picks a Qwen/GLM model at runtime.</li> <li>/add-dir <path> — validate an extra directory (the sandbox is fixed at startup; relaunch with --dir to write there).</li> <li>/resume-id <id> (or picking a chat in the /chats list) — open a chat and PRINT its dialogue into the terminal, so the restored context is visible. Only the last 20 messages are shown (<code>RESTORED_HISTORY_LIMIT</code>). /last reopens the last chat of the current directory with no lookup step; /sessions shows the saved sessions with their relative age.</li> <li>/help <command> — the full description of a single command (e.g. <code>/help diff</code>) instead of the whole list.</li> <li>/review [focus] [--staged] — ask the agent to review uncommitted changes and report findings (no code changes).</li> <li>/plan [on|off] — plan (read-only) mode. While it is on, the mutating tools (Write/Edit/MultiEdit/ApplyPatch/Bash, GitAdd/GitCommit/GitPush) are removed from the tool set, so the agent can investigate without touching the tree. Start in it with <code>--plan</code>.</li> <li>/compact — ask the active backend to compress the current chat into a handover summary, then open a NEW chat, resend the system prompt and post the summary as the carried-over context. Use it when the context gets long.</li> <li>/goal <condition> — set a <strong>completion condition</strong> (Claude Code parity). The agent starts working toward it at once and keeps starting new turns until a separate evaluator model judges the condition met. The goal clears itself automatically when it is met (or judged impossible), or with <code>/goal clear</code>. The condition is stored in <code><project>/.zames-goal</code> (git-ignored) and restored on the next launch. <code>/goal</code> with no argument shows the current state.</li> <li>/loop <interval> <task> — repeat a task periodically (e.g. <code>/loop 10m run the tests</code>). /cron "<min> <hour> <dom> <month> <dow>" <task> — run on a schedule. /jobs [rm <id>|clear] lists and stops them. A fired job is put into the same message queue you type into, so it runs when the agent is free (never mid- generation) and still respects the send throttle. The FIRST run of a <code>/loop</code> is due at once (and runs as soon as the agent is idle); a <code>/cron</code> job waits for its schedule.</li> <li>/thinking [on|off] and /web [on|off] — toggle the reasoning / web-search behaviour. On <strong>DeepSeek</strong> these are the "Deep thinking" / "Smart search" toggles; on <strong>Qwen</strong> they drive its thinking MODE (Thinking / Fast) and the "Web search" item in the "+" menu. These (and /queue, /jobs, /goal, <code>/config <sub></code>) can be used WHILE the agent is working — they do not touch the in-flight generation.</li> <li>/queue [clear] — list or clear the messages waiting to be sent after the current task.</li> </ul> <p>The token context is also shown live: the status line above the input has the spinner/text on the left and the context on the right (e.g. <code>125k · 13%</code>, percent of a 1M context). It is COLORED by fill level: green below 50%, yellow 50-80%, red above 80%. It comes from the provider's own token counter (DeepSeek's <code>accumulated_token_usage</code>, Qwen's <code>input_tokens</code>, GLM's <code>prompt_tokens</code>) and is hidden until the first answer delivers it.</p> <h2>Project context, skills and memory</h2> <p>Like Codex / Claude Code, zames reads project instructions and reusable workflows from your repository and from <code>~/.zames</code>.</p> <ul> <li><strong>AGENTS.md</strong> — project instructions. Put one in the repo root (or in any parent folder of the working directory). Global instructions live in <code>~/.zames/AGENTS.md</code> (and <code>~/.claude/CLAUDE.md</code>). Run <code>/init</code> and the agent will explore the project and write an AGENTS.md based on the real build/test commands and conventions (use <code>/init --force</code> to overwrite an existing file).</li> <li><strong>MEMORY.md</strong> — durable notes that persist between sessions. The agent appends useful facts here; you can edit it by hand, or add one from the prompt with <code>/remember <text></code>.</li> <li><strong>Skills</strong> — a folder with a <code>SKILL.md</code> file (YAML frontmatter: <code>name</code>, <code>description</code>, optional <code>allowed-tools</code>, <code>user-invokable</code>) plus any helper files. Discovered under <code>.zames/skills/</code>, <code>.claude/skills/</code>, <code>.agents/skills/</code>, <code>skills/</code>, and <code>~/.zames/skills/</code>. The agent reads the body only when a task matches the description. List them with <code>/skills</code>; invoke one with <code>/<skill-name></code>.</li> <li><strong>Custom commands</strong> — <code>.md</code> files under <code>.zames/commands/</code> (or <code>.claude/commands/</code>). They support <code>$ARGUMENTS</code> / <code>{{args}}</code> placeholders and are invoked with <code>/<command-name></code>.</li> </ul> <p>Skills and custom commands show up in the «/» completion list and in <code>/help</code>.</p> <pre><code>/skills list discovered skills /memory show AGENTS.md / MEMORY.md in effect /remember <text> append a durable note to MEMORY.md /init [--force] analyze the project and create AGENTS.md </code></pre> <h2>MCP (external tools)</h2> <p>zames can use tools from <a href="https://modelcontextprotocol.io">MCP</a> servers. The flagship example is @playwright/mcp: it gives the agent a real browser (navigate, click, snapshot, type, ...) on top of the one zames already uses for the DeepSeek, Qwen or GLM chat.</p> <p>Drop a config file (same shape as Claude Code / Cursor):</p> <ul> <li><code>~/.zames/mcp.json</code> - global</li> <li><code><project>/.zames/mcp.json</code> - project-scoped (later files win)</li> <li><code><project>/.mcp.json</code> - the common MCP name</li> </ul> <pre><code class="language-json">{ "mcpServers": { "playwright": { "command": "npx", "args": ["-y", "@playwright/mcp@latest", "--headless", "--isolated"] } } } </code></pre> <p>IMPORTANT: keep the MCP browser isolated. @playwright/mcp defaults to the SAME profile directory as zames (~/.zames/profile). If it is launched without --isolated (or without its own --user-data-dir), the MCP browser and the agent browser fight over one profile and the DeepSeek chat shows "Something went wrong when opening your profile". Always pass --isolated as in the example above. Servers can also be remote ("url": "https://...", "transport": "sse"). Their tools show up in the agent as <code>server__tool</code> (e.g. <code>playwright__browser_navigate</code>) and are listed with <code>/mcp</code> and in <code>/status</code>. A server that fails to connect is skipped with a warning and never breaks the agent.</p> <h3>Recommended servers (verified)</h3> <p>A few small, high-value servers tested end to end with zames (on the DeepSeek and Qwen backends; the MCP layer is provider-agnostic, so they work with GLM too):</p> <ul> <li><p><strong>Context7</strong> (<code>@upstash/context7-mcp</code>) — fetches CURRENT, version-specific documentation for a library before the agent writes code, instead of relying on a stale training snapshot. Tools: <code>resolve_library_id</code> then <code>query_docs</code>. Verified live on DeepSeek AND Qwen: the agent called both tools and got the current Zod API. This is the one to add first.</p> <pre><code class="language-json">{ "context7": { "command": "npx", "args": ["-y", "@upstash/context7-mcp@latest"] } } </code></pre> </li> <li><p><strong>Sequential Thinking</strong> (<code>@modelcontextprotocol/server-sequential-thinking</code>) — one <code>sequentialthinking</code> tool that gives the model an explicit, revisable plan before it acts; useful for long multi-step tasks.</p> </li> <li><p><strong>Memory</strong> (<code>@modelcontextprotocol/server-memory</code>) — a local knowledge graph (9 tools) for durable facts across chats. NOTE: zames already has <code>MEMORY.md</code></p> </li> </ul> <ul> <li><code>AGENTS.md</code>; add this only if you want a queryable graph.</li> </ul> <p>Keep the stack SMALL: every server loads its tool definitions into the model's context. Add one when you feel its absence, not before.</p> <h2>Configuration</h2> <p>Global config: <code>~/.zames/config.json</code> Local (per project): <code>.zamesrc.json</code></p> <p>You can view and change settings without leaving the agent — use the <code>/config</code> command. Run it without arguments to open an interactive menu (↑/↓ to move, Enter to change, <code>d</code> to reset, <code>q</code> to quit). Booleans and enums toggle in place; numbers and strings open an input prompt.</p> <pre><code>/config interactive settings menu /config list print all editable settings /config get <path> show a setting /config set <path> <value> change a setting /config reset <path> reset a setting to its default /config path show config file paths /config lang <ru|en> switch interface and agent language </code></pre> <p>Examples:</p> <pre><code>/config set maxIterations 20 /config set browser.deepThinking true # DeepSeek Deep thinking (slow; reasoning is hidden) /config set browser.webSearch false # DeepSeek Smart web search /config lang en </code></pre> <p>Changes are written to the project <code>.zamesrc.json</code> and applied right away (where possible without a restart).</p> <h3>Language</h3> <p><code>/config lang ru</code> or <code>/config lang en</code> switches both the interface language (help, messages, spinner) and the language the agent answers you in. The locale lives in <code>ui.locale</code> in the config file.</p> <p>Agent data is stored in <code>~/.zames</code>: browser profile, logs, undo history, sessions.</p> <h2>FAQ</h2> <p><strong>Is this an official DeepSeek, Qwen or GLM product?</strong> No. zames drives the public <code>chat.deepseek.com</code> / <code>chat.qwen.ai</code> / <code>chat.z.ai</code> web UIs through a real browser, like a regular user. It is not affiliated with DeepSeek, Alibaba or Zhipu AI.</p> <p><strong>Do I need an API key?</strong> No. You sign in with your own account on the chat you use — DeepSeek (stored in <code>~/.zames/profile</code>), Qwen (stored in <code>~/.zames/qwen-profile</code>) or GLM (stored in <code>~/.zames/glm-profile</code>) — and the session is reused. Qwen also works in guest mode for a few messages a day.</p> <p><strong>Which model does it use?</strong> Whichever the active web chat uses. On DeepSeek that is DeepSeek-V3 (or the reasoning model with "Deep thinking" on). On Qwen you can pick a model with <code>/model</code> (e.g. <code>qwen3.7-plus</code>). zames never calls the API directly.</p> <p><strong>Does it work headless / on a server?</strong> Yes — headless is the default, and <code>--output-format jsonl</code> makes it scriptable. <code>--headed</code> is only needed for a manual sign-in or selector debugging.</p> <p><strong>Is automating the web UI allowed?</strong> That depends on the site's terms; automating a website may violate them. Use at your own risk and keep the send throttle (15 s on DeepSeek by default) so you do not hammer the rate limit.</p> <p><strong>How is it different from Claude Code / Codex?</strong> Same shape (tools, <code>AGENTS.md</code>, skills, MCP, slash commands) but it runs on your DeepSeek, Qwen or GLM account instead of an API, as a browser automation rather than a first-party API client.</p> <h2>Links</h2> <ul> <li><strong>npm:</strong> <a href="https://www.npmjs.com/package/zames_pro">https://www.npmjs.com/package/zames_pro</a></li> <li><strong>GitHub:</strong> <a href="https://github.com/Viqto0r/zames_pro">https://github.com/Viqto0r/zames_pro</a></li> <li><strong>Changelog:</strong> <a href="CHANGELOG.md"><code>CHANGELOG.md</code></a></li> <li><strong>Contributing:</strong> <a href="CONTRIBUTING.md"><code>CONTRIBUTING.md</code></a></li> <li><strong>Security policy:</strong> <a href="SECURITY.md"><code>SECURITY.md</code></a></li> <li><strong>Code of conduct:</strong> <a href="CODE_OF_CONDUCT.md"><code>CODE_OF_CONDUCT.md</code></a></li> </ul> <h2>License</h2> <p>MIT</p> <p><a id="readme-ru" name="readme-ru"></a></p> <details> <summary>🇷🇺 Читать по-русски (Russian)</summary><p>Терминальный coding-агент, работающий поверх веб-чатов LLM (<a href="https://chat.deepseek.com/">chat.deepseek.com</a>, <a href="https://chat.qwen.ai/">chat.qwen.ai</a>, <a href="https://chat.z.ai/">chat.z.ai</a>, …) через Playwright. По духу он похож на Claude Code / Codex CLI: запускается в текущей директории, читает и правит файлы, выполняет команды и коммитит в git.</p> <blockquote> <p>API-ключ не нужен — агент управляет веб-чатом DeepSeek, Qwen или GLM как обычный пользователь через настоящий (headless) браузер.</p> </blockquote> <p align="center"> <img src="https://raw.githubusercontent.com/Viqto0r/zames_pro/master/docs/demo.png" alt="сессия zames в терминале" width="860"> </p><h2>Быстрый старт</h2> <pre><code class="language-bash">npm install -g zames_pro # Chromium для Playwright скачается автоматически cd your-project # любая папка, в которой должен работать агент zames # один раз войти, дальше просто описывайте задачу </code></pre> <p>Здесь <strong>нет API-ключа и нет оплаты за токены</strong>: zames входит в <strong>ваш собственный аккаунт <a href="https://chat.deepseek.com/">chat.deepseek.com</a>, <a href="https://chat.qwen.ai/">chat.qwen.ai</a> или <a href="https://chat.z.ai/">chat.z.ai</a></strong> в настоящем (headless) Chromium и управляет веб-чатом как обычный пользователь. При первом запуске он один раз спросит логин (сессия сохраняется в <code>~/.zames/profile</code> для DeepSeek, <code>~/.zames/qwen-profile</code> для Qwen или <code>~/.zames/glm-profile</code> для GLM); после этого достаточно запустить <code>zames</code> и написать задачу обычным языком:</p> <pre><code class="language-text">❯ отрефактори загрузчик конфига и добавь тест на новый дефолт </code></pre> <p>Пока агент работает, можно продолжать печатать — сообщение, отправленное посреди задачи, встанет в очередь и уйдёт сразу после неё, в тот же чат. <code>Esc</code> прерывает текущую генерацию, <code>/help</code> показывает команды, <code>/exit</code> — выход.</p> <h2>Как это работает</h2> <p>zames не вызывает API модели. Он запускает headless Chromium с постоянным профилем, входит в веб-чат как человек, печатает задачу в поле чата и читает ответ обратно.</p> <p>Доступны три бэкенда, переключаются командой <code>/provider <deepseek|qwen|glm></code>: <strong>DeepSeek</strong> (<code>chat.deepseek.com</code>, по умолчанию), <strong>Qwen</strong> (<code>chat.qwen.ai</code>) и <strong>GLM</strong> (<code>chat.z.ai</code>). Переключение <strong>живое</strong> — zames закрывает текущий бэкенд и открывает другой на месте, без перезапуска. У каждого свой постоянный профиль (<code>~/.zames/profile</code>, <code>~/.zames/qwen-profile</code>, <code>~/.zames/glm-profile</code>), поэтому переключение не разлогинивает другой.</p> <p align="center"> <img src="https://raw.githubusercontent.com/Viqto0r/zames_pro/master/docs/how-it-works.png" alt="как работает zames" width="860"> </p><p>Словами: вы вводите задачу → zames отправляет системный промпт и задачу в активный веб-чат (DeepSeek, Qwen или GLM) → модель отвечает → zames разбирает вызов инструмента, выполняет его локально, возвращает результат обратно и печатает финальный ответ.</p> <p>Ключевые детали:</p> <ul> <li><strong>Ответ читается из сырого сетевого потока</strong> (SSE), а не из отрендеренного DOM, поэтому JSON вызова инструмента с шаблонными строками и экранированием остаётся целым.</li> <li><strong>Постоянный профиль на каждого провайдера</strong> (<code>~/.zames/profile</code> у DeepSeek, <code>~/.zames/qwen-profile</code> у Qwen, <code>~/.zames/glm-profile</code> у GLM) держит вас залогиненным; User-Agent headless-браузера подменяется, чтобы CDN сайта не отдавал 403 на вход.</li> <li><strong>Троттлинг отправки</strong> (15 с у DeepSeek, ~1 с у Qwen, который спокойно переносит частые отправки; у GLM — адаптивная пауза с нуля) щадит рейт-лимит веб-чата во время долгих прогонов с инструментами.</li> <li><strong>Агент запесочен</strong> в директорию запуска — ни один инструмент не может читать или писать выше неё.</li> </ul> <h2>Содержание</h2> <ul> <li><a href="#%D0%B1%D1%8B%D1%81%D1%82%D1%80%D1%8B%D0%B9-%D1%81%D1%82%D0%B0%D1%80%D1%82">Быстрый старт</a> · <a href="#%D0%B2%D0%BE%D0%B7%D0%BC%D0%BE%D0%B6%D0%BD%D0%BE%D1%81%D1%82%D0%B8">Возможности</a> · <a href="#%D0%BF%D0%BE%D1%87%D0%B5%D0%BC%D1%83-zames">Почему zames?</a> · <a href="#%D1%82%D1%80%D0%B5%D0%B1%D0%BE%D0%B2%D0%B0%D0%BD%D0%B8%D1%8F">Требования</a></li> <li><a href="#%D0%BA%D0%B0%D0%BA-%D1%8D%D1%82%D0%BE-%D1%80%D0%B0%D0%B1%D0%BE%D1%82%D0%B0%D0%B5%D1%82">Как это работает</a> · <a href="#%D1%83%D1%81%D1%82%D0%B0%D0%BD%D0%BE%D0%B2%D0%BA%D0%B0">Установка</a> · <a href="#%D0%B2%D1%85%D0%BE%D0%B4-%D0%B2-%D0%B0%D0%BA%D0%BA%D0%B0%D1%83%D0%BD%D1%82">Вход в аккаунт</a> · <a href="#%D0%B8%D1%81%D0%BF%D0%BE%D0%BB%D1%8C%D0%B7%D0%BE%D0%B2%D0%B0%D0%BD%D0%B8%D0%B5">Использование</a></li> <li><a href="#%D0%BF%D0%B5%D1%80%D0%B5%D0%BA%D0%BB%D1%8E%D1%87%D0%B5%D0%BD%D0%B8%D0%B5-%D0%BF%D1%80%D0%BE%D0%B2%D0%B0%D0%B9%D0%B4%D0%B5%D1%80%D0%B0-deepseek--qwen--glm">Переключение провайдера (DeepSeek / Qwen / GLM)</a></li> <li><a href="#%D0%B8%D0%BD%D1%81%D1%82%D1%80%D1%83%D0%BC%D0%B5%D0%BD%D1%82%D1%8B">Инструменты</a> · <a href="#%D1%81%D0%BB%D1%8D%D1%88-%D0%BA%D0%BE%D0%BC%D0%B0%D0%BD%D0%B4%D1%8B">Слэш-команды</a></li> <li><a href="#%D0%BA%D0%BE%D0%BD%D1%82%D0%B5%D0%BA%D1%81%D1%82-%D0%BF%D1%80%D0%BE%D0%B5%D0%BA%D1%82%D0%B0-%D0%BD%D0%B0%D0%B2%D1%8B%D0%BA%D0%B8-%D0%B8-%D0%BF%D0%B0%D0%BC%D1%8F%D1%82%D1%8C">Контекст проекта, навыки и память</a> · <a href="#mcp-%D0%B2%D0%BD%D0%B5%D1%88%D0%BD%D0%B8%D0%B5-%D0%B8%D0%BD%D1%81%D1%82%D1%80%D1%83%D0%BC%D0%B5%D0%BD%D1%82%D1%8B">MCP (внешние инструменты)</a> · <a href="#%D0%BA%D0%BE%D0%BD%D1%84%D0%B8%D0%B3%D1%83%D1%80%D0%B0%D1%86%D0%B8%D1%8F">Конфигурация</a></li> <li><a href="#faq">FAQ</a> · <a href="#%D1%81%D1%81%D1%8B%D0%BB%D0%BA%D0%B8">Ссылки</a> · <a href="#%D0%BB%D0%B8%D1%86%D0%B5%D0%BD%D0%B7%D0%B8%D1%8F">Лицензия</a></li> </ul> <h2>Возможности</h2> <ul> <li><strong>Инструменты как в Claude Code / Codex</strong> — <code>Read</code>, <code>Write</code>, <code>Edit</code>, <code>Bash</code>, <code>Glob</code>, <code>Grep</code>, плюс <code>MultiEdit</code>, <code>ApplyPatch</code>, <code>LS</code>, <code>TodoWrite</code>, git- и веб-инструменты. Каждая правка подкреплена <code>/undo</code>.</li> <li><strong>Работает, пока вы печатаете</strong> — сообщения, набранные во время задачи, встают в очередь и уходят сразу после неё, в тот же чат (как набор текста во время генерации на сайте).</li> <li><strong>Режим плана</strong> — <code>/plan</code> (или <code>--plan</code>) убирает все мутирующие инструменты, чтобы агент изучал код, не трогая дерево.</li> <li><strong>Контекст проекта</strong> — читает <code>AGENTS.md</code>, <code>MEMORY.md</code>, навыки (<code>SKILL.md</code>) и пользовательские команды из репозитория и <code>~/.zames</code>, как в Codex / Claude Code.</li> <li><strong>Субагенты</strong> — инструмент <code>Task</code> поручает самодостаточную подзадачу агенту в отдельном чате (изолированный контекст), который возвращает только отчёт, так что тяжёлая разведка не засоряет основной контекст. Включены по умолчанию; настраиваются через <code>browser.subagents</code> / <code>browser.maxSubagents</code>.</li> <li><strong>Поддержка MCP</strong> — подключение внешних серверов инструментов (например, <code>@playwright/mcp</code>).</li> <li><strong>Планировщик</strong> — <code>/loop</code>, <code>/cron</code> и <code>/jobs</code> повторяют задачи по таймеру.</li> <li><strong>Двуязычный интерфейс</strong> — русский / английский (<code>/config lang</code>).</li> </ul> <h2>Почему zames?</h2> <ul> <li><strong>Разрабатывается сам собой</strong> — над <code>zames_pro</code> работает <code>zames_pro</code>, а не какой-то другой кодинг-агент: агент в этом самом терминале читает исходники, гоняет тесты, чинит баги и коммитит результат. Это ежедневное доказательство, что он работает и реально используется.</li> <li><strong>Нет API-ключа и счёта за токены</strong> — используется ваш собственный аккаунт чата DeepSeek, Qwen или GLM, а не платный API. Удобно для долгих задач с инструментами.</li> <li><strong>Тот же рабочий процесс, что в Claude Code / Codex</strong> — инструменты, <code>AGENTS.md</code>, навыки, MCP и слэш-команды, так что всё знакомо с первого дня.</li> <li><strong>Работает без присмотра</strong> — headless по умолчанию, возобновляемые сессии, <code>/loop</code> и <code>/cron</code> для задач по расписанию.</li> <li><strong>Local-first</strong> — профиль браузера, учётные данные и логи не покидают вашу машину, а агент запесочен в директорию проекта.</li> </ul> <h2>Требования</h2> <ul> <li>Node.js >= 20</li> <li>Аккаунт в нужном чате — <strong>DeepSeek</strong> (<code>chat.deepseek.com</code>, по умолчанию), <strong>Qwen</strong> (<code>chat.qwen.ai</code>) или <strong>GLM</strong> (<code>chat.z.ai</code>). Qwen также работает в гостевом режиме на несколько сообщений. При первом запуске zames спросит логин в терминале (и сохранит его в <code>~/.zames/config.json</code> после успешного входа, поэтому более поздний разлогин обрабатывается автоматически, без повторных вопросов). Можно также войти вручную в окне браузера, когда он headed.</li> </ul> <h2>Вход в аккаунт</h2> <p>Браузер по умолчанию работает <strong>headless</strong>. Когда активный бэкенд требует входа, zames:</p> <ol> <li>переиспользует сессию из постоянного профиля (<code>~/.zames/profile</code>, <code>~/.zames/qwen-profile</code> или <code>~/.zames/glm-profile</code>), если она ещё валидна;</li> <li>иначе входит автоматически по сохранённым учётным данным (<code>browser.auth.*</code> у DeepSeek, <code>qwen.auth.*</code> / <code>glm.auth.*</code> у остальных);</li> <li>иначе открывает <strong>видимое окно браузера</strong>, чтобы вы вошли сами — капчу (она есть и у DeepSeek, и у z.ai) в терминал не ввести. zames замечает вход и возвращается в headless; введённые вами учётные данные сохраняются для следующего тихого автовхода;</li> <li>и только если окно показать нельзя (нет дисплея, неинтерактивный запуск), переходит к форме в терминале.</li> </ol> <p>Чтобы войти руками (например, если сайт показывает капчу), запустите с видимым окном:</p> <pre><code class="language-bash">zames --headed </code></pre> <p>Флаг <code>--headless</code> (значение по умолчанию) и <code>headless: true</code> в конфиге держат браузер без окна; <code>--headed</code> / <code>headless: false</code> показывают его.</p> <p>Headless работает из коробки: headless Chrome обычно представляется как <code>HeadlessChrome/...</code>, и CDN сайта блокирует такой User-Agent ответом 403, поэтому zames срезает этот маркер перед загрузкой страницы (сохраняя реальную версию движка). <code>--headed</code> нужен не только ради входа.</p> <p>Учётные данные и переключатели можно также править из <code>/config</code> (<code>browser.auth.username</code>, <code>browser.auth.password</code>, <code>browser.auth.saveSession</code>).</p> <h2>Переключение провайдера (DeepSeek / Qwen / GLM)</h2> <p>zames умеет работать с <strong>DeepSeek</strong> (<code>chat.deepseek.com</code>, по умолчанию) и <strong>Qwen</strong> (<code>chat.qwen.ai</code>):</p> <pre><code class="language-bash">/provider qwen # переключиться на Qwen (сохраняется) — применяется сразу /provider deepseek # вернуться обратно /provider status # активный провайдер / модель / статус входа /provider login # повторно пройти проверку входа /model # список моделей Qwen /model qwen3.7-plus # выбрать модель </code></pre> <p>Замечания:</p> <ul> <li>Переключение <strong>живое</strong>: zames закрывает текущий бэкенд и открывает другой на месте, перезапуск не нужен. У бэкендов <strong>разные постоянные профили</strong> (<code>~/.zames/profile</code> у DeepSeek, <code>~/.zames/qwen-profile</code> у Qwen), поэтому переключение не разлогинивает другой.</li> <li>id чата принадлежит ОДНОМУ бэкенду, поэтому новый провайдер открывает <strong>свежий чат</strong>. Если в прошлом чате были сообщения, они сжимаются и подставляются как handoff в следующую задачу; пустой чат переключается молча.</li> <li>Qwen работает в <strong>гостевом режиме</strong> без аккаунта, но гостю доступно всего несколько сообщений в день; для долгих прогонов войдите (email / Google / GitHub — телефон не нужен). zames сам логинится по сохранённым кредам или спросит в терминале, как и с DeepSeek. <code>/model</code> меняет модель Qwen на лету.</li> <li><strong>GLM</strong> (<code>chat.z.ai</code>) — третий бэкенд. Первое сообщение с нового профиля закрыто капчей-слайдером, поэтому войдите один раз в видимом окне; дальше сохранённая сессия переиспользуется. <code>/model</code> работает и для GLM.</li> <li><strong>GLM работает с ВИДИМЫМ окном браузера.</strong> Замерено: одна и та же залогиненная сессия в окне отправляет нормально, а КАЖДАЯ отправка из headless упирается в капчу-слайдер сайта (картинка каждый раз новая, поэтому программно её не пройти). Поэтому zames запускает GLM с окном по умолчанию и пишет об этом при старте; <code>--headless</code> по-прежнему форсирует headless (отправки будут упираться в капчу). <code>--headed</code> работает везде.</li> <li><strong>Телеметрия отправок</strong>: каждая отправка пишется в <code>~/.zames/logs/sends-<provider>.jsonl</code> (тайминги, флаги режимов, исход и ошибка сервера — без промптов и ответов). Отключается через <code>/config set browser.sendTelemetry false</code>. Команда <code>/limits</code> показывает последние отправки и текущую паузу. У GLM вдобавок <strong>адаптивная пауза</strong>: она начинается с 0 и растёт только после НАСТОЯЩЕГО лимита.</li> <li><strong>Предупреждение</strong>: автоматизация веб-чата может нарушать условия использования сервиса и привести к блокировке аккаунта. У GLM (z.ai) есть официальный API — для тяжёлой автоматизации лучше он.</li> <li>Вложения в Qwen идут через пункт <strong>Upload attachment</strong> в меню режима; в DeepSeek — своя скрепка.</li> <li><code>/doctor</code> показывает активный провайдер и состояние UI его страницы.</li> </ul> <h2>Установка</h2> <pre><code class="language-bash">npm install -g zames_pro </code></pre> <p>Chromium для Playwright скачивается автоматически при установке. На Linux/WSL необходимые системные библиотеки тоже ставятся, если доступен <code>sudo</code> без пароля; иначе выполните один раз вручную:</p> <pre><code class="language-bash">npx playwright install chromium sudo npx playwright install-deps chromium </code></pre> <h2>Использование</h2> <p>Перейдите в папку проекта и запустите:</p> <pre><code class="language-bash">zames </code></pre> <p>Агент работает внутри директории, из которой он запущен, и не может её покинуть (песочница).</p> <p>Пока агент работает, можно продолжать печатать: Enter ставит сообщение в очередь (оно уйдёт сразу после текущей задачи, в тот же чат), а Esc / Ctrl+C прерывают текущую генерацию. Это повторяет набор текста во время генерации на сайте чата.</p> <h3>Строка ввода</h3> <p>Промпт — это небольшой редактор строки с постоянной историей:</p> <ul> <li><code>↑</code> / <code>↓</code> — переход по истории сообщений (сохраняется в <code>~/.zames/history.json</code>, поэтому переживает перезапуск); внутри многострочного сообщения стрелки двигают по строкам.</li> <li><code>Ctrl+R</code> — инкрементальный поиск по истории в обратном порядке (как в bash): печатайте для фильтра, <code>Ctrl+R</code> — за более старыми совпадениями, <code>Enter</code> — принять, <code>Esc</code> — отменить.</li> <li><code>Ctrl+_</code> — отменить последнюю правку строки ввода (случайно нажатые <code>Ctrl+U</code> / <code>Ctrl+K</code> можно вернуть).</li> <li><code>Ctrl+U</code> — очистить строку, <code>Ctrl+K</code> — удалить до конца строки, <code>Ctrl+W</code> — удалить слово перед курсором, <code>Ctrl+←</code>/<code>Ctrl+→</code> — переход по словам.</li> <li><code>\</code> + <code>Enter</code>, <code>Ctrl+J</code>, <code>Ctrl+Enter</code> или <code>Shift+Enter</code> — вставить новую строку.</li> <li><code>/</code> + <code>Tab</code> — подсказки и автодополнение слэш-команд.</li> <li><code>!команда</code> — выполнить shell-команду напрямую, минуя модель (как bash-режим Claude Code). Действует та же песочница, что и для инструмента <code>Bash</code>, так что прямая команда тоже не может выйти за пределы проекта.</li> </ul> <p>В полноэкранном режиме добавляется навигация по диалогу, чтобы длинный ответ можно было прочитать и выделить не покидая терминал:</p> <ul> <li><code>ui.mouseScroll=false</code> (по умолчанию) — терминал владеет мышью: обычное выделение текста работает, колесо инертно (и никогда не листает историю ввода — история только стрелками).</li> <li><code>ui.mouseScroll=true</code> — приложение перехватывает колесо и скроллит диалог; выделение текста тогда — <code>Shift</code>+клик (стандарт TUI).</li> <li><code>PgUp</code> / <code>PgDn</code> — вверх/вниз по диалогу на пол-экрана.</li> <li><code>Home</code> / <code>End</code> — прыжок в самый верх / низ диалога (только когда строка ввода пуста; при набранном тексте они двигают курсор, как обычно).</li> <li>Чтобы скопировать БОЛЬШОЙ кусок, используйте <code>/export</code> (пишет всю сессию в Markdown) или файл транскрипта (<code>/transcript</code> покажет путь) — собственным выделением терминала за пределы одного экрана не выделить.</li> </ul> <p>Установите <code>NO_COLOR=1</code>, чтобы отключить цвета (иначе используется спокойная палитра по умолчанию).</p> <h3>Картинки и файлы</h3> <p>В строку ввода можно вставить картинку или файл (Ctrl+Shift+V / Shift+Insert или собственной вставкой терминала). zames сохраняет его в <code><project>/tmp</code> и показывает маркер в строке — <code>[image#1]</code> для картинок, <code>[file#1]</code> для прочих файлов — затем загружает реальный файл в чат вместе с вашим сообщением. Это те же форматы, что принимает веб-чат DeepSeek / Qwen / GLM (PNG, JPEG, GIF, WEBP, BMP, SVG и обычные типы документов).</p> <p>Вставка картинки работает, когда терминал передаёт её как <code>data:</code> URL или как base64-блок с узнаваемой сигнатурой изображения. Можно также вставить путь к локальному файлу (перетащите файл в терминал или скопируйте его путь); если файл существует — он прикрепляется, иначе текст вставляется как обычно.</p> <p>Нажмите Ctrl+V (или сделайте пустую вставку), и zames прочитает картинку прямо из буфера обмена: Linux через wl-paste (Wayland) или xclip/xsel (X11), macOS через pngpaste, Windows через PowerShell. Нужные Linux-утилиты ставятся автоматически при <code>npm install</code> (best-effort, через определённый пакетный менеджер). Если картинка не найдена, zames сообщит об этом и напишет, какой инструмент пробовал, вместо молчания.</p> <h3>Опции</h3> <pre><code>zames --task <текст задачи> zames --chat <id> zames --new-chat zames --resend-prompt zames --dir <path> zames --headless zames --headed zames --plan zames --output-format jsonl zames --debug zames --version zames --help </code></pre> <h3>Машиночитаемый вывод (скрипты / CI)</h3> <p>Для одноразовых запусков (<code>--task</code>) агент может выдавать поток событий как JSON lines в stdout, оставляя весь человеческий текст в stderr:</p> <pre><code class="language-bash">zames --task "summarize the diff" --output-format jsonl </code></pre> <p>Каждая строка — одно событие (<code>tool_call</code>, <code>tool_result</code>, <code>assistant_final</code>, …), так что это сразу пайпится в <code>jq</code>:</p> <pre><code class="language-bash">zames --task "..." --output-format jsonl \ | jq -r 'select(.type=="assistant_final") | .message' </code></pre> <h2>Инструменты</h2> <p>У агента тот же стиль инструментов, что в Claude Code / Codex CLI:</p> <ul> <li><strong>Файловые</strong> — <code>Read</code>, <code>Write</code>, <code>Edit</code>, <code>Bash</code>, <code>Glob</code>, <code>Grep</code>. <code>Read</code> по умолчанию отдаёт сырое содержимое; передайте <code>numbered=true</code>, чтобы получить нумерацию строк в стиле <code>cat -n</code> (только для справки — не вставляйте её в <code>Edit</code>).</li> <li><strong>Дополнительные</strong> — <code>LS</code> (список директории), <code>MultiEdit</code> (несколько правок одного файла атомарно), <code>TodoWrite</code> (чек-лист задач сессии), <code>ApplyPatch</code> (мультифайловый патч в формате V4A от Codex: <code>*** Begin Patch</code> … <code>*** End Patch</code>).</li> <li><strong>Git</strong> — <code>GitStatus</code>, <code>GitDiff</code>, <code>GitLog</code>, <code>GitShow</code>, <code>GitBranchList</code>, <code>GitAdd</code>, <code>GitCommit</code>, <code>GitPush</code>.</li> <li><strong>Web</strong> — <code>WebFetch</code>, <code>WebSearch</code>.</li> <li><strong>Служебный</strong> — <code>respond</code> (финальный ответ оператору, завершает задачу).</li> </ul> <p>Все файловые инструменты остаются внутри рабочей директории (песочница). <code>Write</code>/<code>Edit</code> и <code>MultiEdit</code>/<code>ApplyPatch</code> делают резервную копию (undo) перед изменением файла.</p> <h2>Слэш-команды</h2> <p>Введите / в промпте для подсказок (Tab дополняет). Кроме команд сессии и конфига (/new, /chats, /resume, /cd, /status, /config, /undo, /transcript, /mcp, /skills, /memory, /init, /reload, /debug-dom, /help, /exit) есть несколько в духе Claude Code / Codex CLI:</p> <ul> <li>/diff [--staged] — показать git-диф рабочего дерева (--staged для индекса).</li> <li>/diffstat — сводка изменений одной строкой (<code>git diff --stat</code>).</li> <li>/context — показать, что загружено в промпт (AGENTS.md, MEMORY.md, навыки, пользовательские команды) и размер системного промпта.</li> <li>/retry — отправить последнюю задачу в тот же чат заново (удобно после обрезанного или пустого ответа).</li> <li>/rename <title> — задать заголовок текущей сессии (виден в /sessions).</li> <li>/copy — скопировать последний ответ ассистента в буфер обмена ОС.</li> <li>/cost (алиас /usage) — статистика сессии: задачи, вызовы инструментов, длительность и размер контекста в токенах (у DeepSeek — <code>accumulated_token_usage</code>, у Qwen — <code>input_tokens</code>, у GLM — <code>prompt_tokens</code>).</li> <li>/export [file] — записать транскрипт сессии в Markdown-файл (по умолчанию zames-export-<stamp>.md).</li> <li>/doctor — диагностика node, git, конфига, браузера, буфера обмена, MCP и активного провайдера чата (плюс состояние UI его страницы).</li> <li>/provider <deepseek|qwen|glm> — сменить бэкенд чата (применяется сразу, без перезапуска); /provider status показывает активный провайдер/модель/вход; /provider login повторно проверяет вход. /model [id] покажет или выберет модель Qwen на лету.</li> <li>/add-dir <path> — проверить дополнительную директорию (песочница фиксируется при старте; для записи туда перезапустите с --dir).</li> <li>/resume-id <id> (или выбор чата в списке /chats) — открыть чат и НАПЕЧАТАТЬ его диалог в терминал, чтобы восстановленный контекст был виден. Показываются только последние 20 сообщений (<code>RESTORED_HISTORY_LIMIT</code>). /last открывает последний чат текущей директории без поиска; /sessions показывает сохранённые сессии с их относительным возрастом.</li> <li>/help <command> — полное описание одной команды (например, <code>/help diff</code>) вместо всего списка.</li> <li>/review [focus] [--staged] — попросить агента проверить незакоммиченные изменения и сообщить находки (без правок кода).</li> <li>/plan [on|off] — режим плана (только чтение). Пока он включён, мутирующие инструменты (Write/Edit/MultiEdit/ApplyPatch/Bash, GitAdd/GitCommit/GitPush) убраны из набора, чтобы агент изучал код, не трогая дерево. Стартовать в нём можно с <code>--plan</code>.</li> <li>/compact — попросить активный бэкенд сжать текущий чат в передаточное резюме, затем открыть НОВЫЙ чат, заново отправить системный промпт и положить резюме как перенесённый контекст. Используйте, когда контекст разрастается.</li> <li>/goal <условие> — задать <strong>условие завершения</strong> (как в Claude Code). Агент сразу начинает работать над ним и продолжает запускать новые ходы, пока отдельная модель-оценщик не признает условие выполненным. Цель снимается автоматически при достижении (или если оценщик признал её недостижимой), либо командой <code>/goal clear</code>. Условие хранится в <code><project>/.zames-goal</code> (git-ignored) и восстанавливается при следующем запуске. <code>/goal</code> без аргумента показывает текущее состояние.</li> <li>/loop <interval> <task> — повторять задачу периодически (например, <code>/loop 10m run the tests</code>). /cron "<min> <hour> <dom> <month> <dow>" <task> — запуск по расписанию. /jobs [rm <id>|clear] перечисляет и останавливает их. Сработавшая задача попадает в ту же очередь сообщений, что и ваш ввод, так что выполняется, когда агент свободен (никогда посреди генерации), и всё равно соблюдает троттлинг отправки. ПЕРВЫЙ запуск <code>/loop</code> — сразу же (как только агент свободен); задача <code>/cron</code> ждёт своего расписания.</li> <li>/thinking [on|off] и /web [on|off] — переключить режим размышления / веб-поиска. В <strong>DeepSeek</strong> это тумблеры «Deep thinking» / «Smart search»; в <strong>Qwen</strong> — это режим размышления (Thinking / Fast) и пункт «Web search» в меню «+». Их (а также /queue, /jobs, /goal, <code>/config <sub></code>) можно использовать, ПОКА агент работает — они не трогают текущую генерацию.</li> <li>/queue [clear] — показать или очистить сообщения, ждущие отправки после текущей задачи.</li> </ul> <p>Контекст в токенах показывается и вживую: в строке статуса над вводом слева спиннер/текст, справа — контекст (например, <code>125k · 13%</code>, процент от 1M контекста). Он ОКРАШЕН по уровню заполнения: зелёный ниже 50%, жёлтый 50-80%, красный выше 80%. Значение приходит из счётчика токенов провайдера (у DeepSeek — <code>accumulated_token_usage</code>, у Qwen — <code>input_tokens</code>, у GLM — <code>prompt_tokens</code>) и скрыто до первого ответа.</p> <h2>Контекст проекта, навыки и память</h2> <p>Как в Codex / Claude Code, zames читает инструкции проекта и переиспользуемые процессы из вашего репозитория и из <code>~/.zames</code>.</p> <ul> <li><strong>AGENTS.md</strong> — инструкции проекта. Положите его в корень репозитория (или в любую родительскую папку рабочей директории). Глобальные инструкции живут в <code>~/.zames/AGENTS.md</code> (и <code>~/.claude/CLAUDE.md</code>). Запустите <code>/init</code>, и агент изучит проект и напишет AGENTS.md на основе реальных команд сборки/тестов и соглашений (<code>/init --force</code> перезапишет существующий файл).</li> <li><strong>MEMORY.md</strong> — долговечные заметки, переживающие сессии. Агент дописывает сюда полезные факты; можно править вручную или добавить из промпта через <code>/remember <text></code>.</li> <li><strong>Навыки</strong> — папка с файлом <code>SKILL.md</code> (YAML-фронтматтер: <code>name</code>, <code>description</code>, опционально <code>allowed-tools</code>, <code>user-invokable</code>) плюс любые вспомогательные файлы. Ищутся в <code>.zames/skills/</code>, <code>.claude/skills/</code>, <code>.agents/skills/</code>, <code>skills/</code> и <code>~/.zames/skills/</code>. Агент читает тело только когда задача совпадает с описанием. Список — <code>/skills</code>; вызов — <code>/<skill-name></code>.</li> <li><strong>Пользовательские команды</strong> — <code>.md</code>-файлы в <code>.zames/commands/</code> (или <code>.claude/commands/</code>). Поддерживают подстановки <code>$ARGUMENTS</code> / <code>{{args}}</code> и вызываются как <code>/<command-name></code>.</li> </ul> <p>Навыки и пользовательские команды видны в списке автодополнения «/» и в <code>/help</code>.</p> <pre><code>/skills список найденных навыков /memory показать действующие AGENTS.md / MEMORY.md /remember <text> дописать долговечную заметку в MEMORY.md /init [--force] проанализировать проект и создать AGENTS.md </code></pre> <h2>MCP (внешние инструменты)</h2> <p>zames может использовать инструменты с серверов <a href="https://modelcontextprotocol.io">MCP</a>. Главный пример — @playwright/mcp: он даёт агенту настоящий браузер (navigate, click, snapshot, type, ...) поверх того, который zames уже использует для чата DeepSeek, Qwen или GLM.</p> <p>Положите файл конфига (той же формы, что в Claude Code / Cursor):</p> <ul> <li><code>~/.zames/mcp.json</code> — глобальный</li> <li><code><project>/.zames/mcp.json</code> — на уровне проекта (поздние файлы побеждают)</li> <li><code><project>/.mcp.json</code> — привычное имя MCP</li> </ul> <pre><code class="language-json">{ "mcpServers": { "playwright": { "command": "npx", "args": ["-y", "@playwright/mcp@latest", "--headless", "--isolated"] } } } </code></pre> <p>ВАЖНО: держите MCP-браузер изолированным. @playwright/mcp по умолчанию использует ТУ ЖЕ директорию профиля, что и zames (~/.zames/profile). Если запустить его без --isolated (или без собственного --user-data-dir), MCP-браузер и браузер агента подерутся за один профиль, и чат DeepSeek покажет «Something went wrong when opening your profile». Всегда передавайте --isolated, как в примере выше. Серверы бывают и удалёнными ("url": "https://...", "transport": "sse"). Их инструменты видны агенту как <code>server__tool</code> (например, <code>playwright__browser_navigate</code>) и перечисляются в <code>/mcp</code> и <code>/status</code>. Сервер, который не смог подключиться, пропускается с предупреждением и никогда не роняет агента.</p> <h3>Рекомендованные серверы (проверены)</h3> <p>Несколько небольших полезных серверов, протестированных вживую с zames (на бэкендах DeepSeek, Qwen и GLM):</p> <ul> <li><p><strong>Context7</strong> (<code>@upstash/context7-mcp</code>) — подтягивает АКТУАЛЬНУЮ документацию библиотеки (для конкретной версии) до того, как агент пишет код, вместо устаревших знаний из обучения. Инструменты: <code>resolve_library_id</code>, затем <code>query_docs</code>. Проверено вживую на DeepSeek и Qwen (слой MCP не зависит от провайдера, поэтому работает и с GLM): агент вызвал оба инструмента и получил актуальный API Zod. Именно его стоит подключить первым.</p> <pre><code class="language-json">{ "context7": { "command": "npx", "args": ["-y", "@upstash/context7-mcp@latest"] } } </code></pre> </li> <li><p><strong>Sequential Thinking</strong> (<code>@modelcontextprotocol/server-sequential-thinking</code>) — один инструмент <code>sequentialthinking</code>, дающий модели явный пересматриваемый план перед действием; полезно для длинных многошаговых задач.</p> </li> <li><p><strong>Memory</strong> (<code>@modelcontextprotocol/server-memory</code>) — локальный граф знаний (9 инструментов) для долговременных фактов между чатами. ВНИМАНИЕ: у zames уже есть <code>MEMORY.md</code> + <code>AGENTS.md</code>; подключайте, только если нужен граф с запросами.</p> </li> </ul> <p>Держите набор МАЛЕНЬКИМ: каждый сервер грузит описания своих инструментов в контекст модели. Добавляйте, когда почувствовали нехватку, а не заранее.</p> <h2>Конфигурация</h2> <p>Глобальный конфиг: <code>~/.zames/config.json</code> Локальный (на проект): <code>.zamesrc.json</code></p> <p>Просматривать и менять настройки можно не выходя из агента — командой <code>/config</code>. Запустите её без аргументов, чтобы открыть интерактивное меню (↑/↓ — навигация, Enter — изменение, <code>d</code> — сброс, <code>q</code> — выход). Булевы и enum переключаются на месте; числа и строки открывают ввод.</p> <pre><code>/config интерактивное меню настроек /config list показать все изменяемые настройки /config get <path> показать настройку /config set <path> <value> изменить настройку /config reset <path> сбросить настройку к дефолту /config path показать пути файлов конфига /config lang <ru|en> переключить язык интерфейса и агента </code></pre> <p>Примеры:</p> <pre><code>/config set maxIterations 20 /config set browser.deepThinking true # DeepSeek Deep thinking (медленно; рассуждения скрыты) /config set browser.webSearch false # DeepSeek Smart web search /config lang en </code></pre> <p>Изменения пишутся в проектный <code>.zamesrc.json</code> и применяются сразу (где это возможно без перезапуска).</p> <h3>Язык</h3> <p><code>/config lang ru</code> или <code>/config lang en</code> переключает и язык интерфейса (справка, сообщения, спиннер), и язык, на котором агент вам отвечает. Локаль хранится в <code>ui.locale</code> в файле конфига.</p> <p>Данные агента хранятся в <code>~/.zames</code>: профиль браузера, логи, история undo, сессии.</p> <h2>FAQ</h2> <p><strong>Это официальный продукт DeepSeek, Qwen или GLM?</strong> Нет. zames управляет публичными веб-интерфейсами <code>chat.deepseek.com</code> / <code>chat.qwen.ai</code> / <code>chat.z.ai</code> через настоящий браузер, как обычный пользователь. Он не связан ни с DeepSeek, ни с Alibaba, ни с Zhipu AI.</p> <p><strong>Нужен ли API-ключ?</strong> Нет. Вы один раз входите в свой аккаунт на нужном чате — DeepSeek (хранится в <code>~/.zames/profile</code>), Qwen (хранится в <code>~/.zames/qwen-profile</code>) или GLM (хранится в <code>~/.zames/glm-profile</code>) — и сессия переиспользуется. Qwen также работает в гостевом режиме на несколько сообщений.</p> <p><strong>Какую модель он использует?</strong> Ту, которую использует активный веб-чат. В DeepSeek это DeepSeek-V3 (или reasoning-модель при включённом «Deep thinking»). В Qwen модель можно выбрать командой <code>/model</code> (например, <code>qwen3.7-plus</code>). zames никогда не вызывает API напрямую.</p> <p><strong>Работает ли headless / на сервере?</strong> Да — headless по умолчанию, а <code>--output-format jsonl</code> делает его скриптуемым. <code>--headed</code> нужен только для ручного входа или отладки селекторов.</p> <p><strong>Разрешена ли автоматизация веб-интерфейса?</strong> Это зависит от условий сайта; автоматизация сайта может их нарушать. Используйте на свой риск и держите троттлинг отправки (15 с в DeepSeek по умолчанию), чтобы не бить по рейт-лимиту.</p> <p><strong>Чем отличается от Claude Code / Codex?</strong> Та же форма (инструменты, <code>AGENTS.md</code>, навыки, MCP, слэш-команды), но работает на вашем аккаунте DeepSeek, Qwen или GLM вместо API, как автоматизация браузера, а не first-party API-клиент.</p> <h2>Ссылки</h2> <ul> <li><strong>npm:</strong> <a href="https://www.npmjs.com/package/zames_pro">https://www.npmjs.com/package/zames_pro</a></li> <li><strong>GitHub:</strong> <a href="https://github.com/Viqto0r/zames_pro">https://github.com/Viqto0r/zames_pro</a></li> <li><strong>Changelog:</strong> <a href="CHANGELOG.md"><code>CHANGELOG.md</code></a></li> <li><strong>Contributing:</strong> <a href="CONTRIBUTING.md"><code>CONTRIBUTING.md</code></a></li> <li><strong>Security policy:</strong> <a href="SECURITY.md"><code>SECURITY.md</code></a></li> <li><strong>Code of conduct:</strong> <a href="CODE_OF_CONDUCT.md"><code>CODE_OF_CONDUCT.md</code></a></li> </ul> <h2>Лицензия</h2> <p>MIT</p> </details>

SIMILAR PLUGINS