Backend.AI Command Line Interface Helper
Project description
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
# 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):
eval "$(_BACKEND_AI_COMPLETE=bash_source backend.ai)"
Zsh (~/.zshrc):
eval "$(_BACKEND_AI_COMPLETE=zsh_source backend.ai)"
Fish (~/.config/fish/config.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
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
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file backend_ai_cli-26.4.1.tar.gz.
File metadata
- Download URL: backend_ai_cli-26.4.1.tar.gz
- Upload date:
- Size: 12.0 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.2.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
53742937dab200d40508e45fb8f0fe064da5e01efc3a0225d3d5d6552186d8d1
|
|
| MD5 |
d22123806051f48ec5381f19718f1298
|
|
| BLAKE2b-256 |
e76fc5cdeb39b0dd53f0b5ea061e9be1dcf11c0f6450cd8703dd0d4adbb60501
|
File details
Details for the file backend_ai_cli-26.4.1-py3-none-any.whl.
File metadata
- Download URL: backend_ai_cli-26.4.1-py3-none-any.whl
- Upload date:
- Size: 12.8 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.2.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
07f5914cce1ebcc979ec3a761dfb67f5e5a59a39432637660e7d836815653184
|
|
| MD5 |
f98169d7c75e650b0b8cdb5179e2cc1d
|
|
| BLAKE2b-256 |
8f9d3328c3db36da948cf86710b6b125ea2a599401637b88b486a36ac56abbc4
|