Skip to content

Commit 1c38f37

Browse files
committed
🔖 version 0.1.0
1 parent 900b1ae commit 1c38f37

File tree

5 files changed

+110
-10
lines changed

5 files changed

+110
-10
lines changed

.github/workflows/docker.yml

Lines changed: 13 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -53,6 +53,14 @@ jobs:
5353
env:
5454
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
5555

56+
- name: Set platforms
57+
id: set-platforms
58+
run: |
59+
if [[ "${{ github.event_name }}" == "workflow_run" && "${{ github.event.workflow_run.conclusion }}" == "success" ]]; then
60+
echo "PLATFORMS=[\"linux/amd64\", \"linux/arm64\"]" >> $GITHUB_OUTPUT
61+
else
62+
echo "PLATFORMS=[\"linux/amd64\"]" >> $GITHUB_OUTPUT
63+
fi
5664
5765
build:
5866
runs-on: ubuntu-latest
@@ -75,9 +83,7 @@ jobs:
7583
python_variant:
7684
- ""
7785
- "-slim"
78-
platform:
79-
- linux/amd64
80-
- linux/arm64
86+
platform: ${{ fromJSON(needs.metadata.outputs.PLATFORMS) }}
8187
steps:
8288
- name: Checkout (Latest Release)
8389
if: github.event_name == 'workflow_run' && github.event.workflow_run.conclusion == 'success'
@@ -116,6 +122,10 @@ jobs:
116122
id: metadata
117123
with:
118124
images: ${{ steps.image.outputs.IMAGE }}
125+
tags: |
126+
type=edge,value=nightly
127+
type=ref,event=pr
128+
type=sha,event=branch
119129
120130
- name: Build and Publish
121131
uses: docker/build-push-action@v6
@@ -209,9 +219,6 @@ jobs:
209219
flavor: |
210220
suffix=-py${{ matrix.python_version }}${{ matrix.python_variant }},onlatest=true
211221
tags: |
212-
type=edge,value=nightly
213-
type=ref,event=pr
214-
type=sha,event=branch
215222
type=semver,pattern={{version}}
216223
type=semver,pattern={{major}}.{{minor}}
217224
type=semver,pattern={{major}}

README.md

Lines changed: 77 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,77 @@
1-
# entari-cli
2-
Entari Command Line Tool, extract from arclet.entari.\_\_main__
1+
<div align="center">
2+
3+
# Entari CLI
4+
5+
_✨ Entari 命令行工具 ✨_
6+
7+
</div>
8+
9+
<p align="center">
10+
<a href="https://raw.githubusercontent.com/ArcletProject/entari-cli/main/LICENSE">
11+
<img src="https://img.shields.io/github/license/ArcletProject/entari-cli" alt="license">
12+
</a>
13+
<a href="https://pypi.python.org/pypi/entari-cli">
14+
<img src="https://img.shields.io/pypi/v/entari-cli" alt="pypi">
15+
</a>
16+
<img src="https://img.shields.io/badge/python-3.9+-blue" alt="python">
17+
</p>
18+
19+
<p align="center">
20+
<a href="https://arclet.top/tutorial/entari">Entari 文档</a>
21+
</p>
22+
23+
## 功能
24+
25+
- 初始化 Entari 环境
26+
- 启动 Entari
27+
- 生成配置文件
28+
- 管理插件
29+
- 创建新的 Entari 插件 (项目型/应用型)
30+
- 支持 CLI 插件
31+
32+
## 安装
33+
34+
使用 pipx 安装
35+
36+
```shell
37+
pipx install entari-cli
38+
```
39+
40+
使用 Docker 运行
41+
42+
```shell
43+
docker pull ghcr.io/arcletproject/entari-cli:latest
44+
```
45+
46+
Docker 镜像可以选择以下版本:
47+
48+
- `latest`, `latest-slim`:最新的稳定版本
49+
- `latest-${python版本}`, `latest-${python版本}-slim`:指定 Python 版本的最新稳定版本
50+
- `${cli版本}`, `${cli版本}-slim`:指定 CLI 版本的最新稳定版本
51+
- `${cli版本}-${python版本}`, `${cli版本}-${python版本}-slim`:指定 CLI 和 Python 版本的最新稳定版本
52+
53+
## 命令行使用
54+
55+
```shell
56+
entari --help
57+
```
58+
59+
> **Warning**
60+
>
61+
> 如果找不到 `entari` 命令,请尝试 `pipx ensurepath` 来添加路径到环境变量
62+
63+
- `entari add` 添加一个 Entari 插件到配置文件中
64+
- `entari config` 配置文件操作
65+
- `entari gen_main` 生成一个 Entari 主程序文件
66+
- `entari init` 新建一个虚拟环境并安装 Entari
67+
- `entari new` 新建一个 Entari 插件
68+
- `entari remove` 从配置文件中移除一个 Entari 插件
69+
- `entari run` 运行 Entari
70+
71+
## Docker 镜像使用
72+
73+
```shell
74+
docker run --rm -it -v ./:/workspaces ghcr.io/arcletproject/entari-cli:latest --help
75+
```
76+
77+
挂载当前目录到容器的 `/workspaces` 目录,然后在容器中运行 `entari` 命令。

pyproject.toml

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,21 @@ dependencies = ["cli-lite>=0.11.0", "colorama>=0.4.6", "tomlkit>=0.13.3", "ruame
99
requires-python = ">=3.9"
1010
readme = "README.md"
1111
license = {text = "MIT"}
12+
keywords = ["bot", "dependency", "entari"]
13+
classifiers = [
14+
"Development Status :: 4 - Beta",
15+
"Topic :: Software Development :: Build Tools",
16+
"Framework :: Robot Framework",
17+
"Framework :: Robot Framework :: Library",
18+
"License :: OSI Approved :: MIT License",
19+
"Operating System :: OS Independent",
20+
"Programming Language :: Python :: 3",
21+
"Programming Language :: Python :: 3.9",
22+
"Programming Language :: Python :: 3.10",
23+
"Programming Language :: Python :: 3.11",
24+
"Programming Language :: Python :: 3.12",
25+
"Programming Language :: Python :: 3.13",
26+
]
1227

1328
[project.optional-dependencies]
1429
virtualenv = [
@@ -30,6 +45,9 @@ distribution = true
3045
source = "file"
3146
path = "src/entari_cli/__init__.py"
3247

48+
[tool.pdm.build]
49+
include = ["src/"]
50+
3351
[dependency-groups]
3452
dev = [
3553
"isort==5.13.2",

src/entari_cli/__init__.py

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,5 +22,3 @@
2222

2323
for _, name, _ in pkgutil.iter_modules(COMMANDS_MODULE_PATH):
2424
importlib.import_module(f"entari_cli.commands.{name}", __name__)
25-
26-
cli.load_register("entari_cli.plugins")

src/entari_cli/__main__.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
11
def main():
22
from entari_cli import cli
33

4+
cli.load_entry()
5+
cli.load_register("entari_cli.plugins")
46
cli.main()
57

68

0 commit comments

Comments
 (0)