- A
Fileresource type with mutable and immutable properties - Full CRUD operations (Create, Read, Update, Delete)
- Discovery to find existing files on the server
- Integration tests and conformance tests
- CI configuration for GitHub Actions
Prerequisites
Before starting, ensure you have:- Go 1.25 or later:
go version - PKL CLI: Installation guide
- formae CLI: installed and accessible in your PATH
- Docker: for running the test SFTP server
Test server setup
We’ll use a Docker-based SFTP server for development and testing:- Host: localhost
- Port: 2222
- Username: testuser
- Password: testpass
- Writable directory: /upload
Tutorial structure
This tutorial uses test-driven development (TDD). For each CRUD operation, we’ll:- Write a failing test
- Implement the code to make it pass
- Refactor if needed
The asyncsftp library
SFTP operations are inherently synchronous (blocking I/O), but formae’s plugin SDK supports an async pattern for long-running operations. We provide anasyncsftp library that wraps the standard SFTP client with an async interface:
Source code
The complete source code for this tutorial is available at: github.com/platform-engineering-labs/formae-plugin-sftpReady? Let’s start with 01 - Project Scaffold.

