Once listeners deployed are and hosted on Flatfile’s secure cloud, they are called Agents.
Installation
The Flatfile CLI is available as an npm package and can be invoked with npx.Authentication
To interact with the agents in your environment, you must authenticate with your Flatfile API key. You may do so in two ways:- Pass your credentials with your command via the the
--tokenand--envflags - Making the
FLATFILE_API_KEYandFLATFILE_ENVIRONMENT_IDvariables available in your environment, via.envfile in your project directory or other configurations
Available Commands
Development Workflow
A typical development workflow with the Flatfile CLI looks like this:1
develop locally
Configure your listener in local development using the develop command.This command runs your listener locally.
It will respond to events in your configured environment just as it would once deployed,
but changes to your listener will be watched so you can test changes in real-time.
2
deploy to the flatfile cloud
When ready, use the deploy command to deploy your listener as an Agent.To facilitate easy management, name your listener via the
--slug/-s flag.3
managing agents
Use the list command to view deployed Agents and the delete command to remove them when needed.
4
download deployed agents
Use the download to retrieve the code of a deployed Agent for inspection or modification.