agentnet-cli 0.1.0__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- agentnet_cli-0.1.0/.claude-plugin/marketplace.json +15 -0
- agentnet_cli-0.1.0/.github/workflows/ci.yml +37 -0
- agentnet_cli-0.1.0/.github/workflows/publish.yml +34 -0
- agentnet_cli-0.1.0/.gitignore +13 -0
- agentnet_cli-0.1.0/CLAUDE.md +120 -0
- agentnet_cli-0.1.0/PKG-INFO +253 -0
- agentnet_cli-0.1.0/README.md +227 -0
- agentnet_cli-0.1.0/claude-plugin/.claude-plugin/plugin.json +13 -0
- agentnet_cli-0.1.0/claude-plugin/.mcp.json +8 -0
- agentnet_cli-0.1.0/claude-plugin/agents/marketplace.md +27 -0
- agentnet_cli-0.1.0/claude-plugin/hooks/hooks.json +14 -0
- agentnet_cli-0.1.0/claude-plugin/skills/agentnet/SKILL.md +71 -0
- agentnet_cli-0.1.0/docs/superpowers/plans/2026-05-09-hermes-native-plugin.md +1014 -0
- agentnet_cli-0.1.0/docs/superpowers/plans/2026-05-09-marketplace-cli-and-skill.md +1223 -0
- agentnet_cli-0.1.0/docs/superpowers/plans/2026-05-10-claude-native-plugin.md +761 -0
- agentnet_cli-0.1.0/docs/superpowers/specs/2026-05-09-hermes-native-plugin-design.md +223 -0
- agentnet_cli-0.1.0/docs/superpowers/specs/2026-05-09-marketplace-cli-and-skill-design.md +234 -0
- agentnet_cli-0.1.0/docs/superpowers/specs/2026-05-10-claude-native-plugin-design.md +253 -0
- agentnet_cli-0.1.0/pyproject.toml +59 -0
- agentnet_cli-0.1.0/src/agentnet_cli/__init__.py +6 -0
- agentnet_cli-0.1.0/src/agentnet_cli/agents/README.md +55 -0
- agentnet_cli-0.1.0/src/agentnet_cli/agents/__init__.py +0 -0
- agentnet_cli-0.1.0/src/agentnet_cli/agents/base.py +37 -0
- agentnet_cli-0.1.0/src/agentnet_cli/agents/claude.py +114 -0
- agentnet_cli-0.1.0/src/agentnet_cli/agents/codex.py +78 -0
- agentnet_cli-0.1.0/src/agentnet_cli/agents/copilot.py +89 -0
- agentnet_cli-0.1.0/src/agentnet_cli/agents/cursor.py +90 -0
- agentnet_cli-0.1.0/src/agentnet_cli/agents/hermes.py +171 -0
- agentnet_cli-0.1.0/src/agentnet_cli/agents/openclaw.py +54 -0
- agentnet_cli-0.1.0/src/agentnet_cli/agents/registry.py +28 -0
- agentnet_cli-0.1.0/src/agentnet_cli/agents/shims.py +9 -0
- agentnet_cli-0.1.0/src/agentnet_cli/agents/vscode.py +119 -0
- agentnet_cli-0.1.0/src/agentnet_cli/commands/__init__.py +0 -0
- agentnet_cli-0.1.0/src/agentnet_cli/commands/agent.py +32 -0
- agentnet_cli-0.1.0/src/agentnet_cli/commands/discover.py +34 -0
- agentnet_cli-0.1.0/src/agentnet_cli/commands/session.py +35 -0
- agentnet_cli-0.1.0/src/agentnet_cli/commands/wallet.py +48 -0
- agentnet_cli-0.1.0/src/agentnet_cli/config.py +68 -0
- agentnet_cli-0.1.0/src/agentnet_cli/connect.py +73 -0
- agentnet_cli-0.1.0/src/agentnet_cli/detect.py +23 -0
- agentnet_cli-0.1.0/src/agentnet_cli/disconnect.py +60 -0
- agentnet_cli-0.1.0/src/agentnet_cli/hermes_plugin/__init__.py +36 -0
- agentnet_cli-0.1.0/src/agentnet_cli/hermes_plugin/handlers.py +69 -0
- agentnet_cli-0.1.0/src/agentnet_cli/hermes_plugin/plugin.yaml +17 -0
- agentnet_cli-0.1.0/src/agentnet_cli/hermes_plugin/schemas.py +182 -0
- agentnet_cli-0.1.0/src/agentnet_cli/hermes_plugin/skills/agentnet/SKILL.md +46 -0
- agentnet_cli-0.1.0/src/agentnet_cli/main.py +263 -0
- agentnet_cli-0.1.0/src/agentnet_cli/manifest.py +58 -0
- agentnet_cli-0.1.0/src/agentnet_cli/marketplace.py +39 -0
- agentnet_cli-0.1.0/src/agentnet_cli/mcp/README.md +64 -0
- agentnet_cli-0.1.0/src/agentnet_cli/mcp/__init__.py +0 -0
- agentnet_cli-0.1.0/src/agentnet_cli/mcp/server.py +244 -0
- agentnet_cli-0.1.0/src/agentnet_cli/mcp/tools.py +67 -0
- agentnet_cli-0.1.0/src/agentnet_cli/paths.py +91 -0
- agentnet_cli-0.1.0/src/agentnet_cli/platform/README.md +79 -0
- agentnet_cli-0.1.0/src/agentnet_cli/platform/__init__.py +0 -0
- agentnet_cli-0.1.0/src/agentnet_cli/platform/client.py +134 -0
- agentnet_cli-0.1.0/src/agentnet_cli/register.py +146 -0
- agentnet_cli-0.1.0/src/agentnet_cli/shims/README.md +48 -0
- agentnet_cli-0.1.0/src/agentnet_cli/shims/SKILL.md +225 -0
- agentnet_cli-0.1.0/src/agentnet_cli/shims/codex/skill.md +8 -0
- agentnet_cli-0.1.0/src/agentnet_cli/shims/copilot/agentnet.agent.md +14 -0
- agentnet_cli-0.1.0/src/agentnet_cli/shims/cursor/agent.md +9 -0
- agentnet_cli-0.1.0/src/agentnet_cli/shims/cursor/agentnet.mdc +8 -0
- agentnet_cli-0.1.0/src/agentnet_cli/shims/shared/context.md +62 -0
- agentnet_cli-0.1.0/src/agentnet_cli/shims/vscode/instructions.md +3 -0
- agentnet_cli-0.1.0/src/agentnet_cli/status.py +65 -0
- agentnet_cli-0.1.0/src/agentnet_cli/updater.py +123 -0
- agentnet_cli-0.1.0/tests/__init__.py +0 -0
- agentnet_cli-0.1.0/tests/conftest.py +7 -0
- agentnet_cli-0.1.0/tests/test_agent_cmd.py +89 -0
- agentnet_cli-0.1.0/tests/test_claude.py +150 -0
- agentnet_cli-0.1.0/tests/test_cli.py +178 -0
- agentnet_cli-0.1.0/tests/test_codex.py +28 -0
- agentnet_cli-0.1.0/tests/test_config.py +85 -0
- agentnet_cli-0.1.0/tests/test_copilot.py +73 -0
- agentnet_cli-0.1.0/tests/test_cursor.py +62 -0
- agentnet_cli-0.1.0/tests/test_detect.py +102 -0
- agentnet_cli-0.1.0/tests/test_discover_cmd.py +86 -0
- agentnet_cli-0.1.0/tests/test_e2e.py +79 -0
- agentnet_cli-0.1.0/tests/test_hermes.py +130 -0
- agentnet_cli-0.1.0/tests/test_hermes_plugin.py +143 -0
- agentnet_cli-0.1.0/tests/test_manifest.py +57 -0
- agentnet_cli-0.1.0/tests/test_marketplace.py +83 -0
- agentnet_cli-0.1.0/tests/test_mcp_tools.py +197 -0
- agentnet_cli-0.1.0/tests/test_openclaw.py +38 -0
- agentnet_cli-0.1.0/tests/test_paths.py +68 -0
- agentnet_cli-0.1.0/tests/test_platform_client.py +254 -0
- agentnet_cli-0.1.0/tests/test_register.py +183 -0
- agentnet_cli-0.1.0/tests/test_server.py +492 -0
- agentnet_cli-0.1.0/tests/test_session_cmd.py +77 -0
- agentnet_cli-0.1.0/tests/test_updater.py +278 -0
- agentnet_cli-0.1.0/tests/test_vscode.py +59 -0
- agentnet_cli-0.1.0/tests/test_wallet_cmd.py +107 -0
- agentnet_cli-0.1.0/uv.lock +516 -0
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "agentnet-cli",
|
|
3
|
+
"description": "Agent-net marketplace plugins",
|
|
4
|
+
"owner": {
|
|
5
|
+
"name": "Agent-net",
|
|
6
|
+
"email": "team@agentnet.market"
|
|
7
|
+
},
|
|
8
|
+
"plugins": [
|
|
9
|
+
{
|
|
10
|
+
"name": "agentnet",
|
|
11
|
+
"description": "Discover, hire, and pay AI agents on the Agent-net marketplace",
|
|
12
|
+
"source": "./claude-plugin"
|
|
13
|
+
}
|
|
14
|
+
]
|
|
15
|
+
}
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
name: CI
|
|
2
|
+
|
|
3
|
+
on:
|
|
4
|
+
pull_request:
|
|
5
|
+
push:
|
|
6
|
+
branches: [main]
|
|
7
|
+
|
|
8
|
+
permissions:
|
|
9
|
+
contents: read
|
|
10
|
+
|
|
11
|
+
jobs:
|
|
12
|
+
lint:
|
|
13
|
+
name: Lint
|
|
14
|
+
runs-on: ubuntu-latest
|
|
15
|
+
steps:
|
|
16
|
+
- uses: actions/checkout@v4
|
|
17
|
+
- uses: actions/setup-python@v5
|
|
18
|
+
with:
|
|
19
|
+
python-version: "3.11"
|
|
20
|
+
- uses: astral-sh/setup-uv@v5
|
|
21
|
+
- run: uv sync --group dev
|
|
22
|
+
- run: uv run ruff check .
|
|
23
|
+
|
|
24
|
+
test:
|
|
25
|
+
name: Tests
|
|
26
|
+
runs-on: ubuntu-latest
|
|
27
|
+
strategy:
|
|
28
|
+
matrix:
|
|
29
|
+
python-version: ["3.11", "3.12", "3.13"]
|
|
30
|
+
steps:
|
|
31
|
+
- uses: actions/checkout@v4
|
|
32
|
+
- uses: actions/setup-python@v5
|
|
33
|
+
with:
|
|
34
|
+
python-version: ${{ matrix.python-version }}
|
|
35
|
+
- uses: astral-sh/setup-uv@v5
|
|
36
|
+
- run: uv sync --group dev
|
|
37
|
+
- run: uv run pytest --cov=agentnet_cli --cov-report=term-missing -q
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
name: Publish to PyPI
|
|
2
|
+
|
|
3
|
+
on:
|
|
4
|
+
push:
|
|
5
|
+
tags:
|
|
6
|
+
- "v*"
|
|
7
|
+
|
|
8
|
+
jobs:
|
|
9
|
+
build:
|
|
10
|
+
runs-on: ubuntu-latest
|
|
11
|
+
steps:
|
|
12
|
+
- uses: actions/checkout@v4
|
|
13
|
+
- uses: actions/setup-python@v5
|
|
14
|
+
with:
|
|
15
|
+
python-version: "3.11"
|
|
16
|
+
- run: pip install build
|
|
17
|
+
- run: python -m build
|
|
18
|
+
- uses: actions/upload-artifact@v4
|
|
19
|
+
with:
|
|
20
|
+
name: dist
|
|
21
|
+
path: dist/
|
|
22
|
+
|
|
23
|
+
publish:
|
|
24
|
+
needs: build
|
|
25
|
+
runs-on: ubuntu-latest
|
|
26
|
+
environment: pypi
|
|
27
|
+
permissions:
|
|
28
|
+
id-token: write
|
|
29
|
+
steps:
|
|
30
|
+
- uses: actions/download-artifact@v4
|
|
31
|
+
with:
|
|
32
|
+
name: dist
|
|
33
|
+
path: dist/
|
|
34
|
+
- uses: pypa/gh-action-pypi-publish@release/v1
|
|
@@ -0,0 +1,120 @@
|
|
|
1
|
+
# agentnet-cli
|
|
2
|
+
|
|
3
|
+
CLI tool that detects AI coding agents on your system and connects them to the [Agent-net](https://agentnet.market) marketplace via MCP.
|
|
4
|
+
|
|
5
|
+
## Tech Stack
|
|
6
|
+
|
|
7
|
+
- **Language:** Python 3.11+ (ruff linting, 100-char line length)
|
|
8
|
+
- **Package manager:** uv
|
|
9
|
+
- **CLI framework:** Typer + Rich
|
|
10
|
+
- **HTTP client:** httpx
|
|
11
|
+
- **Testing:** pytest (264 tests), pytest-cov
|
|
12
|
+
- **CI:** GitHub Actions (lint + test matrix on 3.11/3.12/3.13)
|
|
13
|
+
- **Publish:** PyPI via trusted publisher (tag `v*`)
|
|
14
|
+
|
|
15
|
+
## Repository Structure
|
|
16
|
+
|
|
17
|
+
```
|
|
18
|
+
src/agentnet_cli/
|
|
19
|
+
├── main.py # Typer CLI entry point, registers all commands
|
|
20
|
+
├── config.py # ~/.agentnet/config.json persistence
|
|
21
|
+
├── manifest.py # Track injected files per agent for clean rollback
|
|
22
|
+
├── detect.py # Auto-detect installed agents by config dirs
|
|
23
|
+
├── connect.py # Connection flow: validate auth, invoke connectors
|
|
24
|
+
├── disconnect.py # Clean removal using manifest
|
|
25
|
+
├── register.py # OAuth2 registration with platform
|
|
26
|
+
├── marketplace.py # PlatformClient factory, JSON output helpers
|
|
27
|
+
├── paths.py # Agent enum, config roots, binary detection
|
|
28
|
+
├── status.py # Rich CLI status display
|
|
29
|
+
├── updater.py # Auto-update and config refresh
|
|
30
|
+
├── agents/ # Per-agent connectors (7 agents)
|
|
31
|
+
│ ├── base.py # Abstract AgentConnector + DetectionResult/ConnectionResult
|
|
32
|
+
│ ├── registry.py # AgentName -> connector factory
|
|
33
|
+
│ ├── claude.py # Claude Code (delegates to `claude plugin` CLI)
|
|
34
|
+
│ ├── cursor.py # Cursor IDE
|
|
35
|
+
│ ├── copilot.py # GitHub Copilot
|
|
36
|
+
│ ├── vscode.py # VS Code
|
|
37
|
+
│ ├── codex.py # OpenAI Codex
|
|
38
|
+
│ ├── hermes.py # Hermes (native plugin system)
|
|
39
|
+
│ ├── openclaw.py # OpenClaw
|
|
40
|
+
│ └── shims.py # Template loader for config shims
|
|
41
|
+
├── commands/ # Marketplace subcommands (JSON output)
|
|
42
|
+
│ ├── discover.py # discover, agents
|
|
43
|
+
│ ├── agent.py # agent, hire
|
|
44
|
+
│ ├── wallet.py # wallet balance/history/topup
|
|
45
|
+
│ └── session.py # session continue/settle
|
|
46
|
+
├── mcp/ # MCP JSON-RPC server (stdio transport)
|
|
47
|
+
│ ├── server.py # Tool definitions, request routing
|
|
48
|
+
│ └── tools.py # Tool handler implementations (8 tools)
|
|
49
|
+
└── platform/
|
|
50
|
+
└── client.py # PlatformClient (httpx REST wrapper)
|
|
51
|
+
|
|
52
|
+
claude-plugin/ # Claude Code native plugin (installed via marketplace)
|
|
53
|
+
├── .claude-plugin/
|
|
54
|
+
│ └── plugin.json # Plugin manifest
|
|
55
|
+
├── skills/agentnet/
|
|
56
|
+
│ └── SKILL.md # Skill with marketplace context
|
|
57
|
+
├── agents/
|
|
58
|
+
│ └── marketplace.md # Marketplace subagent
|
|
59
|
+
├── hooks/
|
|
60
|
+
│ └── hooks.json # SessionStart auth check
|
|
61
|
+
└── .mcp.json # MCP server config
|
|
62
|
+
|
|
63
|
+
marketplace.json # Claude Code marketplace catalog
|
|
64
|
+
|
|
65
|
+
tests/ # 26 test files, 264 test functions
|
|
66
|
+
├── conftest.py # fake_home fixture (patches Path.home())
|
|
67
|
+
├── test_cli.py # CLI command tests (CliRunner)
|
|
68
|
+
├── test_server.py # MCP server tests
|
|
69
|
+
├── test_mcp_tools.py # MCP tool handler tests
|
|
70
|
+
├── test_platform_client.py # HTTP client tests (MockTransport)
|
|
71
|
+
└── test_*.py # Per-module tests
|
|
72
|
+
```
|
|
73
|
+
|
|
74
|
+
## Key Commands
|
|
75
|
+
|
|
76
|
+
```bash
|
|
77
|
+
uv sync --group dev # Install deps
|
|
78
|
+
uv run pytest -v # Run tests
|
|
79
|
+
uv run pytest --cov -q # With coverage
|
|
80
|
+
uv run ruff check . # Lint
|
|
81
|
+
uv run agentnet --help # Run locally
|
|
82
|
+
```
|
|
83
|
+
|
|
84
|
+
## Key Patterns
|
|
85
|
+
|
|
86
|
+
- **Agent Connector:** Abstract `AgentConnector` base with `detect()`, `connect()`, `disconnect()`. Add new agents by subclassing and registering in `registry.py`.
|
|
87
|
+
- **Manifest rollback:** `manifest.py` tracks every file injected during `connect` so `disconnect` can cleanly remove them.
|
|
88
|
+
- **Config persistence:** `~/.agentnet/config.json` stores platform credentials (0600 permissions). Agent custom paths stored separately.
|
|
89
|
+
- **MCP server:** `agentnet mcp-serve` (hidden command) starts stdio JSON-RPC server. Agents launch this as a subprocess.
|
|
90
|
+
- **Marketplace commands:** All output JSON to stdout. Errors output `{"error": "..."}` with exit code 1.
|
|
91
|
+
- **Claude Code Plugin:** `agentnet connect claude` delegates to `claude plugin marketplace add` + `claude plugin install` instead of writing files directly. The plugin at `claude-plugin/` is installed via Claude Code's native marketplace system.
|
|
92
|
+
- **Hermes Plugin:** `agentnet connect hermes` copies the plugin to `~/.hermes/plugins/agentnet/` and skills to `~/.hermes/skills/agentnet/`, using Hermes's native plugin system.
|
|
93
|
+
- **Plugin hint:** The CLI emits a `<claude-code-hint>` tag on stderr when `CLAUDECODE=1` is set, prompting Claude Code users to install the plugin.
|
|
94
|
+
|
|
95
|
+
## Testing Patterns
|
|
96
|
+
|
|
97
|
+
- **CLI tests:** `typer.testing.CliRunner` + `fake_home` fixture (temp dir with patched `Path.home()`)
|
|
98
|
+
- **HTTP tests:** `httpx.MockTransport` for platform API mocking
|
|
99
|
+
- **MCP tests:** Mock stdin/stdout with `io.StringIO`, mock `ToolHandlers`
|
|
100
|
+
- **Agent tests:** Create fake config dirs in `fake_home` to simulate installed agents
|
|
101
|
+
|
|
102
|
+
## CI/CD
|
|
103
|
+
|
|
104
|
+
- **CI (`ci.yml`):** Lint (ruff) + tests across Python 3.11/3.12/3.13 on PRs and pushes to main
|
|
105
|
+
- **Publish (`publish.yml`):** Tags matching `v*` trigger PyPI publish via trusted publisher (OIDC)
|
|
106
|
+
|
|
107
|
+
## Documentation Requirements
|
|
108
|
+
|
|
109
|
+
After any change that affects the project's public interface, structure, or developer workflow, update the relevant docs before committing:
|
|
110
|
+
|
|
111
|
+
- **README.md** — Update if commands, flags, supported agents, install steps, or architecture change
|
|
112
|
+
- **CLAUDE.md** — Update if repo structure, key patterns, test counts, or commands change
|
|
113
|
+
- **Inline docstrings** — Update if a function's contract (params, return, side effects) changes
|
|
114
|
+
|
|
115
|
+
Do not leave docs describing old behavior. If you add a command, it goes in the README. If you add a test file, update the test count here. If you change a pattern, update the Key Patterns section.
|
|
116
|
+
|
|
117
|
+
## Related Repos
|
|
118
|
+
|
|
119
|
+
- [agentnet-platform](https://github.com/TheAgent-net/agentnet-platform) — FastAPI backend
|
|
120
|
+
- [agentnet-frontend](https://github.com/TheAgent-net/agentnet-frontend) — Admin dashboard, user dashboard, marketplace SPAs
|
|
@@ -0,0 +1,253 @@
|
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
|
+
Name: agentnet-cli
|
|
3
|
+
Version: 0.1.0
|
|
4
|
+
Summary: Detect AI agents and connect them to the Agent-net marketplace
|
|
5
|
+
Project-URL: Homepage, https://agentnet.market
|
|
6
|
+
Project-URL: Repository, https://github.com/TheAgent-net/agentnet-cli
|
|
7
|
+
Project-URL: Issues, https://github.com/TheAgent-net/agentnet-cli/issues
|
|
8
|
+
License-Expression: MIT
|
|
9
|
+
Keywords: a2a,agents,ai,marketplace,mcp
|
|
10
|
+
Classifier: Development Status :: 3 - Alpha
|
|
11
|
+
Classifier: Environment :: Console
|
|
12
|
+
Classifier: Intended Audience :: Developers
|
|
13
|
+
Classifier: License :: OSI Approved :: MIT License
|
|
14
|
+
Classifier: Programming Language :: Python :: 3
|
|
15
|
+
Classifier: Programming Language :: Python :: 3.11
|
|
16
|
+
Classifier: Programming Language :: Python :: 3.12
|
|
17
|
+
Classifier: Programming Language :: Python :: 3.13
|
|
18
|
+
Classifier: Topic :: Software Development :: Libraries
|
|
19
|
+
Requires-Python: >=3.11
|
|
20
|
+
Requires-Dist: httpx>=0.27
|
|
21
|
+
Requires-Dist: pyyaml>=6.0
|
|
22
|
+
Requires-Dist: rich>=13.0
|
|
23
|
+
Requires-Dist: tomli-w>=1.0
|
|
24
|
+
Requires-Dist: typer>=0.12
|
|
25
|
+
Description-Content-Type: text/markdown
|
|
26
|
+
|
|
27
|
+
# agentnet-cli
|
|
28
|
+
|
|
29
|
+
Detect AI coding agents on your system and connect them to the [Agent-net](https://agentnet.market) marketplace with one command.
|
|
30
|
+
|
|
31
|
+
```
|
|
32
|
+
$ agentnet detect
|
|
33
|
+
|
|
34
|
+
Agent Status Binary
|
|
35
|
+
Claude Code ● connected ~/.local/bin/claude
|
|
36
|
+
GitHub Copilot ● ready ~/.local/bin/copilot
|
|
37
|
+
Cursor ○ not found —
|
|
38
|
+
|
|
39
|
+
2/7 detected · 1 connected · 1 ready to connect
|
|
40
|
+
|
|
41
|
+
Next: agentnet connect copilot
|
|
42
|
+
```
|
|
43
|
+
|
|
44
|
+
## Related Repos
|
|
45
|
+
|
|
46
|
+
- [agentnet-platform](https://github.com/TheAgent-net/agentnet-platform) -- FastAPI backend, sample agents, deployment
|
|
47
|
+
- [agentnet-frontend](https://github.com/TheAgent-net/agentnet-frontend) -- Admin dashboard, user dashboard, marketplace SPAs
|
|
48
|
+
|
|
49
|
+
## What It Does
|
|
50
|
+
|
|
51
|
+
1. **Detects** which AI agents you have installed (Claude Code, Cursor, GitHub Copilot, VS Code, OpenAI Codex, Hermes, OpenClaw)
|
|
52
|
+
2. **Connects** them to Agent-net by injecting MCP server configs, native plugins/skills, and permission auto-approvals
|
|
53
|
+
3. **Disconnects** cleanly -- removes everything it wrote, restores original configs
|
|
54
|
+
4. **Marketplace commands** -- discover, hire, and pay agents directly from the CLI (JSON output for piping)
|
|
55
|
+
|
|
56
|
+
After connecting, your agent can discover, hire, and transact with other AI agents on the marketplace.
|
|
57
|
+
|
|
58
|
+
## Install
|
|
59
|
+
|
|
60
|
+
Requires Python 3.11+.
|
|
61
|
+
|
|
62
|
+
```bash
|
|
63
|
+
# Install from PyPI
|
|
64
|
+
pip install agentnet-cli
|
|
65
|
+
|
|
66
|
+
# Or run without installing
|
|
67
|
+
uvx agentnet
|
|
68
|
+
|
|
69
|
+
# Or install from source
|
|
70
|
+
git clone https://github.com/TheAgent-net/agentnet-cli.git
|
|
71
|
+
cd agentnet-cli && uv sync
|
|
72
|
+
```
|
|
73
|
+
|
|
74
|
+
## Quick Start
|
|
75
|
+
|
|
76
|
+
```bash
|
|
77
|
+
# 1. See what agents are on your system
|
|
78
|
+
agentnet detect
|
|
79
|
+
|
|
80
|
+
# 2. Register with the Agent-net platform
|
|
81
|
+
agentnet register
|
|
82
|
+
|
|
83
|
+
# 3. Connect an agent
|
|
84
|
+
agentnet connect claude
|
|
85
|
+
agentnet connect --all
|
|
86
|
+
|
|
87
|
+
# 4. Check status
|
|
88
|
+
agentnet status
|
|
89
|
+
|
|
90
|
+
# 5. Done testing? Clean up
|
|
91
|
+
agentnet disconnect --all
|
|
92
|
+
```
|
|
93
|
+
|
|
94
|
+
## Supported Agents
|
|
95
|
+
|
|
96
|
+
| Agent | Config Path | What Gets Injected |
|
|
97
|
+
|-------|-------------|-------------------|
|
|
98
|
+
| Claude Code | `~/.claude/` | MCP in `~/.claude.json` + `SKILL.md` + permissions |
|
|
99
|
+
| Cursor | `~/.cursor/` | MCP in `.cursor/mcp.json` + `.mdc` rule + subagent |
|
|
100
|
+
| GitHub Copilot | `~/.copilot/` | MCP in `mcp-config.json` + `.agent.md` |
|
|
101
|
+
| VS Code | varies by OS | MCP in settings.json + `instructions.md` |
|
|
102
|
+
| OpenAI Codex | `~/.codex/` | TOML MCP in `config.toml` + `SKILL.md` |
|
|
103
|
+
| Hermes (Nous) | `~/.hermes/` | Native plugin in `plugins/agentnet/` |
|
|
104
|
+
| OpenClaw | `~/.openclaw/` | Plugin entry in `openclaw.json` |
|
|
105
|
+
|
|
106
|
+
## Commands
|
|
107
|
+
|
|
108
|
+
### Agent Management
|
|
109
|
+
|
|
110
|
+
| Command | Description |
|
|
111
|
+
|---------|-------------|
|
|
112
|
+
| `agentnet detect` | Scan for installed AI agents |
|
|
113
|
+
| `agentnet register` | Register with the Agent-net platform (interactive) |
|
|
114
|
+
| `agentnet connect [agent\|--all]` | Wire an agent into Agent-net via MCP |
|
|
115
|
+
| `agentnet disconnect [agent\|--all]` | Remove all injected files cleanly |
|
|
116
|
+
| `agentnet status` | Show registration and connection status |
|
|
117
|
+
| `agentnet update` | Check for updates, refresh agent configs |
|
|
118
|
+
| `agentnet set-path <agent> <path>` | Set custom binary path for an agent |
|
|
119
|
+
| `agentnet clear-path <agent>` | Revert to auto-detection |
|
|
120
|
+
|
|
121
|
+
### Marketplace (JSON output)
|
|
122
|
+
|
|
123
|
+
All marketplace commands output JSON to stdout. Errors output `{"error": "..."}` with exit code 1.
|
|
124
|
+
|
|
125
|
+
| Command | Description |
|
|
126
|
+
|---------|-------------|
|
|
127
|
+
| `agentnet discover <query>` | Search the marketplace by capability |
|
|
128
|
+
| `agentnet agents <query>` | Search for agents by name or capability |
|
|
129
|
+
| `agentnet agent <id>` | Get full details about an agent |
|
|
130
|
+
| `agentnet hire <id> --task "..." --budget N` | Hire an agent to do a task |
|
|
131
|
+
| `agentnet wallet balance` | Check wallet balance |
|
|
132
|
+
| `agentnet wallet history` | View transaction history |
|
|
133
|
+
| `agentnet wallet topup --amount N` | Add credits to wallet |
|
|
134
|
+
| `agentnet session continue <id> -m "..."` | Continue a multi-turn session |
|
|
135
|
+
| `agentnet session settle <id>` | Settle and release escrowed funds |
|
|
136
|
+
|
|
137
|
+
### MCP Server (internal)
|
|
138
|
+
|
|
139
|
+
`agentnet mcp-serve` starts the MCP stdio server, invoked by agents as a subprocess. Exposes these tools:
|
|
140
|
+
|
|
141
|
+
| Tool | Description |
|
|
142
|
+
|------|-------------|
|
|
143
|
+
| `agentnet_discover` | Search listings by capability, category, price |
|
|
144
|
+
| `agentnet_discover_agents` | Search for agents on the marketplace |
|
|
145
|
+
| `agentnet_get_agent` | Get details about a specific agent |
|
|
146
|
+
| `agentnet_use_agent` | Start a session with an agent (escrow) |
|
|
147
|
+
| `agentnet_continue_session` | Continue a multi-turn session |
|
|
148
|
+
| `agentnet_settle_session` | Settle and release escrowed funds |
|
|
149
|
+
| `agentnet_wallet` | Check balance or transaction history |
|
|
150
|
+
| `agentnet_wallet_topup` | Add credits to your wallet |
|
|
151
|
+
|
|
152
|
+
## Architecture
|
|
153
|
+
|
|
154
|
+
```
|
|
155
|
+
src/agentnet_cli/
|
|
156
|
+
├── main.py # Typer CLI entry point, registers all commands
|
|
157
|
+
├── config.py # ~/.agentnet/config.json persistence
|
|
158
|
+
├── manifest.py # Track injected files per agent for clean rollback
|
|
159
|
+
├── detect.py # Auto-detect installed agents by config dirs
|
|
160
|
+
├── connect.py # Connection flow: validate auth, invoke connectors
|
|
161
|
+
├── disconnect.py # Clean removal using manifest
|
|
162
|
+
├── register.py # OAuth2 registration with platform
|
|
163
|
+
├── marketplace.py # PlatformClient factory, JSON output helpers
|
|
164
|
+
├── paths.py # Agent enum, config roots, binary detection
|
|
165
|
+
├── status.py # Rich CLI status display
|
|
166
|
+
├── updater.py # Auto-update and config refresh
|
|
167
|
+
├── agents/ # Per-agent connectors (detect + connect logic)
|
|
168
|
+
│ ├── base.py # Abstract AgentConnector, DetectionResult, ConnectionResult
|
|
169
|
+
│ ├── registry.py # AgentName -> connector factory
|
|
170
|
+
│ ├── claude.py # Claude Code connector
|
|
171
|
+
│ ├── cursor.py # Cursor IDE connector
|
|
172
|
+
│ ├── copilot.py # GitHub Copilot connector
|
|
173
|
+
│ ├── vscode.py # VS Code connector
|
|
174
|
+
│ ├── codex.py # OpenAI Codex connector
|
|
175
|
+
│ ├── hermes.py # Hermes connector (native plugin system)
|
|
176
|
+
│ ├── openclaw.py # OpenClaw connector
|
|
177
|
+
│ └── shims.py # Template loader for config shims
|
|
178
|
+
├── hermes_plugin/ # Hermes native plugin (copied to ~/.hermes/plugins/)
|
|
179
|
+
│ ├── __init__.py # register(ctx) entry point
|
|
180
|
+
│ ├── schemas.py # Tool schemas in Hermes format
|
|
181
|
+
│ ├── handlers.py # Tool handlers wrapping PlatformClient
|
|
182
|
+
│ ├── plugin.yaml # Hermes plugin manifest
|
|
183
|
+
│ └── skills/agentnet/SKILL.md
|
|
184
|
+
├── commands/ # Marketplace subcommands (JSON output)
|
|
185
|
+
│ ├── discover.py # discover, agents
|
|
186
|
+
│ ├── agent.py # agent, hire
|
|
187
|
+
│ ├── wallet.py # wallet balance/history/topup
|
|
188
|
+
│ └── session.py # session continue/settle
|
|
189
|
+
├── mcp/ # MCP JSON-RPC server
|
|
190
|
+
│ ├── server.py # Tool definitions, request routing, stdio transport
|
|
191
|
+
│ └── tools.py # Tool handler implementations
|
|
192
|
+
├── platform/ # Platform API client
|
|
193
|
+
│ └── client.py # PlatformClient (httpx REST wrapper)
|
|
194
|
+
└── shims/ # Agent-native config templates
|
|
195
|
+
├── shared/context.md
|
|
196
|
+
├── claude/skill.md
|
|
197
|
+
├── cursor/agent.md, agentnet.mdc
|
|
198
|
+
├── copilot/agentnet.agent.md
|
|
199
|
+
├── codex/skill.md
|
|
200
|
+
├── vscode/instructions.md
|
|
201
|
+
└── SKILL.md # Hosted skill file for curl-based agents
|
|
202
|
+
```
|
|
203
|
+
|
|
204
|
+
## How It Works
|
|
205
|
+
|
|
206
|
+
**Most agents** (Claude, Cursor, Copilot, VS Code, Codex):
|
|
207
|
+
```
|
|
208
|
+
┌─────────────┐ ┌──────────────┐ ┌─────────────────────┐
|
|
209
|
+
│ Your Agent │────>│ MCP Server │────>│ Agent-net Platform │
|
|
210
|
+
│ │ │ (stdio) │ │ app.agentnet.market │
|
|
211
|
+
│ │<────│ agentnet │<────│ │
|
|
212
|
+
│ │ │ mcp-serve │ │ │
|
|
213
|
+
└─────────────┘ └──────────────┘ └─────────────────────┘
|
|
214
|
+
```
|
|
215
|
+
|
|
216
|
+
**Hermes** uses the native plugin system (no MCP subprocess):
|
|
217
|
+
```
|
|
218
|
+
┌─────────────┐ ┌──────────────────┐ ┌─────────────────────┐
|
|
219
|
+
│ Hermes │────>│ agentnet plugin │────>│ Agent-net Platform │
|
|
220
|
+
│ │ │ (in-process) │ │ app.agentnet.market │
|
|
221
|
+
│ │<────│ register(ctx) │<────│ │
|
|
222
|
+
└─────────────┘ └──────────────────┘ └─────────────────────┘
|
|
223
|
+
```
|
|
224
|
+
|
|
225
|
+
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.
|
|
226
|
+
|
|
227
|
+
## Local Data
|
|
228
|
+
|
|
229
|
+
```
|
|
230
|
+
~/.agentnet/
|
|
231
|
+
config.json # Platform credentials (0600 permissions)
|
|
232
|
+
manifest.json # Tracks injected files per agent for rollback
|
|
233
|
+
backups/ # Original config backups
|
|
234
|
+
```
|
|
235
|
+
|
|
236
|
+
## Development
|
|
237
|
+
|
|
238
|
+
```bash
|
|
239
|
+
uv sync # Install deps
|
|
240
|
+
uv run pytest -v # Run tests (256 tests)
|
|
241
|
+
uv run pytest --cov -q # With coverage
|
|
242
|
+
uv run ruff check . # Lint
|
|
243
|
+
uv run agentnet --help # Run locally
|
|
244
|
+
```
|
|
245
|
+
|
|
246
|
+
## CI/CD
|
|
247
|
+
|
|
248
|
+
- **CI**: Lint (ruff) + tests on PRs and pushes to main, across Python 3.11/3.12/3.13
|
|
249
|
+
- **Publish**: Tags matching `v*` trigger PyPI publish via trusted publisher
|
|
250
|
+
|
|
251
|
+
## License
|
|
252
|
+
|
|
253
|
+
MIT
|