Pageferry
Official Pageferry website

Bash script arguments you can run and test in WSL

Pageferry 2.9.26 is an AI agent for Windows 10 and 11 that edits your Bash script, runs it with test arguments and shows the real exit code. The interface comes in 13 languages.

Version

2.9.26

Released 2 November 2026

Setup

34 MB

Setup program for Windows

Portable

25 MB

Single executable file

Languages

13

Interface languages

System

Windows 10/11

x64 processors

Privacy

Local

No telemetry

Argument basics

How bash script arguments work

Bash script arguments are the values you type after the script name, and the script reads them as $1, $2 and so on. Quote every value. The agent writes the code that reads them, runs it with test values and shows the real exit code, which is 0 on success and a number from 1 to 255 on failure.

01

Check the argument count of a backup script

You ask the agent to make backup.sh stop when no argument is given. read_file opens the script, then edit_file adds a check of $# that prints a usage line to standard error and exits with code 2, and the diff appears in the chat. Bash command line arguments are counted by $#, so the card of the next Shell run without arguments should show exit code 2. You read the diff first. Under Ask first the edit waits for your OK, and only after you accept it does Shell run the script once more with one argument and expect 0.

Tool trace
read_file backup.sh → read
edit_file backup.sh → +6 lines
Shell bash backup.sh → exit 2
Shell bash backup.sh data → exit 0
02

Add -v and -f options with bash getopt or getopts

Say you want a -v flag and a -f file option in backup.sh. The agent reads the script with read_file, then edit_file inserts a getopts loop, because getopts is the Bash builtin for short options, while getopt is an external command that behaves differently between systems. You see the diff. Shell runs the script with -v and with -f notes.txt, and each card shows the output and the real exit code. After the flag, check the number of arguments with $# so that a missing file name ends in exit 2. Under Ask first nothing is written until you accept.

Tool trace
read_file backup.sh → read
edit_file backup.sh → +14 lines
Shell bash backup.sh -v → exit 0
Shell bash backup.sh -f → exit 2
03

Give missing arguments a default value

Some scripts should still run when an argument is missing. Passing arguments to scripts is easier to test when each one has a default, so the agent writes name="$1" and count="${2:-1}" into a new file with write_file, and you read the file in the chat card. People who search for “bash get arguments” usually need exactly this: positional parameters plus a fallback value. Shell then runs the file with one value and with two values, and each card has its own exit code. Test both cases. Exit codes run from 0 to 255, and this script ends with 0.

04

Check exit codes after every run

Zero means success and any other number means failure, so the exit code tells you more than the printed text. Shell runs the script with a valid value and then with a wrong option, and the agent lists the real exit code of each run. A script that exits with 2 for wrong usage and 1 for a general error is easier to test than one that always exits with 1. Bash arguments that contain spaces must stay in double quotes, so one run uses such a value. Spaces matter here. grep can search the file for unquoted $1, and you read the cards before you accept anything.

Explore workflows

How Pageferry differs from a typical chat assistant

Pageferry 2.9.26 runs your Bash command in WSL or over SSH and puts the real output and exit code into a chat card for you to read. See the rows.

Typical chat assistantPageferry
ActionDescribes a commandRuns the command
OutputText only, no command runReal output and exit code
FilesYou copy the code into the fileEdits the file, shows a diff
ControlYou run it yourselfAsk first waits for your OK

How to get started

  1. Download the setup program of about 34 MB and install it on Windows 10 or 11.
  2. Compare the SHA-256 checksum with the published manifest, then run the setup.
  3. Connect a model and choose the folder that holds your Bash script.
  4. Describe the task, read the diff and the exit code, then accept or reject.

Who uses the agent

Beginners who write a first Bash script can watch every command and its real result in the chat. A common question is whether functions should accept arguments or flags, and the agent can show both versions in a short script. Ask away.

Practitioners who maintain scripts in WSL use it to test option parsing: Shell runs the script with each combination of flags and reports the real exit code, so a getopts loop that works for -v and breaks for -f shows up at once. Read the card.

Administrators of their own Linux servers connect over SSH and run test scripts there. Exit codes run from 0 to 255, so a script can tell the calling program or the person at the terminal exactly what went wrong. Under Ask first every change waits for your approval. Test first.

Frequently asked questions

What are bash script arguments?

Arguments are the values you type after the script name when you start a Bash script. Inside the script they appear as the positional parameters $1, $2 and so on, $# holds their count and "$@" holds all of them as separate words. Quote them. The shift command drops the first value, so a loop can walk through the rest.

Can the agent work with Bash scripts on a Linux system?

Yes, through WSL on your own PC or over SSH to a Linux system you own. Pageferry itself is an app for Windows 10 and 11, so you chat on Windows while Shell runs the script in the environment you choose. The interface is available in 13 languages. Choose the environment first.

Is codedguru.com the official Pageferry website?

Yes, codedguru.com is the official Pageferry website, and the download button gives the original setup program of about 34 MB. Compare its SHA-256 checksum with the published manifest before you run it. Compare the checksum yourself. Questions about the app go through the Send feedback button inside it.

What is the difference between getopts and getopt?

getopts is a Bash builtin that parses short options such as -v or -f file in a loop. getopt is a separate external command that also handles long options such as --file, but its behaviour differs between systems, so read the manual page on your own system. Pick one. For a few options, a while loop with case and shift also works.

How do bash arguments with spaces stay in one piece?

A value with spaces stays whole when you put it in double quotes at the call, for example "two words", and when you quote $1 or "$@" inside the code. Without quotes the shell splits the value at every space into separate words. The agent can run a test value and show the output in the chat card. Quote everything.

Does Pageferry run locally?

Yes, the app runs on your Windows PC with no telemetry, and chats, working folders and API keys stay on the PC. Prompts go only to the model endpoint you pick: with a cloud model the prompt text, including file text the agent reads, goes to that provider, and with a local model nothing leaves the machine. Network features are optional.

How do I install Pageferry?

The setup is four steps: download the setup program of about 34 MB, compare its SHA-256 checksum with the published manifest, run the setup, then open the app. The installer is not code-signed yet, so Windows SmartScreen may warn; choose More info and then Run anyway, but only after the checksum matches. No account is needed.

Get started

Test your next Bash script with Pageferry

Download Pageferry 2.9.26, the setup program of about 34 MB, and let the agent run your Bash script while Ask first keeps every change waiting for your approval. Start on your own machine.

Download Pageferry for Windows ↗

Explore more

Every page of this website is available in 20 languages.

What Pageferry can do for Bash scripts ↗ Connect a cloud, local or built-in model ↗ Step-by-step Bash workflows ↗ Download the Windows installer ↗ Bash and Pageferry questions answered ↗ Privacy policy ↗