Star 历史趋势
数据来源: GitHub API · 生成自 Stargazers.cn
README.md

OpenTag logo

English · 简体中文

OpenTag

opentag.im

Turn an existing work thread into a governed agent work loop.

Release npm pnpm build pnpm typecheck pnpm test Node License

OpenTag lets your team mention a coding agent from the collaboration platforms they already use. It turns that source thread into a bounded, auditable run: OpenTag curates the context packet, checks permissions and executor capability, runs Codex or Claude Code locally, records an agent work ledger, and returns concise artifacts and safe next actions to the same thread.

The concrete setup still connects Slack, GitHub, GitLab, Lark / Feishu, Telegram, or Discord to a local coding agent. The product boundary is broader than a connector: OpenTag is source-thread-native, local-first, and executor-neutral, so work stays where it already has context while the agent's inputs, authority, outputs, and callbacks remain reviewable.

Demo

Mention OpenTag in Slack, approve the suggested action, and get a real GitHub pull request.

https://github.com/user-attachments/assets/86edc4e1-7de9-4d07-a0ba-847fa6438191

OpenTag overview

Source-Thread Action Receipts

OpenTag treats the thread where a request starts as the approval surface for agent-proposed system-of-record mutations. When an agent suggests a change, OpenTag renders a compact receipt that shows what will change, whether it is ready to apply, and which decision is safe now.

Apply appears only when the dispatcher confirms a configured adapter can execute the action. Otherwise the receipt shows setup or attention needed, and the local audit trail stays available through commands such as opentag status --run <run_id>.

Each run also keeps a local agent work ledger: the source event, admission decision, context packet snapshot, executor capability snapshot, produced artifacts, callback delivery, and final outcome stay available through status and dispatcher audit APIs without flooding the human thread.

Quick Start

Requires Node.js 20 or newer.

npm install -g @opentag/cli@latest
opentag setup

No global install for one-off terminal-mode checks:

npx @opentag/cli setup

For background service mode, prefer the global install above so the service definition points at a stable CLI path instead of an npx temporary location.

opentag setup is the main entry point. It walks through the practical choices needed to run OpenTag locally:

  1. Which language should the CLI use?
  2. Where should OpenTag listen?
  3. Which coding agent should OpenTag use?
  4. Which local project should OpenTag work on?
  5. Which platform credentials should OpenTag save?
  6. How should OpenTag keep running?

After setup saves the config, choose how OpenTag should run:

  1. Keep running after I close this terminal (recommended)
  2. Run only in this terminal
  3. Do not start now

For scripted setup, use --service to choose the recommended background mode without the final prompt:

opentag setup --service

--service installs and starts the local background service after setup. Background service mode uses LaunchAgent on macOS and systemd --user on Linux; on other platforms, use terminal mode with opentag start for now. If you skip startup or stop OpenTag later, run opentag start manually for terminal mode or opentag service start for background mode.

Once OpenTag is running, mention it from the connected platform:

@opentag investigate this

OpenTag runs the selected coding agent locally and replies back through that platform.

Ask Your Agent

If you use Codex or Claude Code and do not want to set this up by hand, start a new agent session and paste:

Help me set up OpenTag from https://github.com/amplifthq/opentag.

Use the published OpenTag CLI. Please:
1. Check that Node.js 20 or newer is available.
2. Install or run the published OpenTag CLI.
3. Run opentag setup and help me choose Slack, GitHub, GitLab, Lark / Feishu, Telegram, or Discord, a coding agent, and a local project.
4. When platform credentials are needed, open the matching setup guide in the repository and walk me through it.
5. When setup asks how OpenTag should run, choose the recommended background service option. Then verify with opentag service status and opentag doctor. If service mode is unsupported or I choose terminal mode, use opentag start and keep that terminal open.

Do not invent credentials or secrets. Ask me before entering any token, app ID, channel ID, repository, or project path.

Agents can also follow the full agent-readable setup checklist in Agent-readable install guide.

Platform Guides

Use the guide for the platform you choose in opentag setup.

PlatformBest first pathGuide
SlackUse Socket Mode for local developmentSlack setup
GitHubUse a repository webhook and GitHub tokenGitHub setup
GitLabUse a project Note Hook and GitLab access tokenGitLab setup
Lark / FeishuScan the Personal Agent QR code from setupLark / Feishu setup
TelegramUse BotFather token with local getUpdates pollingTelegram setup
DiscordUse a bot token with local Gateway deliveryDiscord setup

