Metadata-Version: 2.4
Name: aleph-client
Version: 1.9.2
Summary: Python Client library for the Aleph Cloud network
Project-URL: Discussions, https://community.aleph.cloud/
Project-URL: Documentation, https://docs.aleph.cloud/devhub/sdks-and-tools/aleph-cli/
Project-URL: Issues, https://github.com/aleph-im/aleph-client/issues
Project-URL: Source, https://github.com/aleph-im/aleph-client
Author-email: Aleph Cloud Team <hello@aleph.cloud>
License: The MIT License (MIT)
        
        Copyright (c) 2019 Aleph.im project
        
        Permission is hereby granted, free of charge, to any person obtaining a copy
        of this software and associated documentation files (the "Software"), to deal
        in the Software without restriction, including without limitation the rights
        to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
        copies of the Software, and to permit persons to whom the Software is
        furnished to do so, subject to the following conditions:
        
        The above copyright notice and this permission notice shall be included in all
        copies or substantial portions of the Software.
        
        THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
        IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
        FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
        AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
        LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
        OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
        SOFTWARE.
License-File: AUTHORS.rst
License-File: LICENSE.txt
Keywords: Aleph Cloud,Client,Library,Python
Classifier: Development Status :: 4 - Beta
Classifier: Environment :: Console
Classifier: Framework :: aiohttp
Classifier: License :: OSI Approved :: MIT License
Classifier: Programming Language :: Python :: 3 :: Only
Classifier: Programming Language :: Python :: 3.9
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Topic :: System :: Distributed Computing
Requires-Python: >=3.9
Requires-Dist: aiodns==3.1.1
Requires-Dist: aiohttp==3.13.4
Requires-Dist: aleph-message~=1.1.1
Requires-Dist: aleph-sdk-python[dns]==2.3.*
Requires-Dist: base58==2.1.1
Requires-Dist: click<8.2
Requires-Dist: ledgerblue>=0.1.48
Requires-Dist: ledgereth>=0.10
Requires-Dist: py-sr25519-bindings==0.2
Requires-Dist: pydantic>=2
Requires-Dist: pygments==2.20
Requires-Dist: pynacl==1.5
Requires-Dist: python-magic==0.4.27
Requires-Dist: rich==13.9.*
Requires-Dist: setuptools>=65.5
Requires-Dist: substrate-interface==1.7.11
Requires-Dist: textual==0.73
Requires-Dist: typer==0.15.2
Provides-Extra: cosmos
Requires-Dist: cosmospy==6; extra == 'cosmos'
Provides-Extra: docs
Requires-Dist: sphinxcontrib-plantuml==0.30; extra == 'docs'
Provides-Extra: ethereum
Requires-Dist: eth-account>=0.4; extra == 'ethereum'
Provides-Extra: nuls2
Requires-Dist: aleph-nuls2==0.1; extra == 'nuls2'
Provides-Extra: polkadot
Requires-Dist: substrate-interface==1.7.11; extra == 'polkadot'
Provides-Extra: solana
Requires-Dist: base58==2.1.1; extra == 'solana'
Requires-Dist: pynacl==1.5; extra == 'solana'
Provides-Extra: tezos
Requires-Dist: aleph-pytezos==3.13.4; extra == 'tezos'
Requires-Dist: pynacl==1.5; extra == 'tezos'
Description-Content-Type: text/markdown

# aleph-client

The official command-line interface (CLI) for [Aleph Cloud](https://www.aleph.cloud) — a decentralized cloud computing platform.

## What is Aleph Cloud?

Aleph Cloud provides decentralized computing, storage, and indexing services. With `aleph-client`, you can:

- **Deploy VMs (Instances)** — Run persistent virtual machines on decentralized infrastructure
- **Deploy Functions (Programs)** — Deploy serverless functions that scale automatically  
- **Store Data** — Upload files and data to decentralized storage
- **Send Messages** — Post, aggregate, and forget messages on the Aleph network
- **Manage Domains** — Configure custom domains for your deployments

## Quick Start

### Installation

```bash
# Install from PyPI
pip install aleph-client

# Verify installation
aleph --help
```

### Create Your First Instance

```bash
# Create a new account (generates keys)
aleph account create

# Deploy an Ubuntu instance with pay-as-you-go credits
aleph instance create --payment-type=credit --name="my-first-vm"

# List your instances
aleph instance list

# SSH into your instance
ssh root@<ipv6-address>
```

### Deploy a Serverless Function

```bash
# Create a simple FastAPI app
mkdir my-app && cd my-app
cat > main.py << 'EOF'
from fastapi import FastAPI
app = FastAPI()

@app.get("/")
def hello():
    return {"message": "Hello from Aleph Cloud!"}
EOF

# Deploy it
aleph program upload . main:app --name="my-function"
```

### Store Data

```bash
# Upload a file
aleph file upload myfile.txt

# Pin existing content by hash
aleph file pin QmYourContentHash
```

## Commands Overview

| Command | Description |
|---------|-------------|
| `aleph account` | Manage accounts and keys |
| `aleph instance` | Manage virtual machines (create, list, delete, logs) |
| `aleph program` | Deploy serverless functions |
| `aleph file` | Upload and manage files |
| `aleph message` | Send messages to the network |
| `aleph aggregate` | Manage key-value aggregates |
| `aleph domain` | Configure custom domains |
| `aleph node` | Interact with Compute Resource Nodes |
| `aleph credits` | Check credit balance |
| `aleph pricing` | View compute pricing |

Run `aleph <command> --help` for detailed usage of each command.

## Payment Options

Aleph Cloud supports multiple payment methods:

- **Credits (Pay-as-you-go)** — No token staking required, pay only for what you use
- **Hold** — Stake ALEPH tokens for allocation
- **Superfluid** — Stream payments for continuous services
- **NFT** — Use NFT vouchers for payment

## Documentation

- **Full Documentation**: https://docs.aleph.cloud/devhub/sdks-and-tools/aleph-cli/
- **API Reference**: https://docs.aleph.cloud/devhub/api/
- **Tutorials**: https://docs.aleph.cloud/devhub/tutorials/

## Requirements

### Linux

```bash
apt-get install -y python3-pip libsecp256k1-dev squashfs-tools
```

### macOS

```bash
brew tap cuber/homebrew-libsecp256k1
brew install libsecp256k1
```

### Windows

We recommend using [WSL](https://learn.microsoft.com/en-us/windows/wsl/install) (Windows Subsystem for Linux).

## Using Docker

Run the CLI without installing locally:

```bash
docker run --rm -ti -v $(pwd)/data:/data ghcr.io/aleph-im/aleph-client/aleph-client:master --help
```

Note: This uses an ephemeral key pair that is discarded when the container stops.

## Development

### Setup

We use [hatch](https://hatch.pypa.io/) for development:

```bash
pip install hatch
```

### Running Tests

```bash
hatch test
# or with coverage
hatch run testing:cov
```

### Code Quality

```bash
# Format code
hatch run linting:fmt

# Type checking
hatch run linting:typing
```

### Publishing

```bash
hatch build
hatch upload
```

## Additional Chains

For NULS2 support:

```bash
pip install aleph-sdk-python[nuls2]
```

## Contributing

Contributions are welcome! Please see our [contribution guidelines](CONTRIBUTING.md) and open a pull request.

## Links

- **Website**: https://aleph.cloud
- **Documentation**: https://docs.aleph.cloud
- **GitHub**: https://github.com/aleph-im
- **Discord**: https://discord.gg/aleph-im
- **Twitter**: https://twitter.com/alaboratory

## License

MIT License - see [LICENSE](LICENSE) for details.
