mirror of
https://github.com/nyakang/nyaterm.git
synced 2026-09-21 16:01:29 +00:00
This commit introduces two new scripts, `import-quick-commands.ps1` and `import-quick-commands.sh`, for importing quick commands into the NyaTerm database. It also adds an example JSON file, `quick-commands.import.example.json`, demonstrating the expected format for quick commands and categories. Additionally, a new Rust example, `import_quick_commands.rs`, is added to handle the import logic, including options for database path, replacement, dry run, and backup. This enhancement streamlines the process of managing quick commands within the application.
35 lines
688 B
JSON
35 lines
688 B
JSON
{
|
|
"categories": [
|
|
{
|
|
"id": "general",
|
|
"name": "General"
|
|
},
|
|
{
|
|
"id": "k8s",
|
|
"name": "Kubernetes"
|
|
}
|
|
],
|
|
"commands": [
|
|
{
|
|
"id": "cmd-list-files",
|
|
"label": "List files",
|
|
"command": "ls -la",
|
|
"category_id": "general",
|
|
"description": "List files with details",
|
|
"color_tag": "blue",
|
|
"icon_tag": "terminal",
|
|
"pinned": true,
|
|
"execution_mode": "execute",
|
|
"source": "manual",
|
|
"risk_level": "low"
|
|
},
|
|
{
|
|
"label": "Kubernetes pods",
|
|
"command": "kubectl get pods -A",
|
|
"category": "Kubernetes",
|
|
"execution_mode": "append",
|
|
"risk_level": "low"
|
|
}
|
|
]
|
|
}
|