What Runs Locally

opentag setup can install and start the recommended background service, run OpenTag in the current terminal, or save config without starting. opentag setup --service skips the final prompt and installs plus starts the background service on macOS or Linux. Both service and terminal modes start:

  • a local dispatcher
  • a local runner for the project you selected
  • the selected platform listener

Stop terminal mode with:

Ctrl-C

Stop background service mode with:

opentag service stop

OpenTag stores local config here:

~/.config/opentag/config.json

Runtime state and isolated worktrees default to:

~/.local/state/opentag

Privacy

OpenTag's CLI path is local-first.

  • There is no OpenTag cloud service in the local CLI flow.
  • Platform credentials are stored on your computer with private file permissions.
  • Codex and Claude Code run against your local checkout.
  • Platform APIs receive only the messages needed to acknowledge, reply, and apply actions you approve.

Supported Coding Agents

Coding agentStatusNotes
CodexReadyUses the local codex command
Claude CodeReadyUses the local claude command
EchoDev/test onlyDoes not run a real coding agent

Commands

CommandWhat it does
opentag setupCreate or update local OpenTag config, then offer to start it
opentag setup --serviceCreate or update local OpenTag config, then install and start the background service
opentag startStart the local OpenTag stack in the current terminal
opentag service startStart the installed background service
opentag service stopStop the installed background service
opentag service statusShow background service status and runtime readiness
opentag service logsShow recent background service logs
opentag statusShow local config and runtime status; add --run <run_id> or --channel provider:account/conversation for scoped detail
opentag cancelRequest cancellation for a run or the active run in a source container
opentag doctorRun deeper setup checks
opentag platformsList platform setup support and runtime capabilities
opentag executorsList available coding agents and runtime capabilities
opentag config pathPrint the local config path
opentag config showPrint redacted local config

Uninstall

Remove the global CLI package:

npm uninstall -g @opentag/cli

Remove local OpenTag config and state:

rm -rf ~/.config/opentag ~/.local/state/opentag

How It Works

flowchart LR
    A["Slack, GitHub, GitLab, Lark / Feishu, Telegram, or Discord"] --> B["OpenTag listener"]
    B --> C["Local dispatcher"]
    C --> D["Local runner"]
    D --> E["Codex, Claude Code, or custom executor"]
    E --> F["Reply back to the platform"]

The important boundary: platforms receive messages, OpenTag coordinates the run, and the coding agent executes on your machine.

The default loop is artifact-first rather than chat-first: a final reply should compress the outcome, link to artifacts such as reports, patches, pull request intents, or next actions, and point back to local audit/status for detail.

Developer Docs

Development

From source:

corepack pnpm install
corepack pnpm test
corepack pnpm typecheck
corepack pnpm build

Install the local development command:

corepack pnpm opentag-dev
opentag-dev setup

Packages

Current public release: v0.4.0. The npm package family is published under the @opentag scope.

PackagePurpose
@opentag/cliSetup and local runtime command line interface
@opentag/local-runtimeIn-process local dispatcher, runner, and platform runtime
@opentag/coreProtocol schemas, types, mention parsing, and JSON Schema exports
@opentag/clientDispatcher HTTP client
@opentag/slackSlack Socket Mode, Events API handling, and thread replies
@opentag/githubGitHub webhook handling, comments, PR helpers, and action application
@opentag/gitlabGitLab webhook handling, note replies, merge request helpers, and action application
@opentag/larkLark / Feishu ingress, Personal Agent registration, and replies
@opentag/telegramTelegram polling/webhook normalization, bot replies, and source-thread controls
@opentag/discordDiscord Gateway/webhook slash-command interactions and channel replies
@opentag/runnerExecutor contracts plus Echo, Claude Code, and Codex adapters
@opentag/storeSQLite persistence
@opentag/dispatcherEmbeddable dispatcher and callback sinks

License

OpenTag is licensed under the MIT License. See LICENSE.

关于 About

Open-source @agent mentions for Slack and GitHub. OpenTag routes tagged requests to Codex, Claude Code, then returns results in thread.
agent-skillsai-agentsclaudecodexgithubslack

语言 Languages

TypeScript94.2%
Shell3.4%
JavaScript2.4%

提交活跃度 Commit Activity

代码提交热力图
过去 52 周的开发活跃度
133
Total Commits
峰值: 86次/周
Less
More

核心贡献者 Contributors