Skip to main content
This is the fun part. You’ll start from a professionally designed template, use Gemini CLI to customise it, and compile it into a polished PDF. No coding required — just clear descriptions.

The Vibe Coding Loop

Every step follows the same pattern: Start from a template. Ask Gemini CLI to customise it. Compile to PDF. Review and repeat until it’s perfect.
1

Create a project folder

  1. Open File Explorer
  2. Go to your Documents folder
  3. Right-click in an empty space → NewFolder
  4. Name it my-pdfs
Name it something simple like my-pdfs. Use lowercase letters with no spaces.
2

Open terminal in your project folder

Open your my-pdfs folder in File Explorer. Click the address bar at the top, type powershell, and press Enter.
3

Initialise a cover letter template

Typst has a library of free, community-made templates called Typst Universe. We’ll start with fireside — a clean, modern cover letter template.In your terminal, run:
typst init @preview/fireside:1.0.0
This downloads the template and creates a ready-to-use project folder with a .typ file inside.
What just happened? The typst init command pulled a professionally designed template from Typst Universe and set up a project folder for you. The template already has a polished layout — you just need to fill in your details.
If you see an error, try these fixes:
  • “typst: command not found” — Go back to the setup page and install Typst CLI
  • Network error — Check your internet connection; typst init downloads the template from the web
  • Permission error — On Windows, try running PowerShell as Administrator. On macOS, try adding sudo before the command
4

Start Gemini CLI

Navigate into the template folder and start Gemini CLI:
gemini
Press Enter. You should see Gemini CLI start up with a prompt ready for your input.
5

Customise with Gemini CLI

Now ask Gemini CLI to customise the template for you. Pick the style that appeals to you:
Copy this prompt — Clean customisation
I have a Typst cover letter template (fireside) in this folder.
Please customise it with:
- Placeholder name and contact details at the top
- Today's date in NZ format (e.g. 19 March 2026)
- A greeting, 3 short paragraphs of placeholder content, and a sign-off
- Clean, professional sans-serif font
Use NZ English spelling throughout. Keep the template's existing layout
but update the content and styling.
Then compile it to PDF using typst compile.
Don’t worry about getting it perfect on the first try. You’ll refine the design in the next steps — that’s the whole point of vibe coding!
6

Review your PDF

Open the compiled PDF by double-clicking it in your file explorer. It will open in your default PDF viewer.
Starting from a template means your first result already looks professional. The template handles layout, typography, and spacing — Gemini CLI just customises the content and styling to your taste.
7

Iterate and improve

Not happy with the result? That’s normal — and that’s the whole point! Copy any of these follow-up prompts into Gemini CLI:
Change the font
Change the font to a modern sans-serif font. Keep everything else the same.
Then recompile to PDF.
Add colour
Add a subtle colour accent — use a dark teal or navy blue for headings
and a thin coloured line under my name. Keep the overall design professional.
Then recompile to PDF.
Adjust margins and spacing
The margins feel too wide. Reduce the margins to 2cm on all sides
and tighten the line spacing slightly so the letter feels more compact.
Then recompile to PDF.
Add a footer
Add a small footer at the bottom of the page with "Page 1 of 1" centred
and my email address on the right side.
Then recompile to PDF.
The vibe coding loop: customise → compile → review → refine. Keep going until you love it! You can send as many prompts to Gemini CLI as you want.
8

Personalise for a real job

Ready to create a real cover letter? Copy this template prompt and fill in your details:
Copy this prompt and fill in the [brackets]
Update my cover letter for a real application:
- My name: [Your Name]
- My email: [your.email@example.com]
- My phone: [your phone number]
- I'm applying for: [Job Title] at [Company Name]
- My key skills: [skill 1, skill 2, skill 3]
- Why I'm interested: [one sentence about why you want this role]
- My relevant experience: [brief description of relevant experience]

Write the cover letter content in a professional but warm tone.
Keep it to one page. Use NZ English spelling.
Then compile it to PDF.
Save your prompts! Keep a text file with your personal details so you can quickly generate cover letters for different jobs. Change the company name, role, and key skills each time.

What Just Happened?

Here’s what you did, step by step:
  1. You initialised a professional template from Typst Universe with typst init
  2. Gemini CLI customised the template — updating content, fonts, colours, and layout
  3. Typst compiled the code into a pixel-perfect PDF
  4. You iterated — asking for design changes, recompiling, and reviewing until it looked right
The key insight: you started from a professionally designed template instead of a blank page. The template gave you a solid foundation, and AI handled the customisation. You never had to learn Typst syntax — you described what you wanted, and Gemini CLI made it happen.

Troubleshooting

The .typ file might be empty or have an error. Ask Gemini CLI:
The PDF is blank. Can you check the .typ file for errors and fix them?
Then recompile it to PDF.
If you see an error when compiling, paste the error message into Gemini CLI:
I got this error when compiling: [paste the error message here]
Can you fix the Typst code and recompile?
Typst error messages are clear and specific — they tell you exactly which line has the problem.
Ask Gemini CLI to fix the layout:
The layout doesn't look right — [describe what's wrong, e.g. "the text
is too close to the edges" or "the spacing between paragraphs is too large"].
Can you fix it and recompile?
You can re-initialise the template:
typst init @preview/fireside:1.0.0
Or tell Gemini CLI to start from scratch:
I want to start fresh. Create a new cover letter from scratch as a .typ
file — don't use the template. [Then describe what you want]
Happy with your cover letter? Head to Explore templates to discover more document types you can create — invoices, reports, checklists, and more.