CLI reference

The inflowave command line tool builds, tests and pushes code agents from your own computer.

Beta: request access. Code agents are in beta and are switched on for each agency by hand. Names and limits can still change. Request access

Install

pip install inflowave-cli
inflowave --version

Python 3.9 or newer is needed. The tool is for your computer. Installing it also installs the Python SDK, so one command is enough. Node agents use the @inflowave/agent package from npm instead, and still use this tool to push.

By default the tool talks to https://api.inflowave.io/api/agent-runner. Every command that talks to Inflowave accepts --api to use another address, or you can set the INFLOWAVE_API environment variable.

login

Saves your API token on your computer with owner-only file permissions, after checking that Inflowave accepts it.

inflowave login
inflowave login --token iwa_...
INFLOWAVE_TOKEN=iwa_... inflowave login
OptionWhat it does
--tokenThe token, instead of typing it at the prompt. You can also set INFLOWAVE_TOKEN. Without a terminal one of the two is required.
--apiUse another API address.
--no-verifySave the token without checking it with Inflowave.

Create a token in the app under Developer, API tokens. It starts with iwa_.

agents create

Makes a new folder with a small working agent: the program, agent.json, a sample storage/input.json, a README and a .gitignore. A Python agent also gets requirements.txt, and a Node agent gets package.json.

inflowave agents create my-agent
inflowave agents create my-agent --template node
OptionWhat it does
nameThe agent's name. It becomes the agent id, so use at least two letters or digits.
--templatepython (the default) or node.
--dirWhere to make the folder. The default is the current folder.

agents run

Runs your agent on your computer in local mode. It prints every log line and progress step, then summarises the result rows, files and charges. Nothing is billed.

inflowave agents run
inflowave agents run --input storage/input.json --keep
OptionWhat it does
--inputA JSON file to use as the input.
--keepKeep the storage output of the last run. Without it, the output is cleared first.
--dirThe agent folder. The default is the current folder.

agents check

Checks agent.json without uploading anything. It also warns when your code charges an event that is not listed in pricing.events. Option: --dir.

inflowave agents check

agents push

Checks the manifest, packs the folder, uploads it, waits for the security scan and follows the build. The details are on the Uploads and test runs page.

inflowave agents push
inflowave agents push --no-wait
OptionWhat it does
--no-waitStop once the build has started, instead of following it.
--skip-checkPush even if the manifest check finds problems.
--build-timeoutHow many seconds to follow the build. The default is 900. The build carries on at Inflowave after that.
-v, --verboseShow the raw answers from Inflowave.
--dir, --apiThe agent folder, and another API address.

The upload leaves out storage, .git, node_modules, .venv, files that start with .env and *.pem files. The push is refused if a file looks like it holds a secret, such as a private key, a token or a hard-coded password. If a line is a harmless example, add the comment inflowave: allow-secret on that line.

A live agent can only be updated with a new version. The push is refused (409) when the newest changelog entry in agent.json has the same version as the live one, so add an entry with a new version number first. You cannot push while the agent is in review.

agents call

Starts a real run in Inflowave and prints the run as JSON.

inflowave agents call my-agent --input storage/input.json --wait
inflowave agents call you/my-agent --max-charge-cents 200
OptionWhat it does
slugThe agent, as developer/agent or just the agent id.
--inputA JSON file with the input.
--waitWait for the result.
--timeoutSeconds to wait with --wait. The default is 300, which is also the most.
--max-charge-centsThe most this run may cost, in cents.
--apiUse another API address.

Without --wait the call returns straight away with the run id, and you follow the run with agents logs.

agents logs

Shows the log of a run.

inflowave agents logs RUN_ID
inflowave agents logs RUN_ID -f
OptionWhat it does
run_idThe run to show.
-f, --followKeep showing new lines until the run ends.
--apiUse another API address.

Exit codes

Scripts can use the exit code of a command.

CommandCodeMeaning
Any0It worked.
check, push1Problems were found, the upload was refused, or the build failed.
push2The scan or the build is taking longer than the tool waits. It keeps going at Inflowave.
call --wait1The run did not deliver.
call --wait2Still running when the wait ended.
call --wait3The run is waiting for an answer to a question. Answer it in the app or through the API.

Want to build one?

Tell us about your agency and what you would like to build. We will switch the beta on for your account.