awslabs / awslabs/filemoverexpress

[Feature] Add Import Configuration Support

Open
#8 0 comments 0 reactions 0 assignees View on GitHub
enhancement
Dominant language
TypeScript
Stars
4
Forks
1
Avg merge
9h 54m
Merged PRs (30d)
41

Description

## Summary

Add the ability to import a `configuration.yaml` file through the GUI, so users can get set up without needing to manually navigate to the hidden `.filemoverexpress` directory.

## Background

File Mover Express uses two separate configuration files:

1. **AWS credentials** — stored in `~/.aws/credentials` or `~/.aws/config`, generated by running `aws configure`. This is what authenticates the user with AWS.
2. **FME configuration** (`~/.filemoverexpress/configuration.yaml`) — File Mover Express's own config file, containing transfer profiles, S3 bucket settings, hot folder config, and daemon settings.

This issue is about making it easier to set up the FME configuration file (#2). It does not remove the requirement for AWS credentials — users still need the AWS CLI installed and configured unless the OAuth/OIDC feature is also implemented (see related issue).

Today, setting up the FME configuration requires a user to either:

- Manually navigate to a hidden directory (`~/.filemoverexpress/` on macOS/Linux, `C:\Users\username\.filemoverexpress\` on Windows) and place or edit a `configuration.yaml` file there, or
- Use the GUI's transfer profile editor to configure everything from scratch

For less technical users — particularly freelancers being onboarded by a studio or production company — neither option is great. The ideal workflow is: the studio pre-configures a `configuration.yaml` with the correct S3 bucket, region, and transfer profile settings, sends it to the freelancer, and the freelancer imports it with one click.

## Relationship to AWS CLI requirement

This feature reduces setup friction for the FME configuration, but users will still need AWS credentials configured on their machine (via the AWS CLI or another credential source) unless the OAuth/OIDC feature is also implemented. Full elimination of the AWS CLI requirement is tracked separately.

## Proposed feature

Add an **Import Configuration** option to the GUI that:

1. Opens a file picker so the user can select a `configuration.yaml` from anywhere on their machine
2. Validates the file before applying it
3. Copies it into the correct config directory (`~/.filemoverexpress/` or platform equivalent)
4. Reloads the running configuration without requiring a daemon restart (if possible)

## What already exists

- `GetConfiguration` and `SetConfiguration` gRPC endpoints already exist in `src/cli/service/` — the GUI can already read and write configuration over the existing service layer
- `GetConfigDir()` in `src/cli/config/fs.go` returns the correct platform-specific config directory
- The GUI already has a `transfer-profile-editor-modal` and `setup-wizard-modal` — the import option would fit naturally alongside these
- `config.WatchConfig` in `src/cli/config/config.go` already watches for config file changes and reloads — an import that writes to the config file may trigger this automatically

## Implementation notes

**CLI/daemon side:**

A new `ImportConfiguration` gRPC endpoint (or reuse of `SetConfiguration`) would accept the contents of a YAML file, validate it against the existing config schema, write it to the config directory, and trigger a reload. Alternatively, the GUI could write the file directly via the filesystem if running locally (Electron), and rely on `WatchConfig` to pick up the change.

**GUI side:**

An "Import Configuration" button in the preferences or setup wizard modal. On click, open a native file picker filtered to `.yaml` / `.yml` files. Parse and send the contents to the daemon, or write directly to disk in the Electron context.

**Validation:**

The imported file should be validated before being applied — at minimum checking that required fields are present and the YAML is well-formed. A clear error message should be shown if the file is invalid, rather than silently overwriting a working config.

**Merge vs replace:**

Consider whether import should replace the entire config or merge transfer profiles into an existing config. Merging is safer for users who already have a working setup and are adding a new profile sent by a studio.

## Relevant files

- `src/cli/config/fs.go` — `GetConfigDir()`, config file path resolution
- `src/cli/config/config.go` — `WatchConfig`, `LoadConfiguration`, `ValidateAndUpdateConfiguration`
- `src/cli/service/get-configuration.go` and `set-configuration.go` — existing read/write endpoints
- `src/gui/src/app/components/modals/transfer-profile-editor-modal/` — natural home for an import button
- `src/gui/src/app/components/modals/setup-wizard-modal/` — alternative entry point for first-time setup

## Acceptance criteria

- Users can import a `configuration.yaml` via a file picker in the GUI
- The imported config is validated before being applied
- A clear success or error message is shown after import
- The running daemon picks up the new configuration without requiring a manual restart
- Existing configuration is not silently overwritten without user confirmation if one already exists
- Works on macOS, Windows, and Linux

Contributor guide

Open the contributing guide

Research direction

Start with src/cli/config/fs.go and config.go to understand config path resolution, validation, and WatchConfig, then read the existing get-configuration.go and set-configuration.go endpoints. Review the transfer-profile-editor-modal and setup-wizard-modal for the GUI entry point. Done means a cross-platform file-picker flow validates the import, confirms replacement when needed, reports success or failure, and reloads the daemon configuration.

Written by the indexing model from the issue text.

Assessment

Tech stack
aws, electron, go, grpc, typescript
Domain
api, backend, desktop
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Quiet
Clarity
Mostly clear
Newbie friendliness
52/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.