Workspaces
A workspace is a folder on your disk. Every .stamp file under it holds requests, and an environment.stamp at the root holds the values those requests share. There is no database and no hidden state, so the folder goes into git beside the code it calls, and whoever clones the repository has your requests.
The smallest workspace is a folder with one file in it. Make a folder, put this in posts.stamp, and that is already a workspace.
### List posts
GET https://jsonplaceholder.typicode.com/posts?_limit=3
> assert status == 200
> assert body.length == 3
The line starting ### titles the request. Then the method and the address. Then, after a blank line, the > lines, which run once the answer arrives.
stamp run posts.stamp
→ GET https://jsonplaceholder.typicode.com/posts?_limit=3 posts.stamp › listPosts
200 OK 74 ms 897 bytes
✓ status == 200
✓ body.length == 3
✓ 1 request, 2 assertions
What a failure looks like
Worth meeting once on purpose. Change the second line to assert body.length == 5 and run it again.
stamp run posts.stamp
→ GET https://jsonplaceholder.typicode.com/posts?_limit=3 posts.stamp › listPosts
200 OK 59 ms 897 bytes
✓ status == 200
✗ body.length == 5: body.length is 3
✗ 1 request, 2 assertions, 1 failed (1 assertion)
The check that held keeps its ✓, the one that did not is marked ✗ and carries the value that was there instead, and the command exits with 1 rather than 0. A pipeline needs nothing from this but that number.
Values the files share. That address is going to appear in twenty files before long, and it changes when you point at staging. environment.stamp, at the root of the folder, is where values that belong to the workspace live.
# environment.stamp
vars {
baseUrl = "https://jsonplaceholder.typicode.com"
limit = 3
}
Now the request names those values instead of repeating them. {{baseUrl}} is replaced wherever it appears in a URL, a header or a body, and a > line reads the same name without the braces.
### List posts
GET {{baseUrl}}/posts?_limit={{limit}}
> assert status == 200
> assert body.length == limit
When the same requests have to reach a test host one day and staging the next, or four regions, or three kinds of account, this file grows dimension lines and a vars block per case. That is Variables and dimensions, and you do not need it yet.
How one grows. Add files. Add folders when there are too many files. Nothing has to be registered anywhere, and a request does not care which folder it sits in.
shop/
environment.stamp what every file shares
environment.local.stamp what is yours alone
api/
posts.stamp
orders.stamp
fixtures/
customers.csv
environment.stamp | Variables, and the dimensions they vary along, for the whole workspace. Committed, read by everyone. |
environment.local.stamp | The same, for a token or a host that is yours. It is read after environment.stamp, so its values win, and when the folder is a git repository the app adds it to .gitignore the first time it writes there. |
api/posts.stamp | Requests, as many per file as you like. Folders group them for your eye only. |
fixtures/customers.csv | Files the requests read: a body given as < ./order.json, rows a test plan walks through. |
Reading a folder you did not write
Two commands say what is in a folder you have just cloned. stamp list prints every request, grouped by file, with the name that other requests and the command line use to ask for it.
stamp list .
api/orders.stamp
POST createAnOrder Create an order
api/posts.stamp
GET listPosts List posts
GET getAPost Get a post
stamp check parses everything and sends nothing, the cheap way to find out whether a file edited by hand still holds together.
stamp check .
✓ 3 files, 3 requests
When something does not parse it points at the character and exits with 2 rather than 1, so CI can tell a broken file from a failing test.
stamp check .
api/posts.stamp:4:19: error: expected a value, found end of line
> assert status ==
^
✗ 3 files, 2 requests, 1 error
In the window the same two answers are the sidebar, which is the folder read back to you, and the underline in Source under a line that does not parse.
The edges. Nothing below is needed to start. These are the questions that come up on the second day.
- Where the workspace ends. The command line tool walks up from the path you hand it until it finds an
environment.stamp, and that folder is the workspace. Sostamp run posts.stampworks from insideapi/and still resolves{{baseUrl}}. The path it prints is relative to the root, not to where you are standing. - A folder with no environment file is still a workspace, one with nothing shared. The first example above was exactly that.
- Files ending
.httpare read the same way, so a folder written for an editor's REST client runs unchanged. - What to commit: the whole folder except
environment.local.stamp. Requests are then reviewed in a pull request like any other text, and a change to an endpoint arrives with the request that calls it.
stamp env answers the other question: what each name is worth right now, and which file decided it. It lists readJson and readText, the two file-reading helpers that are always there, and then every variable beside the file and the vars block it came from.
stamp env .
Variables
readJson readJson() files
readText readText() files
limit 1 environment.local.stamp vars *
baseUrl https://jsonplaceholder.typicode.com environment.stamp vars *
In the app
- Choose File ▸ Open Workspace… (⌘O) and pick the folder. With no workspace open the welcome screen offers the same thing, plus Clone Team Workspace… when git is installed and Open Example Workspace, which installs a folder of working requests against public APIs.
- Read the sidebar. What the folder holds is sorted into Test Plans, Load Tests and Requests, each request under the file and folder it sits in. The Filter field above them keeps the rows whose names match what you type.
- Press ⌘N for New Request. It is added to the selected file, or to a file of its own when nothing is selected, and opens as
GET https://waiting for an address. New Request File… (⌥⌘N) and New Folder… (⇧⌘N) ask for a name and write it into the folder. - Press ⇧⌘R for Reveal in Finder to see the file a row stands for.
The sidebar is the folder itself rather than a catalogue of it, so what you see is what is on disk. A dot after a row says how that request or plan last ended, green for passed and red for failed, and the app watches the folder, so a file changed by git or by your editor is read again with no reopening.

Next: Requests for the shape of one request in full, Variables and dimensions for pointing the same files at staging, and Secrets for the values that must not be committed.