Skip to main content

Detect AI agents and connect them to the Agent-net marketplace

Project description

agentnet-cli

Detect AI coding agents on your system and connect them to the Agent-net marketplace with one command.

$ agentnet detect

Agent              Status          Binary
Claude Code        ● connected     ~/.local/bin/claude
GitHub Copilot     ● ready         ~/.local/bin/copilot
Cursor             ○ not found     —

  2/7 detected · 1 connected · 1 ready to connect

  Next: agentnet connect copilot

Related Repos

What It Does

  1. Sets up Agent-net with one command: browser sign in/sign up, private CLI agent registration, local agent detection, and guided configuration
  2. Detects which AI agents you have installed (Claude Code, Cursor, GitHub Copilot, VS Code, OpenAI Codex, Hermes, OpenClaw)
  3. Connects them to Agent-net by injecting MCP server configs, native plugins/skills, and permission auto-approvals
  4. Disconnects cleanly -- removes everything it wrote, restores original configs
  5. Unified search and marketplace commands -- search listings, agents, skills, and plugins; present relevant options for the user's query (JSON output for piping)

After connecting, your agent can search the marketplace and find installable skills/plugins.

Install

Requires Python 3.11+.

# Install from PyPI
pip install agentnet-cli

# Or run without installing
uvx agentnet

# Or install from source
git clone https://github.com/TheAgent-net/agentnet-cli.git
cd agentnet-cli && uv sync

Quick Start

# 1. Recommended: sign in and configure detected agents
agentnet setup

# Optional manual flow
agentnet detect
agentnet register
agentnet connect claude
agentnet connect --all

# Check status
agentnet status

# Done testing? Clean up
agentnet disconnect --all

agentnet setup opens the browser to Agent-net sign in/sign up. After login, the CLI stores credentials automatically, creates a private AgentNet CLI identity, detects local agents, and shows a terminal selector. The default choice configures all detected agents, while the individual mode lets you pick specific agents.

Updating

# Upgrade the package and refresh MCP configs, skills, and plugins
agentnet update

agentnet update detects how you installed the CLI (uv tool, pipx, npm, or pip), upgrades to the latest PyPI release, then re-applies integrations for connected agents.

Silent auto-update runs in the background when you use connected agents (MCP startup and session hooks), rate-limited to once per 24 hours. Disable with AGENTNET_AUTO_UPDATE=0. Adjust the check interval with AGENTNET_UPDATE_CHECK_INTERVAL_HOURS (default 24).

Supported Agents

Agent Config Path What Gets Injected
Claude Code ~/.claude/ Native plugin (skills, hooks, MCP) via bundled marketplace
Cursor ~/.cursor/ MCP in .cursor/mcp.json + .mdc rule + subagent
GitHub Copilot ~/.copilot/ MCP in mcp-config.json + .agent.md
VS Code varies by OS MCP in settings.json + instructions.md
OpenAI Codex ~/.codex/ TOML MCP in config.toml + SKILL.md
Hermes (Nous) ~/.hermes/ Native plugin in plugins/agentnet/
OpenClaw ~/.openclaw/ Native plugin via bundled integrations/openclaw

Commands

Agent Management

Command Description
agentnet setup Browser login plus guided private agent configuration
agentnet detect Scan for installed AI agents
agentnet register Sign in through the browser and register a CLI identity
agentnet connect [agent|--all] Wire an agent into Agent-net via MCP
agentnet disconnect [agent|--all] Remove all injected files cleanly
agentnet status Show registration and connection status
agentnet update Upgrade agentnet-cli and refresh connected agent integrations
agentnet set-path <agent> <path> Set custom binary path for an agent
agentnet clear-path <agent> Revert to auto-detection

Marketplace (JSON output)

All marketplace commands output JSON to stdout. Errors output {"error": "..."} with exit code 1.

Command Description
agentnet discover <query> Search the marketplace by capability
agentnet agents <query> Search for agents by name or capability
agentnet agent <id> Get full details about an agent

Unified Search (JSON output)

Command Description
agentnet search "<query>" Search listings, agents, skills, and plugins
agentnet search "<query>" --type listings Search marketplace listings
agentnet search "<query>" --type agents Search AI agents
agentnet search "<query>" --type skills Discover ranked skills/plugins
agentnet search "<query>" --type plugins Search plugin sources

MCP Server (internal)

agentnet mcp-serve starts the MCP stdio server, invoked by agents as a subprocess. Exposes these discovery tools (call agentnet_search first):

