@item-linker/cli
v0.1.6
Published
agentforce CLI for Linker Agent Factory (Agent-first, JSON-native)
Readme
@item-linker/cli
agentforce — the command-line client for Linker Agent.
Manage agents, models, skills, channels, sessions, and more — from your terminal or from any LLM Agent (Claude Code, Cursor, etc.).
Agent-first design — 99% of calls come from LLM Agents, 1% from humans doing initial setup. Every design decision prioritizes stable, parseable output:
- JSON by default — add
--humanfor ASCII tables- NDJSON for lists — one JSON object per line, stream-friendly
- Errors on stderr — structured
{"error": "...", "code": N}with deterministic exit codes- No TUI, no spinners, no ANSI colors — pure data, always
Install
npm install -g @item-linker/cliRequires Node.js >= 20.
Quick Start
# 1. Login with your API Key (create one from the web dashboard)
agentforce auth login --token laf_xxxxx
# 2. Verify identity
agentforce auth whoami
# 3. List your agents
agentforce agent list
# 4. Chat with an agent
agentforce agent chat <agent-id> --message "Hello!"Authentication
Credentials are stored in ~/.agentforce/config.json (mode 0600).
agentforce auth login --token laf_xxxxx # Login (validates token before saving)
agentforce auth whoami # Check current identity
agentforce auth logout # Remove local credentialsEnvironment variables (for CI/CD):
| Variable | Description |
|---|---|
| AGENTFORCE_TOKEN | API Key — overrides config file |
| AGENTFORCE_API_URL | API base URL — overrides config file |
Resolution order: env var > config file > default (https://agents.item.pub).
Override the API URL at login time for custom deployments:
agentforce auth login --token laf_xxxxx --api-url https://your-instance.example.comCommands
Agent Management
agentforce agent list # List all agents (NDJSON)
agentforce agent list --human # List all agents (table)
agentforce agent get <id> # Get agent summary
agentforce agent get <id> --full # Get full agent config (YAML-ready)
agentforce agent apply -f agent.yaml # Create or update agent from file
agentforce agent apply -f - # Create or update from stdin
agentforce agent delete <id> # Delete an agent
agentforce agent duplicate <id> # Duplicate an agentDeclarative workflow — export, edit, re-apply:
agentforce agent get <id> --full > my-agent.yaml
# ... edit my-agent.yaml ...
agentforce agent apply -f my-agent.yamlChat
# Single message
agentforce agent chat <id> --message "Summarize today's tickets"
# Pipe from stdin
echo '{"text":"Hello"}' | agentforce agent chat <id>
# Resume a session
agentforce agent chat <id> --session <session-id> --message "Follow up"Chat output is streamed as NDJSON — each event is a separate JSON line.
Sessions
agentforce agent session list <agent-id> # List sessions
agentforce agent session get <session-id> # Get session details
agentforce agent session create <agent-id> # Create a new session
agentforce agent session messages <session-id> # Get message history
agentforce agent session files <session-id> # List workspace files
agentforce agent session upload <session-id> <file> # Upload file to session
agentforce agent session delete <session-id> # Delete a session
agentforce agent session clear <session-id> # Clear session messagesAgent Memory
agentforce agent memory tree <agent-id> # List memory files
agentforce agent memory get <agent-id> <path> # Read a memory file
agentforce agent memory set <agent-id> <path> <content> # Write a memory file
agentforce agent memory delete <agent-id> <path> # Delete a memory fileScheduled Tasks
agentforce agent task list <agent-id> # List scheduled tasks
agentforce agent task get <task-id> # Get task details
agentforce agent task apply -f task.yaml # Create or update a task
agentforce agent task delete <task-id> # Delete a task
agentforce agent task pause <task-id> # Pause a task
agentforce agent task resume <task-id> # Resume a task
agentforce agent task trigger <task-id> # Trigger immediate execution
agentforce agent task executions <task-id> # View execution historyGit Repositories
agentforce agent git clone <agent-id> # Clone the agent's git repo
agentforce agent git sync <agent-id> # Sync (pull latest)
agentforce agent git probe <agent-id> # Probe repo statusModels & Providers
# Browse available models
agentforce model list # List all models across providers
agentforce model get <model-id> # Find which providers host a model
# Manage model providers
agentforce model-provider list # List providers
agentforce model-provider get <id> # Get provider details
agentforce model-provider apply -f prov.yaml # Create or update from file
agentforce model-provider create --name ... --type ... --base-url ... --api-key ...
agentforce model-provider delete <id>
agentforce model-provider test <id> # Test connectivity (SSE streaming)
agentforce model-provider usage <id> # Token usage summary
agentforce model-provider usage-detail <id> # Per-model usage breakdownSkills
agentforce skills list # List skill registries
agentforce skills get <id> # Get registry details
agentforce skills delete <id> # Delete a registry
agentforce skills sync <id> # Force sync
agentforce skills list-registry-skills <id> # List skills in a registry
agentforce skills upload <path> # Upload local skills
agentforce skills import --url <git-url> # Import git-based registry
agentforce skills update <id> --branch main # Update registry settingsChannels
agentforce channel list # List channels
agentforce channel get <id> # Get channel details
agentforce channel apply -f ch.yaml # Create or update from file
agentforce channel delete <id>
agentforce channel start <id> # Start a channel
agentforce channel stop <id> # Stop a channel
agentforce channel status <id> # Get runtime status
agentforce channel statuses # Get all channel statuses
# Platform-specific creation
agentforce channel create-weixin # WeChat channel (QR scan)
agentforce channel create-wework # WeCom bot channel
agentforce channel create-wework-app # WeCom app channelAPI Keys
agentforce api-key list # List API keys
agentforce api-key create --name "CI" # Create a new key (shown once)
agentforce api-key revoke <id> # Revoke a keyKnowledge Base
agentforce kb list # List knowledge bases
agentforce kb create --name "Docs" # Create a knowledge base
agentforce kb delete <id>
agentforce kb upload <id> file1.pdf file2.md # Upload documents
agentforce kb docs <id> # List documents (with status)
agentforce kb doc-delete <kb-id> <doc-id> # Delete a document
agentforce kb search <id> "query text" # Semantic searchMCP Marketplace (Composio)
agentforce mcp-marketplace apps # List available MCP apps
agentforce mcp-marketplace categories # List app categories
agentforce mcp-marketplace tools <app-slug> # List tools for an app
agentforce mcp-marketplace refresh-tools <slug> # Refresh tools cache
agentforce mcp-marketplace connections # List connected apps
agentforce mcp-marketplace available # Connections with MCP URLs
agentforce mcp-marketplace connect --app <slug> --api-key <key>
agentforce mcp-marketplace oauth-connect --app <slug>
agentforce mcp-marketplace no-auth-connect --app <slug>
agentforce mcp-marketplace disconnect <id>
agentforce mcp-marketplace rename <id> --alias newPlugin Marketplaces
agentforce plugin-marketplace list
agentforce plugin-marketplace get <id>
agentforce plugin-marketplace apply -f ...
agentforce plugin-marketplace create --name ... --url ...
agentforce plugin-marketplace delete <id>
agentforce plugin-marketplace sync <id> # Force syncBrowser Profiles
agentforce browser-profile list
agentforce browser-profile get <id>
agentforce browser-profile apply -f ...
agentforce browser-profile delete <id>
agentforce browser-profile start <id> # Start browser instance
agentforce browser-profile stop <id> # Stop browser instanceDashboard & Monitoring
agentforce dashboard # Organization overview (KPI, tokens, costs)
agentforce monitoring sessions # List active sessions
agentforce monitoring stop-session <id> # Force stop a session
agentforce monitoring health # Health checkOutput Format
JSON (default)
Single objects:
{"id":"abc-123","name":"My Agent","model":"claude-sonnet-4-6"}NDJSON (lists)
One JSON object per line (Newline Delimited JSON):
{"id":"abc-123","name":"Agent A","model":"claude-sonnet-4-6"}
{"id":"def-456","name":"Agent B","model":"gpt-5.4"}Human-readable (--human)
+--------+---------+------------------+
| id | name | model |
+--------+---------+------------------+
| abc-123| Agent A | claude-sonnet-4-6|
| def-456| Agent B | gpt-5.4 |
+--------+---------+------------------+Errors (stderr)
{"error":"Not authenticated. Run: agentforce auth login --token laf_xxx","code":3}Exit Codes
| Code | Name | Meaning |
|------|------|---------|
| 0 | OK | Success |
| 1 | GENERIC | General error |
| 2 | USAGE | Invalid arguments or input |
| 3 | AUTH | Authentication failed — token missing, invalid, or expired |
| 4 | NETWORK | Network error — cannot reach the server |
| 5 | NOT_FOUND | Resource not found (HTTP 404) |
| 6 | CONFLICT | Resource conflict (HTTP 409) |
LLM Agent Integration
This CLI is designed as a tool for LLM agents like Claude Code. Tips:
- Use default JSON output (no
--human) for reliable parsing - Parse NDJSON line by line for list commands
- Check exit codes to determine error categories
- Use
AGENTFORCE_TOKENenv var instead ofauth loginin automated environments
License
Proprietary. Copyright (c) Item Linker.
