ai-search-adm


Nameai-search-adm JSON
Version 0.9.0b3 PyPI version JSON
download
home_pageNone
SummaryAdministration tool for Azure AI Search indexes
upload_time2025-09-10 10:21:07
maintainerNone
docs_urlNone
authordomibies
requires_python>=3.11
licenseNone
keywords administration azure cli search
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            # ai-search-adm

> **⚠️ PRERELEASE SOFTWARE**: This is beta software. Features may change and bugs may exist. Use with caution in production environments.

Administration tool for Azure AI Search indexes.

## Features

- **duplicate**: Duplicate an index definition (schema only, no documents)
- **clear**: Clear all documents from an index (preserves schema)
- **list**: List all indexes in a search service
- **stats**: Show index statistics (document count, storage usage)
- Uses `DefaultAzureCredential` for authentication (or API key as fallback)
- Pretty terminal output with Rich
- Cross-service index duplication support

## Installation

> **Note**: This is currently in beta. `uvx` works seamlessly with beta versions. For `pip` and `pipx`, you may need to use `--pre` flag or specify exact versions.

### Using uvx (Recommended)
Run directly without installation:
```bash
uvx ai-search-adm --help
uvx ai-search-adm list --endpoint https://myservice.search.windows.net
```

Or install globally:
```bash
uvx install ai-search-adm
ai-search-adm --help
```

### Using uv
Install as a tool:
```bash
uv tool install ai-search-adm
ai-search-adm --help
```

Run without installation:
```bash
uv tool run ai-search-adm --help
uv tool run ai-search-adm list --endpoint https://myservice.search.windows.net
```

### Using pip (Traditional)
```bash
# For beta versions, use --pre flag
pip install --pre ai-search-adm

# Or specify exact version
pip install ai-search-adm==0.9.0b1

ai-search-adm --help
```

### Using pipx
```bash
# For beta versions, use --pip-args with --pre
pipx install --pip-args="--pre" ai-search-adm

# Or run directly without installing (specify exact version for beta)
pipx run --spec ai-search-adm==0.9.0b2 ai-search-adm --help
```

**Note**: All methods work identically. `uvx` and `uv tool run` are fastest and avoid dependency conflicts by running in isolated environments.

## Usage

### List indexes

List all indexes in a search service:

```bash
ai-search-adm list --endpoint https://your-service.search.windows.net
```

### Clear an index

Remove all documents from an index while preserving its structure:

```bash
ai-search-adm clear \
  --endpoint https://your-service.search.windows.net \
  --index index-name
```

⚠️ **WARNING**: This is a destructive operation that cannot be undone. You will be prompted to type "DELETE" to confirm.

### Get index statistics

Display document count and storage usage for an index:

```bash
ai-search-adm stats \
  --endpoint https://your-service.search.windows.net \
  --index index-name
```

### Duplicate an index

Duplicate an index within the same search service:

```bash
ai-search-adm duplicate \
  --endpoint https://your-service.search.windows.net \
  --source source-index-name \
  --target new-index-name
```

Duplicate an index across different search services:

```bash
ai-search-adm duplicate \
  --endpoint https://target-service.search.windows.net \
  --from-endpoint https://source-service.search.windows.net \
  --source source-index-name \
  --target new-index-name
```

### Authentication

By default, the tool uses `DefaultAzureCredential` which supports:
- Environment variables (service principal)
- Managed Identity
- Azure CLI authentication
- Visual Studio Code authentication
- And more...

You can also use API keys:

```bash
ai-search-adm duplicate \
  --endpoint https://your-service.search.windows.net \
  --api-key your-admin-api-key \
  --source source-index \
  --target target-index
```

### Options

- `--overwrite`: Delete target index if it exists (DANGEROUS)
- `--api-key`: Use API key authentication instead of DefaultAzureCredential
- `--source-api-key`: Use different API key for source service in cross-service scenarios

## Requirements

- Python 3.11+
- Azure AI Search service
- Appropriate permissions (Search Service Contributor role or API keys)

## Development

