MyCLI

Personal CLI toolkit - unified interface for various utility scripts.

Installation

make install

Commands

mycli --help

# PDF utilities
mycli pdf compress *.pdf
mycli pdf crop *.pdf
mycli pdf to-tiff *.pdf

# Image utilities
mycli image eps-to-pdf *.eps
mycli image jpg-to-pdf *.jpg -o output.pdf
mycli image tiff-to-pdf *.tiff
mycli image tiff-compress *.tiff

# LaTeX utilities
mycli latex compile *.tex
mycli latex count document.tex

# Video utilities
mycli video avi-to-mp4 *.avi

# BibTeX utilities
mycli bib to-markdown *.bib
mycli bib cv-update

# Utilities
mycli utils albany-cleanup

# Environment & Navigation
mycli env list              # List configured paths
mycli env goto research     # Print path for cd
mycli env cd apaam          # Start shell in path
mycli env status            # Show environment status
cd $(mycli env goto study)  # Use in scripts

# SSH Connections
mycli ssh list              # List configured hosts
mycli ssh connect tianhe    # SSH to host
mycli ssh connect starlight
mycli ssh tunnel tianhe     # Create port tunnel
mycli ssh cmd tianhe "ls"   # Run remote command

# Git Proxy Management
mycli git proxy             # Show proxy status
mycli git proxy fastgithub  # Set proxy
mycli git proxy pandafan
mycli git proxy -u          # Unset proxy
mycli git proxy-list        # List available proxies

# Self Management
mycli self update           # Update mycli
mycli self uninstall        # Uninstall mycli
mycli self info             # Show installation info

# Configuration (config.json) - 增删改查
mycli config show                   # Show full config
mycli config list                   # List top-level sections
mycli config get paths              # Get paths section
mycli config get paths.apaam        # Get specific path
mycli config get api_keys.deepseek  # Get API key
mycli config set paths.new ~/Documents/new      # Set simple value
mycli config set api_keys.newkey abc123         # Set new API key
mycli config set --json ssh_hosts.new '{"host":"user@host","port":22}'
mycli config delete paths.old                   # Delete a key
mycli config delete api_keys.old -y             # Delete without confirmation
mycli config paths                  # List all paths with existence check
mycli config where                  # Show config file location
mycli config edit                   # Edit config in $EDITOR
mycli config init                   # Create config from template

# Environment Variables (API Keys)
mycli env status                    # Show paths, API keys, Feishu status
mycli env export                    # Print all export statements
mycli env export deepseek           # Export specific API key
mycli env export qwen
mycli env export feishu             # Export all Feishu apps
mycli env export claude             # Export specific Feishu app
eval "$(mycli env export)"          # Load all in current shell
mycli env init                      # Print shell init snippet

Configuration

All settings are stored in mycli/config.json:

  • paths: Quick navigation paths
  • ssh_hosts: SSH connection settings
  • git_proxies: Git proxy URLs
  • openfoam: OpenFOAM mount settings
  • api_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

  1. Copy the example config:

    cp mycli/config.json.example mycli/config.json
    
  2. Edit with your actual API keys:

    mycli config edit
    
  3. Add to your ~/.zshrc to auto-load:

    eval "$(mycli env export 2>/dev/null)"
    

Uninstall

make uninstall
S
Description
mirror of github.com/apaam/mytoolkit (CI only)
Readme
1.4 MiB
Languages
BibTeX Style 56.8%
Python 31.6%
ObjectScript 6.4%
Typst 2%
TeX 1.7%
Other 1.5%