Skip to main content

Command execution plugin for Amrita

Project description

amrita-plugin-exec

Amrita的命令执行插件

功能描述

这是一个为Amrita框架开发的命令执行插件,允许授权用户在聊天中执行服务器命令。

安装

使用uv安装:

uv add amrita-plugin-exec

或者使用amrita-cli安装:

amrita plugin install amrita-plugin-exec

配置

插件提供了以下配置选项,可以在 .env 或环境变量中进行配置:

ENABLE_DOCKER=false
# 是否启用Docker下的指令执行,默认为 False

PLUGIN_EXEC_IMAGE_NAME=alpine:latest
# 要使用的Docker镜像名称,默认为 "alpine:latest"

PLUGIN_EXEC_DOCKER_HOST=unix://var/run/docker.sock
# Docker守护进程的地址,默认为 "unix://var/run/docker.sock"

PLUGIN_EXEC_SHELL_NAME=sh
# 在容器中执行命令时使用的shell名称,默认为 "sh"

AUTO_REBUILD_CONTAINER=true
# 是否在运行完成后自动重建容器,默认为 true

使用方法

在Amrita机器人中,授权用户可以使用以下命令:

  • /exec <command>:执行指定的服务器命令。

权限节点

插件添加了以下权限节点:

  • amrita.exec.full:允许用户执行宿主命令。
  • amrita.exec.safe:允许用户容器内执行命令。

TODO

  • 包装为Amrita的Tool

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

amrita_plugin_exec-0.1.2.tar.gz (14.5 kB view details)

Uploaded Source

Built Distribution

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

amrita_plugin_exec-0.1.2-py3-none-any.whl (13.9 kB view details)

Uploaded Python 3

File details

Details for the file amrita_plugin_exec-0.1.2.tar.gz.

File metadata

  • Download URL: amrita_plugin_exec-0.1.2.tar.gz
  • Upload date:
  • Size: 14.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.9.26 {"installer":{"name":"uv","version":"0.9.26","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

File hashes

Hashes for amrita_plugin_exec-0.1.2.tar.gz
Algorithm Hash digest
SHA256 14ea08c213a42640a77571902d91cd42993852f657826a8354b3c6f0e222d37e
MD5 4c91927443df1663d9b34d258e37ca4d
BLAKE2b-256 6253a371b362ff6974e4e0dd2f3cb07b7a5f1dab8da4cb7234f8593ead1a9649

See more details on using hashes here.

File details

Details for the file amrita_plugin_exec-0.1.2-py3-none-any.whl.

File metadata

  • Download URL: amrita_plugin_exec-0.1.2-py3-none-any.whl
  • Upload date:
  • Size: 13.9 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.9.26 {"installer":{"name":"uv","version":"0.9.26","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

File hashes

Hashes for amrita_plugin_exec-0.1.2-py3-none-any.whl
Algorithm Hash digest
SHA256 27d131749b83116cd6b317ed5bd7917e908bd870d9a61f1c9d4503e2aea0b50b
MD5 3e50c0f62c1d2a8064dcef9e0464b14e
BLAKE2b-256 9bbebe9ff742e2c036a14bc03803bdfaf0884fa85429cf140324db952ac18c0d

See more details on using hashes here.

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