Files
TSYSDevStack/documentation/CHEATSHEET.md
ReachableCEO 544d1c31e5 Toolboxes-Docs (vibe-kanban c5c3e68d)
TSYS Group Development Stack - Toolboxes - DocsAndDiagrams - Product Requirements Document -

## Docker Image Boilerplate

Image name: tsysdevstack-toolboxes-docs
Image username: tsysdevstack
Image base: latest Debian stable

- ALL operations MUST be as the tsysdevstack user
- NO ROOT ACCESS should be possible at runtime (no sudo, no su)
- The ONLY permitted use of root is during build time, and that MUST be to the ABSOLUTE MINIMUM extent possible (just for apt-get operations and creating the tsysdevstack user). Switching to tsysdevstack as early as possible.
- mise (as the tsysdevstack user) MUST be used to install all language runtimes (node/python/rust/ruby).
- If an application is installed via npm/pip/cargo/gem, those application installs MUST be done via mise managed versions of npm/pip/cargo/gem.
- NO system wide (apt-get) installs of language runtimes are allowed
- This is a production container. Use ALL best common practices for the building and securing of docker containers. (Buildx, multi stage, hardened )
- Use yamllint/hadolint/shellcheck (available via docker images on this system) as a QA gate BEFORE attempting to build the image. If ANY changes to Dockerfile/run.sh/build.sh/test.sh are made, run them through hadolint/shellcheck respectively.
- ALL hadolint/yamllint/shellcheck issues MUST be FULLY RESOLVED always. The only acceptable QA outcome is when those tools return no warnings/errors.
- Think about how to efficiently create the Dockerfile, keeping caching of layers in mind , especially how layers can be cached across multiple different image builds.
- Utilize buildkit/buildx
- This container needs to run on PC/Raspberry Pi/Mac M series.
- Reproducibility of the build is PARAMOUNT! Use version pinning for EVERYTHING. Do the research to find the latest stable version and update Dockerfile and other files accordingly. Do not "just use latest", that is never acceptable. You MUST pin the Debian package versions, and any of the tooling you install via mise managed runtimes.
- Use the examples subdirectory and create example artifacts and workflow scripts to fully QA the functionality of the container
- Create a README.md file that is BEAUTIFULLY formatted (using table of contents/headers/icons/graphics/whitespace/tables (with left justified text)). Document the container image thoroughly.
- Use the documentation subdirectory and creaate the following artifacts:
  - TROUBLESHOOTING.md
  - CHEATSHEET.md
  - USAGE.md
- Use the output subdirectory and create the following artifacts (ensure they will pass strict QA testing/auditing):

- Dockerfile
- docker-compose.yml
- devcontainer.json
- run.sh
- build.sh
- test.sh

## Docker Image Requirements

The overall purpose of this container image is to be a document production workhorse.

Core workflows:

- pandoc

 markdown to pdf/doc (for resumes) (so simple formatting, ATS optimized)
 markdown to pdf (for project plans, budgets, proposals etc)
 Joplin markdown notes to PDF preserving all the extensive formatting that Joplin has when it renders the notes to pdf

The generated PDFs need to be beautiful. Rich fonts, graphics, formatting of the code listings etc. We will be heavily leaning into texlive/xetex for this. I would also like to explore using wkhtmltopdf so that CSS can be used to style the output.

- mdbook
- typst
- marp
- markwhen
- kroki cli
- quarto
- bibtool
- vale

Add in any other common support tools you think may be needed (such as jq/yq).

Generally this image will be used "headless" to run a generation workflow (or mdbook serve during active development of an mdbook site).

It should have fish as it's shell (and also bash/zsh) for the occasional interactive use.

Follow test-driven-development for this project without fail.

Ensure that the image is built successfully and fully validated against this PRD

Use the /home/localuser/TSYSDevStack/Toolbox/docs/output directory for all of the work you do for this task.
2025-11-11 20:59:13 -06:00

4.4 KiB

CHEATSHEET.md

TSYSDevStack - Toolboxes - DocsAndDiagrams

Quick Reference for Document Production Tools


🐳 Docker Commands

