nx-bt
v0.1.0
Published
脚本执行器:云 KV 拉取 + 本地 REPL + bash 运行
Readme
nx-bt
Cloud-KV-backed shell script manager. Pulls shell scripts tagged sh from the
dev_ctr_hello backend (kvcli-compatible API) into a local directory and runs
them via bash. Operates as a REPL by default.
Install
npm install -g nx-btUsage
nx-bt # enter REPL
nx-bt login # authenticate
nx-bt download [key] # thin download — key (or all tag=sh); --tag=<t>, --force
nx-bt upload <key> <filepath> # thin upload: KV-key + local-script-path
nx-bt list # list local scripts
nx-bt run # interactive run
nx-bt exec <key> # non-interactive runIn REPL:
2196824165@laptop:~/nx-bt/scripts$ login
2196824165@laptop:~/nx-bt/scripts$ ls
2196824165@laptop:~/nx-bt/scripts$ cat <key>
2196824165@laptop:~/nx-bt/scripts$ cd <key> # select a script
2196824165@laptop:~/nx-bt/scripts$ run [<key>] # run (current selection if no key)
2196824165@laptop:~/nx-bt/scripts$ download [key] # thin fetch (no prompts)
2196824165@laptop:~/nx-bt/scripts$ upload <k> <path> # thin push (no prompts)
2196824165@laptop:~/nx-bt/scripts$ group # interactive workspace menu
2196824165@laptop:~/nx-bt/scripts$ help
2196824165@laptop:~/nx-bt/scripts$ exitCtrl-C does not exit the REPL. Only
exit/quitdoes. Ctrl-C during a running script will interrupt the bash child and return to the prompt.
Configuration
File: ~/.nx-bt/config.toml (Windows: %APPDATA%\nx-bt\config.toml).
Falls back to <cwd>/.nx-bt/ if the user dir is not writable.
[server]
base_url = "http://47.110.80.47:8988"
group_id = 0
[auth]
token = "..."
user_id = 0
email = ""
[prefs]
scripts_dir = ""
log_level = "info"Override paths via NX_CD_HOME. Use NX_CD_BASH to point at a custom bash.
License
MIT © 2026 joke-lx
