Zhengshou Lai e6742d4e9e style(template): rewrite default docx template from scratch
- Create clean template with python-docx + lxml
- Normal: Cambria+SimSun, 12pt, firstLine=480, justify
- Title: centered
- Heading 1-5: left-aligned
- docDefaults: sz=24, kinsoku=1
2026-05-19 22:28:09 +08:00
2026-04-14 18:39:09 +08:00

mytoolkit

Personal CLI toolkit — unified entry point for everyday file conversion, format wrangling, and project chores.

Install

make install                                  # builds + symlinks ~/.local/bin/mytoolkit
mytoolkit --version
mytoolkit templates register ~/workspace/templates   # one-time, points at template root

Top-level commands

mytoolkit --help
Command What it does
convert Universal format conversion (md/img/pdf/eps/avi/bib → pdf/docx/tiff/mp4/md). Auto-detects from extensions.
pdf compress / crop / merge / bookmark / to-tiff
image compress / eps-fix / eps-to-pdf / jpg-to-pdf / tiff-to-pdf / tiff-compress / generate (Doubao/Seedream)
latex compile / count
bib to-markdown / cv-update
video avi-to-mp4
webpage Docusaurus build/list/rebuild/push
mail IMAP/SMTP client (read/draft/forward/reply, no auto-send)
templates Register and inspect external template root
env Manage stored vars (api keys, paths, feishu app credentials)
ssh list / connect / tunnel / cmd
git proxy (set/unset/list/status)
server Manage dev/serve servers
update Reinstall from local repo
uninstall Uninstall

For any subcommand: mytoolkit <cmd> --help.

Templates

mytoolkit convert -t <name> reads templates from an external directory you register (templates are not bundled). Layout:

<root>/md-to-pdf/<name>/template.typ
<root>/md-to-docx/<name>/template.docx
mytoolkit templates register /path/to/templates
mytoolkit templates list       # lists each template with its absolute path

Registry is stored at ~/.config/mytoolkit/templates.json.

User config

All user-level config lives under ~/.config/mytoolkit/:

File Owner Purpose
env.json mytoolkit env API keys, paths, feishu credentials (flat key/value)
mail.json mytoolkit mail IMAP/SMTP server settings
templates.json mytoolkit templates Pointer to external template root

Manage env vars via the CLI — no need to hand-edit:

mytoolkit env list                       # show all (Storage path printed at top, secrets masked)
mytoolkit env get apikey_ark             # read one
mytoolkit env set apikey_ark <value>     # write one
mytoolkit env set apikey_ark --secret    # prompt for value, hidden input
mytoolkit env remove apikey_ark          # delete one
mytoolkit env export                     # print MYCLI_FOO=... export statements
eval "$(mytoolkit env export)"           # load into current shell

Legacy bin/config.json (in the source dir) is auto-migrated to ~/.config/mytoolkit/env.json on first run after upgrade.

Uninstall

mytoolkit uninstall
# or
make uninstall

User config under ~/.config/mytoolkit/ is left in place.

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%