Files
nyaterm/scripts/quick-commands.import.example.json
T
Kang 312d53a6f5 feat: Implement quick commands import functionality with scripts and example JSON
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.
2026-05-12 13:17:19 +08:00

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"
}
]
}