Skip to main content

CLI and SDK for the AyAiAy.org AI agents marketplace

Project description

AyAiAy CLI

PyPI version Python 3.11+ License: GPL v3

CLI and SDK for the AyAiAy.org AI agents marketplace - discover, install, and manage AI Agent Profiles, Instruction Packs, and Prompt Packs.

Installation

pip install ayaiay

For development:

pip install -e ".[dev]"

Quick Start

Search for Packs

# Search by keyword
ayaiay search "code review"

# Filter by type
ayaiay search --type agent
ayaiay search --type instruction
ayaiay search --type prompt

# Filter by tags
ayaiay search --tag python --tag testing

Install Packs

# Install latest version
ayaiay install acme/code-reviewer

# Install specific version
ayaiay install acme/code-reviewer@1.0.0

# Force reinstall
ayaiay install acme/code-reviewer --force

Manage Installed Packs

# List installed packs
ayaiay list

# Show pack details
ayaiay show acme/code-reviewer

# Uninstall a pack
ayaiay uninstall acme/code-reviewer

Validate Manifests

# Validate an ayaiay.yaml manifest
ayaiay validate ayaiay.yaml
ayaiay validate ./my-pack/ayaiay.yaml

CLI Configuration

# Show current configuration and API status
ayaiay info

SDK Usage

from ayaiay import AyAiAyClient, validate_manifest

# Search for packs
with AyAiAyClient() as client:
    results = client.search_packs(query="code review", pack_type="agent")
    for pack in results.packs:
        print(f"{pack.full_name}: {pack.description}")

# Get pack details
with AyAiAyClient() as client:
    pack = client.get_pack("acme/code-reviewer")
    versions = client.get_pack_versions("acme/code-reviewer")

# Validate a manifest file
result = validate_manifest("ayaiay.yaml")
if result.is_valid:
    print(f"Valid manifest: {result.manifest.name}")
else:
    for error in result.errors:
        print(f"Error: {error}")

Configuration

Configuration is loaded from (in order of priority):

  1. Environment variables (highest priority)
  2. Config file (~/.ayaiay/config.yaml)
  3. Default values

Environment Variables

Variable Description Default
AYAIAY_API_URL API base URL https://api.ayaiay.org
AYAIAY_REGISTRY_URL OCI registry URL ghcr.io/ayaiayorg
AYAIAY_INSTALL_DIR Pack installation directory ~/.ayaiay/packs
AYAIAY_TOKEN Authentication token -

Config File

# ~/.ayaiay/config.yaml
api_base_url: https://api.ayaiay.org
registry_url: ghcr.io/ayaiayorg
install_dir: ~/.ayaiay/packs
cache_dir: ~/.ayaiay/cache
timeout: 30.0

Creating Packs

To publish your own packs, create an ayaiay.yaml manifest in your repository:

version: "1.0"
name: my-awesome-pack
description: An awesome AI pack for code review
author: Your Name
license: MIT
repository: https://github.com/you/my-awesome-pack
tags:
  - code-review
  - python

agents:
  - name: code-reviewer
    description: Reviews code for quality and best practices
    system_prompt: |
      You are an expert code reviewer. Analyze code for:
      - Best practices
      - Performance issues
      - Security vulnerabilities
    model: gpt-4
    tools:
      - read_file
      - write_file

instructions:
  - name: coding-standards
    description: Coding standards to follow
    content: |
      Follow PEP 8 for Python code.
      Use meaningful variable names.
      Write docstrings for all functions.

prompts:
  - name: review-request
    description: Template for requesting code review
    template: |
      Please review the following {language} code:

      ```{language}
      {code}
      ```

      Focus on: {focus_areas}
    variables:
      - language
      - code
      - focus_areas

dependencies:
  base-pack: "^1.0.0"

Development

Setup

git clone https://github.com/ayaiayorg/ayaiay-cli.git
cd ayaiay-cli
pip install -e ".[dev]"

Running Tests

pytest
pytest --cov=ayaiay

Code Quality

# Format code
black .
isort .

# Type checking
mypy .

# Linting
ruff check .

Publishing to PyPI

This package uses GitHub Actions with Trusted Publisher (OIDC) for secure, tokenless publishing.

Setup (one-time):

  1. Go to PyPI and create an account
  2. Navigate to your account's "Publishing" settings
  3. Add a new Trusted Publisher with:
    • Owner: ayaiayorg
    • Repository: ayaiay-cli
    • Workflow: publish.yml
    • Environment: pypi
  4. Repeat for TestPyPI with environment: testpypi

Publishing:

  • Automatic: Create a GitHub Release to publish to PyPI
  • Manual (TestPyPI): Run the "Publish to PyPI" workflow manually, selecting testpypi
  • Manual (PyPI): Run the workflow manually, selecting pypi

Before releasing:

  1. Update the version in pyproject.toml
  2. Commit and push changes
  3. Create a GitHub Release with a tag matching the version (e.g., v0.1.0)

License

This project is licensed under the GNU General Public License v3.0 - see the LICENSE file for details.

Links

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

ayaiay-0.1.0.tar.gz (34.4 kB view details)

Uploaded Source

Built Distribution

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

ayaiay-0.1.0-py3-none-any.whl (30.6 kB view details)

Uploaded Python 3

File details

Details for the file ayaiay-0.1.0.tar.gz.

File metadata

  • Download URL: ayaiay-0.1.0.tar.gz
  • Upload date:
  • Size: 34.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for ayaiay-0.1.0.tar.gz
Algorithm Hash digest
SHA256 4f9e04bce45570651361f90efc7ee47536d383f16d236930feede43ad04364b3
MD5 ca7767e17b8bee66aace4c494beb5589
BLAKE2b-256 7aa56f6e97f393d9d3d56e646d61adeda93117e9fbcfe91c5fe5c8bc786190b0

See more details on using hashes here.

Provenance

The following attestation bundles were made for ayaiay-0.1.0.tar.gz:

Publisher: publish.yml on ayaiayorg/ayaiay-cli

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file ayaiay-0.1.0-py3-none-any.whl.

File metadata

  • Download URL: ayaiay-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 30.6 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for ayaiay-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 d67ae2e9b41789083bc3df097a1003dcc10eb79963dba17647a053466d672d74
MD5 9eaecf6c7a989475713861c76e4a8bf4
BLAKE2b-256 ead338da90dad9595af169d8b5667b2c0610ed8be1bb0ecb195f3fe87915baea

See more details on using hashes here.

Provenance

The following attestation bundles were made for ayaiay-0.1.0-py3-none-any.whl:

Publisher: publish.yml on ayaiayorg/ayaiay-cli

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

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