Skip to main content

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?

BenefitWhat it means in practice
Predictable uploadsA single, unified upload command instead of hand-crafted curl calls that break on CI-specific quoting.
Stable changelog inputThree mutually exclusive modes (--changelog, --changelog-file, --changelog-stdin) so Markdown and special characters survive shell escaping.
Config + env splitserver 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 friendlyDesigned 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_TOKEN is required and loaded only from the environment. It is sent as Authorization: Bearer <token>.
  • server is loaded from config and can be overridden by FAYNOSYNC_URL.
  • owner is loaded from config and can be overridden by FAYNOSYNC_ACCOUNT.

Commands

Global flag:

  • --log-level <level> where level is trace|debug|info|warn|error|fatal|panic (default: info)
CommandPurpose
faynosync initCreate ~/.faynosync/config.yaml and prompt for server, owner, tuf.
faynosync config viewPrint 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
Changelog modes are mutually exclusive

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