AgentLink CLI
Local runtime connector for AgentLink. It runs on the machine that owns the workspace and agent runtimes, connects to the server over HTTP/WebSocket, executes connector RPC locally, and uploads normalized runtime/session state back to the backend.
Layout
connector/
claude/ Claude Code discovery, adapter, reducer, and transcript logic
codex/ Codex app-server discovery, RPC, adapter, and reducer logic
local/ Local filesystem, shell, and terminal backends
cli.py agentlink-cli CLI
runtime.py Connector config, auth, WebSocket loop, and RPC dispatch
tests/ Connector tests
pyproject.toml Connector dependencies and console script
run.sh Local helper for saved-config startup
Run
Install dependencies:
uv sync
Start with explicit credentials from the web pairing flow:
uvx agentlink-cli@latest start \
--server-url http://127.0.0.1:8000 \
--connector-id conn_xxx \
--connector-token cxt_xxx
Passing a connector token on the command line can store it in shell history. For persistent installations, prefer a saved config or the environment variables listed below.
Or save the config locally and start without arguments:
uvx agentlink-cli@latest configure \
--server-url http://127.0.0.1:8000 \
--connector-id conn_xxx \
--connector-token cxt_xxx
uvx agentlink-cli@latest start
The default config path is ~/.agent-server/connector.json. Override it with
--config or AGENT_CONNECTOR_CONFIG.
Runtime Discovery
The connector discovers Codex and Claude locally and reports attached runtime
capabilities to the server. If a runtime is not on PATH, set one of:
CODEX_BIN=/path/to/codex
CLAUDE_BIN=/path/to/claude
The connector uses local runtime credentials and local filesystem permissions. AgentLink does not proxy Claude or Codex account credentials.
Custom Codex launch commands may name an executable or a bash/zsh alias or
function from the Connector user's interactive shell configuration. For
example, after defining this in ~/.bashrc or ~/.zshrc:
alias codex-api='CODEX_HOME="$HOME/.codex-api" codex'
enter codex-api as the custom launch command in AgentLink. Arguments are
passed without shell re-evaluation, and AgentLink still rejects pipelines,
redirects, command lists, and multiline commands. Shell aliases and functions
are supported on Linux and macOS with bash or zsh; Windows custom commands must
resolve to an executable or a supported script file.
Local Operations
The server can ask an online connector to perform local work:
- read/list/write files inside workspace-safe roots
- upload/download file content through the server
- run one-shot shell commands
- start and wait for shell tasks
- create, write, resize, stream, list, and close interactive terminals
- start, interrupt, sync, and approve runtime turns
Environment
| Variable | Purpose |
|---|---|
AGENT_CONNECTOR_CONFIG |
Connector config path. |
AGENT_SERVER_URL |
Server URL used when --server-url is omitted. |
AGENT_CONNECTOR_ID |
Connector id used when --connector-id is omitted. |
AGENT_CONNECTOR_TOKEN |
Connector token used when --connector-token is omitted. |
AGENT_CONNECTOR_ATTACHMENTS_ROOT |
Runtime attachment download directory. Defaults to ~/.agent-link/attachments. |
CODEX_BIN |
Explicit Codex CLI/app-server path. |
CLAUDE_BIN |
Explicit Claude Code CLI path. |
Verify
uv run ruff check connector tests
uv run pytest -q
Release
Releases are published to PyPI by .github/workflows/publish-agentlink-cli.yml
when a GitHub Release is published. The release tag must match the package
version with a v prefix, for example v0.1.0.
Before the first release, create a GitHub Environment named pypi, then add a
pending trusted publisher in PyPI with these values:
| Field | Value |
|---|---|
| PyPI project name | agentlink-cli |
| GitHub owner | zhoujun0601 |
| GitHub repository | AgentLink |
| Workflow filename | publish-agentlink-cli.yml |
| Environment name | pypi |
The workflow tests the connector, validates the tag and distribution metadata, checks the wheel contents and CLI entry point, and publishes through OIDC without a long-lived PyPI token.
Metadata
Release files for agentlink-cli 0.1.5
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | |
|---|---|---|---|---|
| agentlink_cli-0.1.5.tar.gz | 205.8 kB | With provenance | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| agentlink_cli-0.1.5-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 338.6 kB
Release files / agentlink_cli-0.1.5.tar.gz
| Download URL | agentlink_cli-0.1.5.tar.gz |
|---|---|
| Size | 205.8 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
54ac7546552dc7d3f98cfaf25b16c8ed21b9569223d9e08f942fe7325e8ca951
|
|
BLAKE2b-256 checksum How to use checksums |
c47cd3b989d4d33d027032f08445f88ec7b10c1629a931c44eb771af3933b850
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Aug 25, 2026.
Transparency logRelease files / agentlink_cli-0.1.5-py3-none-any.whl
| Download URL | agentlink_cli-0.1.5-py3-none-any.whl |
|---|---|
| Size | 132.8 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
881a287f69e6a8482c0b79405a14294f4b866bde25eb2989b9482082c5c93713
|
|
BLAKE2b-256 checksum How to use checksums |
6bca88ad09b022cd008baef4546910bb3ac1df580e26f5be483b555cda983ed8
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Aug 25, 2026.
Transparency logSecurity for agentlink-cli 0.1.5
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
Full provenance
All 2 files in this release have been uploaded with provenance metadata.
Attestation for agentlink_cli-0.1.5.tar.gz
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Aug 25, 2026.
Transparency logA note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.