Metadata-Version: 2.4
Name: backend.ai-cli
Version: 26.4.4rc3
Summary: Backend.AI Command Line Interface Helper
Home-page: https://github.com/lablup/backend.ai
Author: Lablup Inc. and contributors
License: MIT
Project-URL: Documentation, https://docs.backend.ai/
Project-URL: Source, https://github.com/lablup/backend.ai
Classifier: Intended Audience :: Developers
Classifier: Operating System :: MacOS :: MacOS X
Classifier: Operating System :: POSIX :: Linux
Classifier: Programming Language :: Python
Classifier: Programming Language :: Python :: 3
Classifier: Environment :: No Input/Output (Daemon)
Classifier: Topic :: Scientific/Engineering
Classifier: Topic :: Software Development
Classifier: Development Status :: 4 - Beta
Classifier: Programming Language :: Python :: 3.13
Classifier: License :: OSI Approved :: MIT License
Requires-Python: >=3.13,<3.14
Description-Content-Type: text/markdown
Requires-Dist: attrs>=25.3
Requires-Dist: backend.ai-plugin==26.4.4rc3
Requires-Dist: click~=8.1.7
Requires-Dist: trafaret~=2.1
Dynamic: author
Dynamic: classifier
Dynamic: description
Dynamic: description-content-type
Dynamic: home-page
Dynamic: license
Dynamic: project-url
Dynamic: requires-dist
Dynamic: requires-python
Dynamic: summary

# backend.ai-cli

Unified command-line interface for Backend.AI


## How to adopt in CLI-enabled Backend.AI packages

An example `setup.cfg` in Backend.AI Manager:
```
[options.entry_points]
backendai_cli_v10 =
    mgr = ai.backend.manager.cli.__main__:main
    mgr.start-server = ai.backend.gateway.server:main
```

Define your package entry points that returns a Click command group using a
prefix, and add additional entry points that returns a Click command using a
prefix followed by a dot and sub-command name for shortcut access, under the
`backendai_cli_v10` entry point group.

Then add `backend.ai-cli` to the `install_requires` list.

You can do the same in `setup.py` as well.


## Shell Tab Completion

The CLI provides built-in shell tab completion support for bash, zsh, and fish shells.

### Quick Setup

```bash
# Show completion setup instructions
backend.ai completion --show

# Install completion automatically
backend.ai completion --shell bash  # Install to ~/.bashrc
backend.ai completion --shell zsh   # Install to ~/.zshrc
backend.ai completion --shell fish  # Install to fish completions
```

### Manual Setup

If you prefer manual setup, you can add completion to your shell configuration:

**Bash** (`~/.bashrc`):
```bash
eval "$(_BACKEND_AI_COMPLETE=bash_source backend.ai)"
```

**Zsh** (`~/.zshrc`):
```bash
eval "$(_BACKEND_AI_COMPLETE=zsh_source backend.ai)"
```

**Fish** (`~/.config/fish/config.fish`):
```fish
backend.ai completion --shell fish | source
```

### Features

Tab completion supports:
- **Commands**: All available commands and subcommands
- **Options**: Short and long flags with descriptions
- **Arguments**: Context-aware argument completion where applicable
- **Help**: Descriptions for commands and options

### Examples

```bash
backend.ai <TAB>              # Show all available commands
backend.ai session <TAB>      # Show session subcommands
backend.ai session create <TAB>  # Show creation options
backend.ai --<TAB>            # Show global options
```
