4.3 KiB
%{ title: "Generate an init script to get you(r team) up and running", author: "Willem van den Ende", tags: ~w(pi.dev AI continuous-delivery), description: "Checking out a repository on a fresh machine often involves some fiddling around. An init scripts costs only one prompt and gets you going now, and months later when you forgot about how you set up the project.", published: true }
init script made by qwen 3.6 / Pi
I had firehose running on another laptop already, but I added a library for syntax highlighting code
init.sh script in the repository . The escape codes for ’the server will be on:’ are Cyan color. I removed that by hand.
Finished in 1.9 seconds (1.7s async, 0.1s sync)
157 tests, 0 failures
[ OK ] All tests passed.
==============================================
🎉 Firehose is ready to go!
==============================================
Useful commands:
make test Run the full test suite
make check Static analysis (credo + format)
make compile Compile the project
make format Format all code
Start the dev server:
cd app && mix phx.server
The server will be on: \033[0;36mhttp://localhost:8056\033[0m
Demo user (created by seed):
email: demo@example.com
pass: password123!
Database: firehose_dev (PostgreSQL on localhost)
Port: 8056 (override with PORT=xxxx)
It is great to have a script that gets the repo ready for work.
This was one fairly lazy prompt:
I think it would be handy to have an init script for this repository that also downloads the js dependencies. the init.sh script should get the dependencies, run the mix setup so there is a working db, run the tests and download the js assets. the goal
is for an agent or a person to be able to start working. At the end of the script, print handy instructions e.g. to run make, and what PORT the server will run on
It only took this prompt. I aborted it after I got a my turn-limit extension asked if I wanted to give it more than 25 turns. The agent was done, but couldnt’ actually run the init script because the sandbox does not give it sufficient permissions to do so.
I was using another project I hadn’t run in a months on a machine I hadn’t yet used it on. That project had an init.sh script, and got me going in a minute.
Further reading
A Full ;-), very brief transcript. Done. Here’s what init.sh does:
Bonus item - what the init script does, and performance
According to the agent:
- Pre-flight checks — verifies elixir, mix, node, npm, and PostgreSQL are available
- make deps — fetches all Elixir dependencies
- mix ecto.setup — creates the DB, runs migrations, seeds demo user
- npm install — installs JS dependencies (highlight.js, etc.) in assets/
- mix assets.setup && mix assets.build — installs esbuild/tailwind and bundles the JS/CSS
- make test — runs the full test suite
Ends with a summary showing how to start the server (port 8056), demo credentials, and handy make commands.
The snippet below is from my performance widget. Token generation is not super fast, but all 32 turns ran while attending Chris Parsons’ webinar. 2.5 minutes for a script that ’just works’ is good enough for me.
📊 Performance: llama.cpp/Qwen3.6-35B-A3B-MXFP4MOE.gguf
Prefill: 28,376 tokens @ 5253.8 tok/s
Generation: 5,699 tokens @ 38.8 tok/s
Combined: 34,075 tokens @ 223.5 tok/s (2.5m total)
TTFT: 5401ms
Turns: 32