Skip to main content

CLI and SDK for DavyBot Market - AI Agent Resources

Project description

DavyBot Market - CLI & SDK

Unified CLI and Python SDK for DavyBot Market - AI Agent Resources.

Installation

Using uv (Recommended)

# Install from source
cd davybot-market-cli
uv sync

# Run CLI
uv run python -m davybot_market_cli.cli --help

Using pip

pip install davybot-market-cli

Or install from source:

cd davybot-market-cli
pip install -e .

Configuration

Environment Variables

  • DAVYBOT_API_URL: API base URL (default: http://localhost:8000/api/v1)
  • DAVYBOT_API_KEY: API key for authentication

Example Configuration

# For local development
export DAVYBOT_API_URL="http://localhost:9410/api/v1"

# For production server
export DAVYBOT_API_URL="http://www.davybot.com/market/api/v1"

CLI Usage

Note: The CLI is available as both davy-market (primary command) and dawei-market (alias). Both commands work identically.

Search Resources

# Search all resources
davy-market search "web scraping"

# Filter by type (skill, agent, mcp, knowledge)
davy-market search "agent" --type agent

# Limit results
davy-market search "data" --limit 10

# JSON output
davy-market search "ml" --output json

View Resource Info

# Get resource details (must use full resource URI)
davy-market info skill://github.com/anthropics/skills/skills/webapp-testing

# JSON output
davy-market info skill://github.com/user/repo/skill-name --output json

Important: Resource URIs must use the full format:

  • skill://<full-resource-id>
  • agent://<full-resource-id>
  • mcp://<full-resource-id>
  • knowledge://<full-resource-id>

Example full resource IDs:

  • skill://github.com/anthropics/skills/skills/webapp-testing
  • agent://davybot.com/patent-team/patent-engineer
  • mcp://github.com/modelcontextprotocol/servers/git

Install Resources

# Install from marketplace (must use full resource URI)
davy-market install skill://github.com/anthropics/skills/skills/webapp-testing

# Install to specific directory
davy-market install agent://davybot.com/patent-team --output ./my-agents

# Install by full resource ID
davy-market install github.com/anthropics/skills/skills/webapp-testing

External Protocol Support

The CLI supports multiple installation protocols beyond the marketplace:

# Local filesystem path
davy-market install skill@/path/to/skill --output ./my-skills

# HTTP/HTTPS URL (downloads and extracts zip files)
davy-market install skill@http://server_url/skill.zip --output ./skills
davy-market install agent@https://example.com/agent.zip

# Git repository (clones and installs)
davy-market install plugin@git@github.com:user/repo.git/plugin_dir --output ./plugins

# Git repository with specific branch
davy-market install skill@git@github.com:user/repo.git --branch main

# File protocol (local or network file shares)
davy-market install agent@file://server/share/agent_dir --output ./agents

Supported Protocols:

  • local - Local filesystem paths
  • http/https - Download from web servers
  • git - Clone from Git repositories
  • file - File protocol for network shares

Publish Resources

# Publish a skill
davy-market publish skill ./my-skill --name "web-scraper" --description "Scrapes web data"

# Publish with tags
davy-market publish agent ./my-agent --name "data-analyst" --tag data --tag ml

# Publish with metadata
davy-market publish skill ./skill --name "my-skill" --metadata metadata.json

Plugin Management

# List installed plugins in workspace
davy-market plugin list --workspace /path/to/workspace

# Filter by type
davy-market plugin list --workspace /path/to/workspace --type plugin

# Table output format
davy-market plugin list --workspace /path/to/workspace --output table

Health Check

# Check API status
davy-market health

Python SDK Usage

Basic Usage

from davybot_market_cli import DavybotMarketClient

# Initialize client
with DavybotMarketClient() as client:
    # Check API health
    health = client.health()
    print(f"API Status: {health['status']}")

    # Search for resources
    results = client.search("web scraping")
    print(f"Found {results['total']} resources")

    # List all skills
    skills = client.list_skills()
    for skill in skills['items']:
        print(f"- {skill['name']}: {skill['description']}")

    # Get specific resource
    skill = client.get_skill("skill-id-here")
    print(f"Skill: {skill['name']} v{skill['version']}")

    # Download a resource
    client.download("skill", "skill-id", "./downloads")

Async Usage

import asyncio
from davybot_market_cli import DavybotMarketClient

async def main():
    async with DavybotMarketClient() as client:
        # Search resources
        results = await client.search("machine learning")
        print(f"Found {results['total']} results")

asyncio.run(main())

Create Resources

with DavybotMarketClient() as client:
    # Create a skill
    skill = client.create_skill(
        name="web-scraper",
        description="Scrapes web data efficiently",
        files={
            "scraper.py": "# Your scraper code here",
            "config.json": '{"timeout": 30}',
        },
        tags=["web", "scraping", "data"],
        author="Your Name"
    )
    print(f"Created skill with ID: {skill['id']}")

Download Resources

with DavybotMarketClient() as client:
    # Download to specific directory
    client.download("skill", "skill-id", "./my-skills")

    # Download with specific format
    client.download("agent", "agent-id", "./agents", format="python")

    # Download specific version
    client.download("skill", "skill-id", "./skills", version="2.0.0")

Ratings and Reviews

with DavybotMarketClient() as client:
    # Rate a resource
    client.rate_resource("resource-id", score=5, comment="Excellent!")

    # Get all ratings
    ratings = client.get_resource_ratings("resource-id")

    # Get average rating
    avg = client.get_average_rating("resource-id")
    print(f"Average: {avg['average_rating']} ({avg['total_ratings']} ratings)")

Client Options

# Custom API URL
client = DavybotMarketClient(base_url="https://api.market.davybot.ai/api/v1")

# With API key
client = DavybotMarketClient(api_key="your-api-key")

# With custom timeout
client = DavybotMarketClient(timeout=60.0)

# Disable SSL verification (not recommended for production)
client = DavybotMarketClient(verify_ssl=False)

Commands Reference

Command Description
davy-market search QUERY Search for resources
davy-market info RESOURCE_URI View resource details
davy-market install RESOURCE_URI Install a resource
davy-market publish TYPE PATH Publish a new resource
davy-market plugin list --workspace PATH List installed plugins
davy-market health Check API health
davy-market --help Show help message
davy-market --version Show version

Examples

Complete CLI Workflow

# Configure API URL
export DAVYBOT_API_URL="http://www.davybot.com/market/api/v1"

# Search for a skill
davy-market search "web testing" --type skill

# View details
davy-market info skill://github.com/anthropics/skills/skills/webapp-testing

# Install
davy-market install skill://github.com/anthropics/skills/skills/webapp-testing --output ./skills

Publishing a New Skill

# Create your skill
mkdir my-skill
cd my-skill

# Create skill.py
cat > skill.py << 'EOF'
def execute(input_data):
    """Execute the skill."""
    return {"result": "success"}
EOF

# Publish to market
davy-market publish skill . --name "my-skill" --description "My awesome skill"

Python SDK Integration

from davybot_market_cli import DavybotMarketClient

# Integrate into your application
def find_and_download_skill(query: str, output_dir: str):
    with DavybotMarketClient() as client:
        # Search
        results = client.search(query, resource_type="skill", limit=1)
        if not results['results']:
            print("No skills found")
            return

        skill = results['results'][0]
        print(f"Found: {skill['name']}")

        # Download
        client.download("skill", skill['id'], output_dir)
        print(f"Downloaded to {output_dir}")

Managing Workspace Plugins

# Create a workspace
mkdir my-workspace && cd my-workspace

# Install a plugin
davy-market install plugin@git@github.com:user/plugin.git --output .dawei/plugins

# List installed plugins
davy-market plugin list --workspace . --output json

# List only plugins (not skills/agents)
davy-market plugin list --workspace . --type plugin

Error Handling

from davybot_market_cli import (
    DavybotMarketClient,
    AuthenticationError,
    NotFoundError,
    ValidationError,
    APIError
)

with DavybotMarketClient() as client:
    try:
        skill = client.get_skill("invalid-id")
    except NotFoundError:
        print("Resource not found!")
    except AuthenticationError:
        print("Invalid API key!")
    except APIError as e:
        print(f"API error: {e}")

Common Issues

Invalid Resource URI Format

If you see this error:

Invalid resource URI format: 'skill-name'

Please use one of the following formats:
  - skill://<resource-id>
  - agent://<resource-id>
  - mcp://<resource-id>
  - knowledge://<resource-id>

Solution: Always use the full resource ID format:

# ❌ Wrong
davy-market install skill-name

# ✅ Correct
davy-market install skill://github.com/user/repo/skill-name

Finding Resource IDs

Use the search command to find full resource IDs:

davy-market search "query" --output json | jq '.results[].id'

Or use the info command to copy the installation command from the output.

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

davybot_market_cli-0.1.1.tar.gz (79.4 kB view details)

Uploaded Source

Built Distribution

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

davybot_market_cli-0.1.1-py3-none-any.whl (48.1 kB view details)

Uploaded Python 3

File details

Details for the file davybot_market_cli-0.1.1.tar.gz.

File metadata

  • Download URL: davybot_market_cli-0.1.1.tar.gz
  • Upload date:
  • Size: 79.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for davybot_market_cli-0.1.1.tar.gz
Algorithm Hash digest
SHA256 7b736a94449e4ea107cdebe2e1682ab0070e3a4c2cddf1b58b1cb4ce06286e5f
MD5 aa88df0498441473e1668c7ef3f5b498
BLAKE2b-256 c16b74585380f651659882cddb217276add7f38d808ee12c93628b5b3147451b

See more details on using hashes here.

File details

Details for the file davybot_market_cli-0.1.1-py3-none-any.whl.

File metadata

File hashes

Hashes for davybot_market_cli-0.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 c60b8d3664a3e24c3c898441e9c14be138acd8e23915fabe34891a0281b35021
MD5 0911a9e55c69982b34ef8b936fc77f81
BLAKE2b-256 fdba2f46452257b85f2fdfd740dfd89e9413cff3f45482b551574a3041872607

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