Skip to content

Commit 428bb33

Browse files
authored
Remove support for .env for security reasons (#17809)
1 parent b905b20 commit 428bb33

File tree

15 files changed

+27
-835
lines changed

15 files changed

+27
-835
lines changed

skills/.env.example

Lines changed: 0 additions & 36 deletions
This file was deleted.

skills/README.md

Lines changed: 7 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,8 @@ This directory contains official PaddleOCR Agent Skills. They integrate with AI
1616

1717
## Using in AI Apps
1818

19+
> The instructions below cover both skills. Install and configure only the skill(s) you need.
20+
1921
### Install to AI Apps
2022

2123
#### Option 1: Install via `skills` CLI
@@ -141,7 +143,7 @@ Parse local file C:\docs\report.pdf and return complete structured output.
141143

142144
This section describes how to run smoke tests locally to verify that the skills work correctly.
143145

144-
> The examples below cover both skills. Run only the commands for the skill you need.
146+
> The examples below cover both skills. Run only the commands for the skill(s) you need.
145147
146148
Make sure your working directory is the directory containing this file.
147149

@@ -154,19 +156,12 @@ Make sure your working directory is the directory containing this file.
154156
python -m pip install -r paddleocr-doc-parsing/scripts/requirements-optimize.txt
155157
```
156158

157-
2. Configure environment variables (see [Configure Environment Variables](#configure-environment-variables) for the list of variables). Choose one of the following methods:
158-
159-
**Option A**: run the configuration script.
160-
161-
```shell
162-
python paddleocr-text-recognition/scripts/configure.py
163-
python paddleocr-doc-parsing/scripts/configure.py
164-
```
165-
166-
**Option B**: create a local `.env` file from the `.env.example` template and fill in the required variables.
159+
2. Configure environment variables (see [Configure Environment Variables](#configure-environment-variables) for the list of variables).
167160

168161
```shell
169-
cp .env.example .env
162+
export PADDLEOCR_OCR_API_URL="<OCR_API_URL>"
163+
export PADDLEOCR_ACCESS_TOKEN="<ACCESS_TOKEN>"
164+
export PADDLEOCR_DOC_PARSING_API_URL="<DOC_PARSING_API_URL>"
170165
```
171166

172167
3. Run the smoke test scripts.

skills/README_cn.md

Lines changed: 6 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,8 @@
1616

1717
## 在 AI 应用中使用
1818

19+
> 以下说明涵盖两个 skill。只需安装并配置你需要的 skill 即可。
20+
1921
### 安装到 AI 应用
2022

2123
#### 方式一:通过 `skills` CLI 安装
@@ -154,19 +156,12 @@ git clone https://github.com/PaddlePaddle/PaddleOCR.git
154156
python -m pip install -r paddleocr-doc-parsing/scripts/requirements-optimize.txt
155157
```
156158

157-
2. 配置环境变量(需要配置的变量参见[配置环境变量](#配置环境变量)一节),可选择以下任一方式:
158-
159-
**方式 A**:运行配置脚本。
160-
161-
```shell
162-
python paddleocr-text-recognition/scripts/configure.py
163-
python paddleocr-doc-parsing/scripts/configure.py
164-
```
165-
166-
**方式 B**:由 `.env.example` 模板文件创建本地 `.env` 文件,并填写所需变量。
159+
2. 配置环境变量(需要配置的变量参见[配置环境变量](#配置环境变量)一节)。
167160

168161
```shell
169-
cp .env.example .env
162+
export PADDLEOCR_OCR_API_URL="<OCR_API_URL>"
163+
export PADDLEOCR_ACCESS_TOKEN="<ACCESS_TOKEN>"
164+
export PADDLEOCR_DOC_PARSING_API_URL="<DOC_PARSING_API_URL>"
170165
```
171166

172167
3. 运行冒烟测试脚本。

skills/paddleocr-doc-parsing/SKILL.md

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -216,7 +216,6 @@ CONFIG_ERROR: PADDLEOCR_DOC_PARSING_API_URL not configured. Get your API at: htt
216216
- PADDLEOCR_ACCESS_TOKEN
217217
- Optional: PADDLEOCR_DOC_PARSING_TIMEOUT
218218
```
219-
- For security reasons, do not run `configure.py` or create a local `.env` file by default if the skill is installed under a host application directory (for example, `~/.claude/skills`). You should also advise the user not to do this.
220219
221220
3. **If the user provides credentials in chat anyway** (accept any reasonable format), for example:
222221
- `PADDLEOCR_DOC_PARSING_API_URL=https://xxx.paddleocr.com/layout-parsing, PADDLEOCR_ACCESS_TOKEN=abc123...`

0 commit comments

Comments
 (0)