GAP(1)

πŸ’… GAP β€” the girlies' guide to Groups, Algorithms and Programming ✨

okay bestie, welcome to the GAP manual, section 1 (user commands, the good stuff) πŸ’–. This is gap, the one and only. Grab a snack, we're going through every single flag, no cap. πŸ“


🌸 SYNOPSIS 🌸

gap [OPTIONS] [FILES]

πŸ¦‹ DESCRIPTION πŸ¦‹

So like. GAP is a system for computational discrete algebra, with particular emphasis on Computational Group Theory. She's not just one thing either β€” she's giving:

  • a whole programming language,
  • a library of thousands of functions implementing algebraic algorithms written in the GAP language,
  • plus large data libraries of algebraic objects.

People use GAP in research and teaching for studying groups and their representations, rings, vector spaces, algebras, combinatorial structures, and more. Multitasking icon behavior, honestly. πŸ‘‘


🌈 Startup 🌈

  • -h, --help β€” prints this help, then dips. bye πŸ’¨
  • --version β€” prints the GAP version and exits.
  • --print-gaproot β€” prints the primary GAP root and exits.
  • -b, --banner β€” disables/enables the banner.
  • -c <expr> β€” execute the expression <expr>.
  • --systemfile <file> β€” read this file after lib/system.g.

πŸŽ€ Input/output πŸŽ€

  • -q, --quiet β€” enables/disables quiet mode.
  • -e β€” disables/enables quitting on Ctrl+D.
  • -f β€” force line editing.
  • -n β€” prevent line editing.
  • -E, --readline β€” disables/enables use of the readline library (if possible).
  • -x, --width <num> β€” set line width.
  • -y, --lines <num> β€” set number of lines.
  • -p β€” enables/disables package output mode (this one's for use by XGAP and similar interfaces).

🧚 Memory 🧚

quick PSA bestie, this whole section may use postfix 'k' = *1024, 'm' = *1024*1024, 'g' = *1024*1024*1024 πŸ’…

  • -g, --gasinfo β€” show GASMAN messages (full/all/no garbage collections). Only available if GAP uses GASMAN, so vibe check your build first.
  • -m, --minworkspace <mem> β€” set the initial workspace size.
  • -o, --maxworkspace <mem> β€” set the workspace size where GAP will warn about excessive memory usage (heads up: GAP may still allocate more, she's dramatic). Only available if GAP uses GASMAN.
  • -K, --limitworkspace <mem> β€” set the maximal workspace size β€” and this one is for real, GAP never allocates more.
  • -s <mem> β€” set the initially mapped virtual memory. Only available if GAP uses GASMAN.

🌸 Roots 🌸

  • -l, --roots <paths> β€” set or modify the GAP root paths. Directories are separated using ';'. Putting ';' at the start/end of the list appends directories to the start/end of the existing list of root paths. Tiny semicolon, big power. ✨
  • -r β€” disables/enables the user GAP root dir GAPInfo.UserGapRoot.
  • --packagedirs <paths> β€” add additional GAP directory paths. Directories are separated using ';'.

πŸ’œ Loading πŸ’œ

  • -A β€” disables/enables autoloading of suggested GAP packages.
  • -D β€” enables/disables debugging the loading of files.
  • -M β€” disables/enables loading of compiled modules.

😭 Error handling, REPL 😭

  • -T, --nobreakloop β€” disables/enables break loop and error traceback.
  • --alwaystrace β€” always print error traceback. This one overrides the behaviour of -T, so she wins the argument, periodt.
  • --quitonbreak β€” quit GAP with a non-zero return value instead of entering the break loop.
  • --norepl β€” Disable the GAP read-evaluate-print loop (REPL).
  • --nointeract β€” Start GAP in non-interactive mode, which disables both the REPL and the break loop.

πŸ’– Workspaces πŸ’–

heads up, these are only available if GAP uses GASMAN:

  • -L <file> β€” restore a saved workspace.
  • -R β€” prevent restoring of workspace (this ignores -L, so don't be surprised bestie).

⭐ Profiling ⭐

  • --prof <file> β€” run ProfileLineByLine(<file>) on GAP start.
  • --memprof <file> β€” run ProfileLineByLine(<file>) on GAP start with recordMem := true.
  • --cover <file> β€” run CoverageLineByLine(<file>) on GAP start.

🫢 Internal developer tools 🫢

(this heading is literally just "Internal developer tools", she's lowkey unbothered, I respect it)

  • -N β€” do not use hidden implications.
  • -O β€” disables/enables loading of obsolete files.
  • --bare β€” Attempt to start GAP without even needed packages. Girl is running on vibes and nothing else. πŸ’€
⚠️ IMPORTANT CAVEAT: Short boolean options toggle the current value each time they are called. So calling one twice doesn't do the same thing twice, it flips it back. Also, default actions are indicated first β€” iykyk.

πŸ‘‘ AUTHORS πŸ‘‘

The GAP Group <http://www.gap-system.org> 🫢


Copyright (1988--2025) by its authors.

GAP is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version.


πŸ¦‹ SEE ALSO πŸ¦‹

You can read the complete manual in /usr/share/gap/doc πŸ“– or you can use the online help system. Type ?help inside GAP to access it. Then type

?Reference: options!under UNIX

to access the full documentation of options. (the ! is not a typo, it's the help-system link syntax, slay πŸ”₯)


okay that's the whole page bestie, you're officially GAP-pilled πŸ’…βœ¨ β€” this was the GAP(1) page from The GAP team, version dated July 2026. go forth and compute, ily 🩷

πŸ“¦ where this page comes from