Task Command
Run interactively docker run -it --rm -v $(pwd)/output:/home/tsysdevstack/TSYSDevStack/Toolbox/docs/output tsysdevstack/toolboxes-docs
Run specific command docker run --rm -v $(pwd)/output:/home/tsysdevstack/TSYSDevStack/Toolbox/docs/output tsysdevstack/toolboxes-docs <command>
Build image docker build -t tsysdevstack/toolboxes-docs .
Run with local files docker run --rm -v $(pwd):/data -v $(pwd)/output:/home/tsysdevstack/TSYSDevStack/Toolbox/docs/output tsysdevstack/toolboxes-docs

📝 Pandoc Commands

Task Command
Markdown to PDF pandoc input.md -o output.pdf --pdf-engine=xelatex
Markdown to DOCX pandoc input.md -o output.docx
HTML to PDF pandoc input.html -o output.pdf --pdf-engine=xelatex
With custom template pandoc input.md -o output.pdf --template=mytemplate --pdf-engine=xelatex
Resume from Markdown pandoc resume.md -o resume.pdf --template=eisvogel --pdf-engine=xelatex
Include CSS pandoc input.md -o output.pdf --css=styles.css --pdf-engine=xelatex

📘 mdBook Commands

Task Command
Create new book mdbook init mybook
Build book mdbook build /path/to/book -d /home/tsysdevstack/TSYSDevStack/Toolbox/docs/output
Serve book locally mdbook serve /path/to/book --hostname 0.0.0.0 --port 3000
Watch and rebuild mdbook watch /path/to/book

✍️ Typst Commands

Task Command
Compile document typst compile document.typ output.pdf
Watch for changes typst watch document.typ output.pdf
Export as PNG typst compile document.typ output.png

🎞️ Marp Commands

Task Command
Convert to PDF marp input.md --pdf --output /home/tsysdevstack/TSYSDevStack/Toolbox/docs/output/presentation.pdf
Convert to PPTX marp input.md --pptx --output /home/tsysdevstack/TSYSDevStack/Toolbox/docs/output/presentation.pptx
Serve presentation marp --server --port 8080

📊 Quarto Commands

Task Command
Render document quarto render document.qmd --to pdf
Convert to HTML quarto render document.qmd --to html
Convert to DOCX quarto render document.qmd --to docx
Render with custom format quarto render document.qmd --to revealjs
Create new project quarto create-project myproject --type book

🚦 Kroki Commands

Task Command
Convert diagram kroki --file diagram.yaml --output /home/tsysdevstack/TSYSDevStack/Toolbox/docs/output/diagram.svg
Convert with format kroki --file diagram.txt --type blockdiag --output /home/tsysdevstack/TSYSDevStack/Toolbox/docs/output/diagram.png

📜 Vale Commands

Task Command
Check document vale /path/to/document.md
Check with specific style vale --config=/path/to/.vale.ini /path/to/document.md

🔧 System Tools

Tool Purpose Example
jq JSON processor `echo '{"name":"test"}'
yq YAML processor yq '.key' file.yaml
wkhtmltopdf HTML to PDF wkhtmltopdf input.html output.pdf
bibtool Bibliography tool bibtool -s -i refs.bib

🛠️ Mise Commands

Task Command
Install runtimes mise install
Use specific Python version mise use --global python@3.12.6
Use specific Node.js version mise use --global node@21.7.3
Show current tools mise current
Install specific tool mise install python@3.12.6

🌐 TeXLive Commands

Task Command
Compile with XeTeX xelatex document.tex
Compile with PDFLaTeX pdflatex document.tex
Manage packages tlmgr install package-name
Update packages tlmgr update --all

📁 Directory Locations

  • Input/Working Directory: /data (when mounting local files)
  • Output Directory: /home/tsysdevstack/TSYSDevStack/Toolbox/docs/output
  • User Home: /home/tsysdevstack
  • Mise Configuration: /home/tsysdevstack/.config/mise
  • Mise Data: /home/tsysdevstack/.local/share/mise

🔑 User Information

  • Username: tsysdevstack
  • UID: 1000
  • Shell Options: bash, zsh, fish