04cbd9786e55e55bfb86fbbbcb4a990c81e3cfee
MyCLI
Personal CLI toolkit - unified interface for various utility scripts.
Installation
make install
Commands
mytoolkit --help
# PDF utilities
mytoolkit pdf compress *.pdf
mytoolkit pdf crop *.pdf
mytoolkit pdf to-tiff *.pdf
# Image utilities
mytoolkit image eps-to-pdf *.eps
mytoolkit image jpg-to-pdf *.jpg -o output.pdf
mytoolkit image tiff-to-pdf *.tiff
mytoolkit image tiff-compress *.tiff
# LaTeX utilities
mytoolkit latex compile *.tex
mytoolkit latex count document.tex
# Video utilities
mytoolkit video avi-to-mp4 *.avi
# BibTeX utilities
mytoolkit bib to-markdown *.bib
mytoolkit bib cv-update
# Utilities
mytoolkit utils albany-cleanup
# Environment & Navigation
mytoolkit env list # List configured paths
mytoolkit env goto research # Print path for cd
mytoolkit env cd apaam # Start shell in path
mytoolkit env status # Show environment status
cd $(mytoolkit env goto study) # Use in scripts
# SSH Connections
mytoolkit ssh list # List configured hosts
mytoolkit ssh connect tianhe # SSH to host
mytoolkit ssh connect starlight
mytoolkit ssh tunnel tianhe # Create port tunnel
mytoolkit ssh cmd tianhe "ls" # Run remote command
# Git Proxy Management
# Git Proxy Management
mytoolkit git proxy status # Show proxy status
mytoolkit git proxy set fastgithub # Set proxy
mytoolkit git proxy set pandafan
mytoolkit git proxy unset # Unset proxy
mytoolkit git proxy list # List available proxies
# Self Management
mytoolkit self update # Update mytoolkit
mytoolkit self uninstall # Uninstall mytoolkit
mytoolkit self info # Show installation info
# Configuration (config.json) - 增删改查
# 方式1: 交互式向导(推荐,无需记忆命令)
mytoolkit wizard # 启动交互式配置向导
# 方式2: 命令行直接操作
mytoolkit config show # Show full config
mytoolkit config list # List top-level sections
mytoolkit config get paths # Get paths section
mytoolkit config get paths.apaam # Get specific path
mytoolkit config get api_keys.deepseek # Get API key
mytoolkit config set paths.new ~/Documents/new # Set simple value
mytoolkit config set api_keys.newkey abc123 # Set new API key
mytoolkit config set --json ssh_hosts.new '{"host":"user@host","port":22}'
mytoolkit config delete paths.old # Delete a key
mytoolkit config delete api_keys.old -y # Delete without confirmation
mytoolkit config paths # List all paths with existence check
mytoolkit config where # Show config file location
mytoolkit config edit # Edit config in $EDITOR
mytoolkit config init # Create config from template
# Environment Variables (API Keys)
mytoolkit env status # Show paths, API keys, Feishu status
mytoolkit env export # Print all export statements
mytoolkit env export deepseek # Export specific API key
mytoolkit env export qwen
mytoolkit env export feishu # Export all Feishu apps
mytoolkit env export claude # Export specific Feishu app
eval "$(mytoolkit env export)" # Load all in current shell
mytoolkit env init # Print shell init snippet
Configuration
All settings are stored in bin/config.json:
paths: Quick navigation pathsssh_hosts: SSH connection settingsgit_proxies: Git proxy URLsopenfoam: OpenFOAM mount settingsapi_keys: API keys (deepseek, qwen)feishu_apps: Feishu app credentials
Security Note
config.json contains sensitive information (API keys) and is gitignored.
The repository includes config.json.example as a template.
Setup
-
Copy the example config:
cp bin/config.json.example bin/config.json -
Edit with your actual API keys:
mytoolkit config edit -
Add to your
~/.zshrcto auto-load:eval "$(mytoolkit env export 2>/dev/null)"
Uninstall
make uninstall
Languages
BibTeX Style
56.8%
Python
31.6%
ObjectScript
6.4%
Typst
2%
TeX
1.7%
Other
1.5%