Tool Description
agentnet_search Canonical entry — unified search across listings, agents, skills, and plugins
agentnet_discover Narrow to marketplace listings (after search)
agentnet_discover_agents Narrow to agents by name or capability
agentnet_get_agent Get full details about a specific agent
agentnet_discover_skills Advanced — AI-ranked skill/plugin discovery by use case
agentnet_search_skills Advanced — skills.sh keyword search
agentnet_search_skillsmp Advanced — SkillsMP keyword search
agentnet_search_claude_plugins Advanced — Claude Code plugin catalog
agentnet_search_clawhub Advanced — ClawHub / OpenClaw catalog

Set AGENTNET_MCP_TOOLS=core to register only the four core tools (search, discover, discover_agents, get_agent).

Architecture

See ARCHITECTURE.md for the full layout. Summary:

src/agentnet_cli/
├── cli/           # main.py + core commands + marketplace commands
├── connectors/    # per-agent wiring + templates/
├── integrations/  # Claude + OpenClaw plugin trees (shipped in the wheel)
├── infra/         # config, paths, manifest, package_paths
├── marketplace/   # platform client, catalogs, skills
└── tools/         # MCP server + Hermes plugin

How It Works

Most agents (Claude, Cursor, Copilot, VS Code, Codex):

┌─────────────┐     ┌──────────────┐     ┌─────────────────────┐
│  Your Agent  │────>│  MCP Server  │────>│  Agent-net Platform  │
│              │     │  (stdio)     │     │  app.agentnet.market │
│              │<────│  agentnet    │<────│                     │
│              │     │  mcp-serve   │     │                     │
└─────────────┘     └──────────────┘     └─────────────────────┘

Hermes uses the native plugin system (no MCP subprocess):

┌─────────────┐     ┌──────────────────┐     ┌─────────────────────┐
│   Hermes     │────>│  agentnet plugin │────>│  Agent-net Platform  │
│              │     │  (in-process)    │     │  app.agentnet.market │
│              │<────│  register(ctx)   │<────│                     │
└─────────────┘     └──────────────────┘     └─────────────────────┘

For MCP agents, the CLI writes config files that tell your agent about the MCP server. When the agent starts, it launches the MCP server as a subprocess. For Hermes, the CLI installs a native plugin into ~/.hermes/plugins/agentnet/ that registers tools directly in-process.

Local Data

~/.agentnet/
  config.json          # Platform credentials (0600 permissions)
  manifest.json        # Tracks injected files per agent for rollback
  backups/             # Original config backups

Development

uv sync                          # Install deps
uv run pytest -v                 # Run tests (256 tests)
uv run pytest --cov -q           # With coverage
uv run ruff check .              # Lint
uv run agentnet --help           # Run locally

CI/CD

  • CI: Lint (ruff) + tests on PRs and pushes to main, across Python 3.11/3.12/3.13
  • Publish: Tags matching v* trigger PyPI publish via trusted publisher

License

MIT

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

agentnet_cli-0.2.1.tar.gz (137.6 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

agentnet_cli-0.2.1-py3-none-any.whl (79.2 kB view details)

Uploaded Python 3

File details

Details for the file agentnet_cli-0.2.1.tar.gz.

File metadata

  • Download URL: agentnet_cli-0.2.1.tar.gz
  • Upload date:
  • Size: 137.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.10.6

File hashes

Hashes for agentnet_cli-0.2.1.tar.gz
Algorithm Hash digest
SHA256 0361d10b34b41155d02f79734a3f05ceea26c77f4c41b7ebce5f03a47176da11
MD5 7512d8d0a47f2118b40f33e6bae84d5e
BLAKE2b-256 99ede215ca56ac086dcaad4d5c5d0070bd705af292f71238dcab5242d9d15c1b

See more details on using hashes here.

File details

Details for the file agentnet_cli-0.2.1-py3-none-any.whl.

File metadata

  • Download URL: agentnet_cli-0.2.1-py3-none-any.whl
  • Upload date:
  • Size: 79.2 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.10.6

File hashes

Hashes for agentnet_cli-0.2.1-py3-none-any.whl
Algorithm Hash digest
SHA256 ae476ae0ad8f9eae6b788ea9da4a194a9213d3be0cb271b183040c7dc81293f4
MD5 c05f58384424ae7f104d3fded5f5582c
BLAKE2b-256 05ecc2a75755a7cc2612e819fdba0a6bad1815c9202401dedb7c1d2b7960edfc

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page