This project uses modern Python packaging with `pyproject.toml` and supports Python 3.11+.

```bash
# Install in development mode
pip install -e ".[dev]"

# Run tests
pytest

# Format code
black src/ tests/

# Lint code  
ruff check src/ tests/

# Type check
mypy src/
```
            

Raw data

            {
    "_id": null,
    "home_page": null,
    "name": "ai-search-adm",
    "maintainer": null,
    "docs_url": null,
    "requires_python": ">=3.11",
    "maintainer_email": null,
    "keywords": "administration, azure, cli, search",
    "author": "domibies",
    "author_email": null,
    "download_url": "https://files.pythonhosted.org/packages/b3/b8/205804950704a8dad66f2f95c05646059c9aefbe71d367d7a871dfbaecbd/ai_search_adm-0.9.0b3.tar.gz",
    "platform": null,
    "description": "# ai-search-adm\n\n> **\u26a0\ufe0f PRERELEASE SOFTWARE**: This is beta software. Features may change and bugs may exist. Use with caution in production environments.\n\nAdministration tool for Azure AI Search indexes.\n\n## Features\n\n- **duplicate**: Duplicate an index definition (schema only, no documents)\n- **clear**: Clear all documents from an index (preserves schema)\n- **list**: List all indexes in a search service\n- **stats**: Show index statistics (document count, storage usage)\n- Uses `DefaultAzureCredential` for authentication (or API key as fallback)\n- Pretty terminal output with Rich\n- Cross-service index duplication support\n\n## Installation\n\n> **Note**: This is currently in beta. `uvx` works seamlessly with beta versions. For `pip` and `pipx`, you may need to use `--pre` flag or specify exact versions.\n\n### Using uvx (Recommended)\nRun directly without installation:\n```bash\nuvx ai-search-adm --help\nuvx ai-search-adm list --endpoint https://myservice.search.windows.net\n```\n\nOr install globally:\n```bash\nuvx install ai-search-adm\nai-search-adm --help\n```\n\n### Using uv\nInstall as a tool:\n```bash\nuv tool install ai-search-adm\nai-search-adm --help\n```\n\nRun without installation:\n```bash\nuv tool run ai-search-adm --help\nuv tool run ai-search-adm list --endpoint https://myservice.search.windows.net\n```\n\n### Using pip (Traditional)\n```bash\n# For beta versions, use --pre flag\npip install --pre ai-search-adm\n\n# Or specify exact version\npip install ai-search-adm==0.9.0b1\n\nai-search-adm --help\n```\n\n### Using pipx\n```bash\n# For beta versions, use --pip-args with --pre\npipx install --pip-args=\"--pre\" ai-search-adm\n\n# Or run directly without installing (specify exact version for beta)\npipx run --spec ai-search-adm==0.9.0b2 ai-search-adm --help\n```\n\n**Note**: All methods work identically. `uvx` and `uv tool run` are fastest and avoid dependency conflicts by running in isolated environments.\n\n## Usage\n\n### List indexes\n\nList all indexes in a search service:\n\n```bash\nai-search-adm list --endpoint https://your-service.search.windows.net\n```\n\n### Clear an index\n\nRemove all documents from an index while preserving its structure:\n\n```bash\nai-search-adm clear \\\n  --endpoint https://your-service.search.windows.net \\\n  --index index-name\n```\n\n\u26a0\ufe0f **WARNING**: This is a destructive operation that cannot be undone. You will be prompted to type \"DELETE\" to confirm.\n\n### Get index statistics\n\nDisplay document count and storage usage for an index:\n\n```bash\nai-search-adm stats \\\n  --endpoint https://your-service.search.windows.net \\\n  --index index-name\n```\n\n### Duplicate an index\n\nDuplicate an index within the same search service:\n\n```bash\nai-search-adm duplicate \\\n  --endpoint https://your-service.search.windows.net \\\n  --source source-index-name \\\n  --target new-index-name\n```\n\nDuplicate an index across different search services:\n\n```bash\nai-search-adm duplicate \\\n  --endpoint https://target-service.search.windows.net \\\n  --from-endpoint https://source-service.search.windows.net \\\n  --source source-index-name \\\n  --target new-index-name\n```\n\n### Authentication\n\nBy default, the tool uses `DefaultAzureCredential` which supports:\n- Environment variables (service principal)\n- Managed Identity\n- Azure CLI authentication\n- Visual Studio Code authentication\n- And more...\n\nYou can also use API keys:\n\n```bash\nai-search-adm duplicate \\\n  --endpoint https://your-service.search.windows.net \\\n  --api-key your-admin-api-key \\\n  --source source-index \\\n  --target target-index\n```\n\n### Options\n\n- `--overwrite`: Delete target index if it exists (DANGEROUS)\n- `--api-key`: Use API key authentication instead of DefaultAzureCredential\n- `--source-api-key`: Use different API key for source service in cross-service scenarios\n\n## Requirements\n\n- Python 3.11+\n- Azure AI Search service\n- Appropriate permissions (Search Service Contributor role or API keys)\n\n## Development\n\nThis project uses modern Python packaging with `pyproject.toml` and supports Python 3.11+.\n\n```bash\n# Install in development mode\npip install -e \".[dev]\"\n\n# Run tests\npytest\n\n# Format code\nblack src/ tests/\n\n# Lint code  \nruff check src/ tests/\n\n# Type check\nmypy src/\n```",
    "bugtrack_url": null,
    "license": null,
    "summary": "Administration tool for Azure AI Search indexes",
    "version": "0.9.0b3",
    "project_urls": {
        "Documentation": "https://github.com/domibies/ai-search-adm#readme",
        "Homepage": "https://github.com/domibies/ai-search-adm",
        "Issues": "https://github.com/domibies/ai-search-adm/issues",
        "Source": "https://github.com/domibies/ai-search-adm"
    },
    "split_keywords": [
        "administration",
        " azure",
        " cli",
        " search"
    ],
    "urls": [
        {
            "comment_text": null,
            "digests": {
                "blake2b_256": "cae7d0e647ac402fe6c7941cee857081c53fee2479cb8f6599c7f8b62f27eb4d",
                "md5": "dd89cd272fc2bd0b3d83e15f0a7b3714",
                "sha256": "d26c6e31eb1eeebb70d7963cfd5d398e2ef3afbc06552465e0e7e07ef075e38c"
            },
            "downloads": -1,
            "filename": "ai_search_adm-0.9.0b3-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "dd89cd272fc2bd0b3d83e15f0a7b3714",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.11",
            "size": 8675,
            "upload_time": "2025-09-10T10:21:05",
            "upload_time_iso_8601": "2025-09-10T10:21:05.728125Z",
            "url": "https://files.pythonhosted.org/packages/ca/e7/d0e647ac402fe6c7941cee857081c53fee2479cb8f6599c7f8b62f27eb4d/ai_search_adm-0.9.0b3-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": null,
            "digests": {
                "blake2b_256": "b3b8205804950704a8dad66f2f95c05646059c9aefbe71d367d7a871dfbaecbd",
                "md5": "cdf82d32d41373ba09f58bd56e437e4c",
                "sha256": "a78bab3b89a4d78c290c05ba6aed9456bb9eb7347a0824884a401740fe3582b6"
            },
            "downloads": -1,
            "filename": "ai_search_adm-0.9.0b3.tar.gz",
            "has_sig": false,
            "md5_digest": "cdf82d32d41373ba09f58bd56e437e4c",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.11",
            "size": 10810,
            "upload_time": "2025-09-10T10:21:07",
            "upload_time_iso_8601": "2025-09-10T10:21:07.010920Z",
            "url": "https://files.pythonhosted.org/packages/b3/b8/205804950704a8dad66f2f95c05646059c9aefbe71d367d7a871dfbaecbd/ai_search_adm-0.9.0b3.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2025-09-10 10:21:07",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "domibies",
    "github_project": "ai-search-adm#readme",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": true,
    "lcname": "ai-search-adm"
}
        
Elapsed time: 0.50292s