faynoSync CLI
faynoSync-cli is a command line tool focused on uploading new application versions to faynoSync in a native and predictable way.
The main problem it solves is inconsistent shell escaping in some CI environments. Instead of relying on CI-specific quoting behavior, the CLI provides a unified upload flow and stable changelog input modes, so the same command behaves the same way locally and across CI runners.
Why use the CLI?
| Benefit | What it means in practice |
|---|---|
| Predictable uploads | A single, unified upload command instead of hand-crafted curl calls that break on CI-specific quoting. |
| Stable changelog input | Three mutually exclusive modes (--changelog, --changelog-file, --changelog-stdin) so Markdown and special characters survive shell escaping. |
| Config + env split | server and owner live in a config file and can be overridden per-run by environment variables, while the token stays in the environment only. |
| CI friendly | Designed to drop into pipelines: token from environment, server/account overridable per job. |
Install and configure
Build the binary and initialize a config:
go build -o faynosync-cli .
./faynosync-cli --log-level info init
init creates ~/.faynosync/config.yaml and prompts for server, owner, and tuf:
server: https://example.com
owner: example
tuf: false
View or update config fields:
faynosync config view
faynosync config set server https://updates.example.com
faynosync config set owner myteam
If a value is omitted, config set prompts for it.
Runtime settings priority
FAYNOSYNC_TOKENis required and loaded only from the environment. It is sent asAuthorization: Bearer <token>.serveris loaded from config and can be overridden byFAYNOSYNC_URL.owneris loaded from config and can be overridden byFAYNOSYNC_ACCOUNT.
Commands
Global flag:
--log-level <level>where level istrace|debug|info|warn|error|fatal|panic(default:info)
| Command | Purpose |
|---|---|
faynosync init | Create ~/.faynosync/config.yaml and prompt for server, owner, tuf. |
faynosync config view | Print the current config. |
faynosync config set <server|owner|tuf> [value] | Update a config field (prompts if value is omitted). |
faynosync upload [flags] | Upload one or more files to <server>/upload as multipart/form-data. |
upload flags
--app <name>--file <path>(repeatable, at least one required)--version <value>--channel <value>--platform <value>--arch <value>--publish[=true|false]--critical[=true|false]--intermediate[=true|false]--changelog <text>--changelog-file <path>--changelog-stdin
Use only one of --changelog, --changelog-file, or --changelog-stdin. For Markdown with special symbols, prefer --changelog-file or --changelog-stdin.
Upload examples
faynosync upload \
--app test \
--file ./test.apk \
--version 1.2.3 \
--channel stable \
--platform android \
--arch universal \
--publish \
--critical \
--intermediate \
--changelog "Bugfixes"
# Multiple files in one upload
faynosync upload --file ./test.rpm --file ./test.deb --app myapp --publish=true
# Changelog from a file
faynosync upload --file ./test.rpm --app myapp --changelog-file ./CHANGELOG.md
# Changelog piped via stdin
cat ./CHANGELOG.md | faynosync upload --file ./test.rpm --app myapp --changelog-stdin
For changelogs with shell-sensitive characters, use a quoted heredoc delimiter ('EOF') so the shell does not attempt parameter expansion before the here-doc is formed:
faynosync upload \
--app=cli \
--file=./faynoSync-cli \
--version=0.0.0.1 \
--channel=nightly \
--platform=linux \
--arch=amd64 \
--publish \
--critical \
--intermediate \
--changelog-stdin <<'EOF'
# Changes
- fixed ! bug
- added ${feature}
EOF