This page lists every bogo command with its options, and says exactly what the safety
options --replay, --save-replay, --dry, --record and --yes do. bogo --help and
bogo COMMAND --help print the same options in the terminal.
The commands
| Command | What it does |
|---|---|
bogo new NAME |
Make a project in a new folder NAME |
bogo run [OPTIONS] FILE [WORDS] |
Check the file, then run it |
bogo FILE.bogo [WORDS] |
The short form of bogo run FILE.bogo |
bogo check [--json] [--stdin NAME] [FILE] |
Check a file without running it |
bogo test [-k WORD] [--now TIME] [FILE] |
Run the tests; nothing is contacted |
bogo shell [--replay FOLDER] [--record] |
An interactive prompt with the built-in names ready |
bogo fmt [--check] [--stdin NAME] [FILES] |
Tidy the layout of .bogo files |
bogo doc [NAME] |
Show the reference of a built-in name |
bogo vscode |
Put the Bogolang extension into VS Code: see vscode.md |
bogo pack [--name NAME] [--icon FILE] FILE |
Make one file to share: the program with all it needs |
bogo add SPEC [--from FOLDER] |
Add a Python package to the project |
bogo remove NAME |
Remove a package from the project |
bogo sync [--from FOLDER] |
Make the environment of the project again from bogo.lock |
bogo env |
Show the environment of the project |
bogo engine list |
List the Python engines |
bogo engine install VERSION [--from FILE] |
Add an engine |
bogo engine use VERSION |
Use an engine for this project |
bogo login [PROFILE] |
Store a device login on this computer |
bogo logout [PROFILE] |
Remove a stored login |
bogo version |
Show the version of Bogolang and of its engine |
bogo upgrade [--check] [--yes] |
Fetch the newest Bogolang, check its sum and install it |
bogo uninstall [--yes] |
Remove Bogolang from this machine (Linux) |
bogo run
Checks the file and, when the check finds no error, runs it. The program starts in main of
the class named after the file (language.md). Options go before the file name.
Words after the file name go to the program, in args.
bogo run --replay saved --dry change_vlan.bogo
bogo run report.bogo north 2027-01
bogo report.bogo north 2027-01
| Option | What it does |
|---|---|
--replay FOLDER |
Answer from saved outputs in FOLDER; connect to no device and send no probe |
--save-replay FOLDER |
Run for real, and save each answer in FOLDER for a later --replay |
--dry |
Show what each change block would send, and send none of it |
--record |
At the end, show every command sent, with its time and result |
--record-file FILE |
Write that record to a CSV file |
--yes |
Answer yes to every confirm() |
The exit code is 0 when the program ends well, 1 when the check finds an error, and the code of the program otherwise.
bogo run takes its options before the file. Every word after the file is given to the
program, as its args. So an option of bogo written after the file would not be applied,
and a run meant to use saved answers would be a live one. bogo refuses that and runs
nothing:
--replay stands after the file. There it is given to the program and bogo does not apply it.
Put it before the file, for example: bogo run --replay saved --dry reach_hosts.bogo
Nothing was run. To give the program this very word, write it after --
A program that takes a word such as --dry for itself gets it after --:
bogo run tool.bogo -- --dry.
The safety options
--replay FOLDER
Every command that would reach the network answers from a file in FOLDER instead. A command with no saved answer fails, and the message names the file it needs.
| Command | Where its answer is read |
|---|---|
Device sessions (show, run, backup, snapshot and the readers) |
FOLDER/DEVICE/COMMAND.txt, one file per command |
snmp_get, snmp_walk |
FOLDER/DEVICE/snmp.txt |
ping, ping_all, trace, tcping, resolve, scan |
FOLDER/reach/ |
http_get, Meraki, RESTCONF, inventory_api |
FOLDER/web/ |
on syslog, on trap, on netflow |
FOLDER/listen/ (no port is opened) |
In a replay a change block connects to nothing and changes nothing: its lines go to the run
record only. webhook(...) posts nothing, and mail(...) prints the mail with the word
REPLAY and sends nothing.
The files are plain text, so you can write one by hand for a trial. The thirteen programs in
../examples each carry their saved answers in a folder saved.
--save-replay FOLDER
The program runs for real and contacts what it contacts. Each answer is also saved in FOLDER,
in the layout above. A later run with --replay FOLDER then needs no device and no network.
Read the saved files before you share them: they hold what the devices answered.
--dry
| What | Under --dry |
|---|---|
A change block |
Prints the apply and rollback lines it would send, and sends nothing |
mail(...), webhook(...) |
Printed, not sent |
An only between block outside its window |
Skipped with a line, where it would stop the program |
dry_run() |
Gives True, so the program can say "would add" and not "added" |
Read-only commands (show, ping and the rest) |
Run for real. Add --replay to contact nothing at all |
A run of the example ../examples/change_vlan with both options:
bogo run --replay saved --dry change_vlan.bogo
DRY RUN: change on core-sw1. Nothing is sent.
apply:
vlan 30
name CAMERAS
interface GigabitEthernet1/0/2
switchport trunk allowed vlan add 30
rollback:
interface GigabitEthernet1/0/2
switchport trunk allowed vlan remove 30
no vlan 30
core-sw1: VLAN 30 would be added, nothing was sent
access-sw3: VLAN 30 is already there, nothing to do
The program asks dry_run() for its last line:
done: str = "would be added, nothing was sent" if dry_run() else "added"
print(done)
--record and --record-file FILE
Every command sent to a device, every reach command and every alert is one line of the run
record: the device, the command, the start time in local time and in UTC, how long it took,
whether it worked, and the error. Secrets never enter it. --record prints it at the end, on
the error stream; --record-file FILE writes it as CSV.
bogo run --replay saved --record device_table.bogo
device command start_local start_utc seconds ok error
core-sw1 show version 2026-11-20T18:07:16+01:00 2026-11-20T17:07:16+00:00 0.00 True
edge-rt2 show version 2026-11-20T18:07:16+01:00 2026-11-20T17:07:16+00:00 0.00 True
access-sw3 show version 2026-11-20T18:07:16+01:00 2026-11-20T17:07:16+00:00 0.00 True
--yes
confirm("question") asks yes or no at the keyboard. With no keyboard the answer is no. With
--yes it is yes, with no question asked.
bogo check
bogo check link_check.bogo
bogo check
Checks the file and the .bogo files it imports, and runs nothing. In a project, with no
file, it checks main.bogo with the other files of the project. It prints
FILE: no errors, or each mistake with its line and column. When the program holds
Untyped objects, it then lists their lines for review. Exit code 0 or 1.
bogo check does not ask for a start class: a library file passes.
bogo test
| Form | What it runs |
|---|---|
bogo test |
Every test file tests/test_*.bogo of the project |
bogo test FILE |
The tests of one file |
-k WORD |
Only the tests whose shown name (TestClass.test_name) holds WORD |
--now TIME |
Gives every test this time, written like 2027-01-15T10:00:00+01:00 |
A test contacts nothing. Every test runs as if under --replay, --dry and --yes together.
The saved answers are read from tests/replay in a project. For bogo test FILE outside a
project they are read from the folder replay beside the file, or saved when there is no
replay. A command with no saved answer fails its test. dry_run() is True in a test.
Each test file runs in a process of its own. A test file with an error is not run and counts as failed. An error in a file that the tests use stops all of them. The exit code is 0 when all pass and 1 otherwise.
bogo shell
An interactive prompt, with every built-in name ready. Inside a project it uses the packages of the project.
- Each line goes through the reader, so literals work:
192.0.2.0/24,5min,-18.5dBm. - Brackets may be left out after a built-in function and a space:
ping 192.0.2.1is read asping(192.0.2.1). A line that is already valid Python is left as it is, sosummarize [a, b]is read as an index, and fails. - A value is shown when the line is not an assignment. The last result is kept in
_. - Types are not checked in the shell.
- A
changeblock is refused. Device access is read-only. - The shell does not run dry:
mail(...)typed there sends a mail. --replay FOLDERand--recordwork as forbogo run.exitor the end of input leaves it. Ctrl+C stops the running line, not the shell.
>>> 1Gbps + 500Mbps
1.5Gbps
>>> n = 192.0.2.0/24
>>> n.split(26)
[Net("192.0.2.0/26"), Net("192.0.2.64/26"), Net("192.0.2.128/26"), Net("192.0.2.192/26")]
>>> 192.0.2.77 in n
True
The .bogo files of a project cannot be imported in the shell yet.
bogo fmt
| Form | What it does |
|---|---|
bogo fmt |
Tidy every .bogo file of the project (not in folders whose name starts with a dot) |
bogo fmt FILE ... |
Tidy these files |
--check |
Change nothing; list the files that would change; exit code 1 if any would |
It is built on Black, with lines of 100 characters and no other setting. It never changes what a program does: after tidying it compares the program before and after, and if they differ in anything the file is left as it was, with a sentence that says so. A file with a syntax error is left as it was.
The header line of each new statement is left as written; only its indentation follows. The
whole inside of a change block and of a rule block is never touched. A file keeps its line
endings.
bogo fmt --check change_vlan.bogo
change_vlan.bogo: would be tidied
1 file(s) would be tidied, 0 already tidy
bogo doc
bogo doc NAME prints the signature and the text of one built-in name, the same entry as
reference.md. bogo doc alone lists the names. A wrong name gets the nearest
ones:
bogo doc pingall
pingall is not a built-in name. Did you mean: ping_all, ping, tcping?
bogo pack
Makes one file that runs on another computer of the same system, with no Bogolang and no Python there. It is built on PyInstaller, which the installed Bogolang carries.
| Form | What it does |
|---|---|
bogo pack FILE |
Check the program, then make the file in the folder dist |
--name NAME |
Another name for the file (default: the name of FILE) |
--icon FILE |
Your own icon (on Windows an .ico file); without it the file carries the Bogolang icon |
- A program with an error is not packed.
- It takes a few minutes and makes a file of about 55 to 70 MB.
- A file made on Windows runs on Windows, one made on Linux on Linux.
- It holds the engine, the program, the built-in commands and the packages of the project. It never holds a stored login, token, mail setting or webhook.
- On Linux the builder needs the tools
objdumpandobjcopy. The installed Bogolang carries both. A Bogolang installed another way takes them from the system, and says at once what to install when they are missing. - Some antivirus products distrust programs made this way.
The packed file takes the safety options first, then the words for the program:
| Option | What it does |
|---|---|
--dry, --replay FOLDER, --save-replay FOLDER, --record, --record-file FILE, --yes |
As for bogo run |
--login [PROFILE] |
Store a device login on that computer, then stop |
--logout [PROFILE] |
Remove it, then stop |
--about |
Say what the file holds, then stop |
--help-options |
List these options |
Projects and packages
| Command | What it does |
|---|---|
bogo new NAME |
Make the folder NAME with bogo.toml, a starter main.bogo and an empty tests |
bogo add SPEC |
Install a package into the environment of the project and write it in bogo.toml and bogo.lock. SPEC is a name, or a name and versions: "netaddr>=1.3" |
bogo remove NAME |
Uninstall it and take it out of bogo.toml |
bogo sync |
Delete the environment and make it again from bogo.lock |
--from FOLDER |
For add and sync: install from package files in FOLDER, with no internet |
bogo env |
Show the project, its edition, its engine, the Python of its environment and its packages |
The environment is the folder .bogo of the project. It sees the packages of Bogolang itself,
so a new project downloads nothing. bogo.lock holds the packages the project added, at exact
versions; its first line names the Bogolang release. Commands that need a project say so when
they are typed outside one.
Engines
| Command | What it does |
|---|---|
bogo engine list |
List the engines; * marks the one of the project |
bogo engine install 3.14 |
Download that engine, check it against its published SHA-256 sum before anything is unpacked, and place it in ~/.bogolang/engines |
bogo engine install 3.14 --from FILE |
The same from a file brought by hand; it contacts nothing and prints the sum of the file for you to compare |
bogo engine use 3.14 |
Use that engine for this project; the environment is made again at the next run |
install.md says more.
Logins
A login is kept in the protected store of the operating system, never in a file or in a
program. bogo login asks for the user name, then the password and the enable secret, which
are not shown as they are typed.
| Command | What it stores |
|---|---|
bogo login [PROFILE] |
A device login. A device uses the profile named in the login column of its inventory line, or default |
bogo login --snmp [PROFILE] |
An SNMP login, version 2c (a community) or 3 (a user). A device uses the profile of its snmp column |
bogo login --mail |
The mail server settings for mail() |
bogo login --api PROFILE |
A token or an API key. A program names it with token="PROFILE" |
bogo login --webhook PROFILE |
The address of a webhook, for webhook("PROFILE", text) |
bogo logout takes the same options and removes what was stored.
bogo upgrade
bogo upgrade reads the newest release, downloads the installer of this system, checks its
SHA-256 sum against the published one and asks before it starts the installer. Projects and
stored logins are kept.
| Option | Meaning |
|---|---|
--check |
Only say whether a newer version is published. Exit code 1 when there is one |
--yes |
Do not ask before the installer starts |
- A file that does not match its sum is removed and never started.
- It works for a Bogolang put in place by its installer. Installed another way, it says so.
- It needs the internet. On a PC with none, copy the new installer to the PC and run it: installing over an older version replaces it.
- A company that keeps its own copy of the releases gives its address in the environment
variable
BOGO_RELEASES. The address must start withhttps://.
bogo version and bogo uninstall
bogo version prints the version of Bogolang and of the engine, such as
Bogolang 0.1.0, engine Python 3.15.
bogo uninstall removes a Bogolang put in place by the Linux installer. It asks first;
--yes does not ask. On Windows it says to remove Bogolang in the settings of Windows, under
"Apps". install.md says what removal keeps.