upfile

command module
v1.1.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jul 30, 2025 License: MIT Imports: 7 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

README

UpFile

UpFile is a CLI tool for syncing files across multiple projects.

It's designed to help you manage shared configuration files like .prettierrc, .golangci.yml, or any other files.

UpFile operates on a simple but powerful principles:

  • Each file identifies by unique filename.
  • Each filename is associated with an upstream version that acts as the source of truth.
  • You can add multiple instances of the same file across your projects. These are called entries.
  • Entry can be pushed to the upstream and be pulled from it.

Basic Usage

Suppose you have two projects: project-a and project-b, and both have the same config file .prettierrc.

~/project-a/.prettierrc
~/project-b/.prettierrc

And you want to keep them in sync, edit one file and easily spread changes to other places in other projects.

Add files to tracking

Use add to track each file:

$ upfile add ~/project-a/.prettierrc
$ upfile add ~/project-b/.prettierrc

Check tracked status:

$ upfile ls
test.txt:
  /home/user/project-a/.prettierrc  Up-to-date
  /home/user/project-b/.prettierrc  Up-to-date
Make a change and push it

Make a change in one entry and push it to the upstream.

$ echo 'change' >> ~/project-a/.prettierrc
$ upfile push ~/project-a/.prettierrc

List to see status:

$ upfile ls
test.txt:
  /home/user/project-a/.prettierrc  Up-to-date
  /home/user/project-b/.prettierrc  Modified
Sync with other entries
$ upfile sync test.txt
The following tracked files will be updated:
 - /home/user/project-b/.prettierrc

Proceed? [Y/n]: y

Now both files are consistent again.

Docs

For a complete list of commands and detailed usage instructions, run:

upfile -h

Installation

Package Manager
yay -S upfile-bin
brew install skewb1k/homebrew-tap/upfile

Support for other package managers is planned.

Or download a binary from the releases page.

Go
go install github.com/skewb1k/upfile/cmd/upfile@latest

Environment Variables

  • $UPFILE_DIR - Path to the directory where UpFile stores metadata and upstream file versions. By default $XDG_DATA_HOME/upfile

Shell Completion

UpFile supports advanced and interactive shell completion for Bash, Zsh, fish, and PowerShell.

See the instructions on upfile completion <YOUR_SHELL> -h

Contributing

Contributions are welcome. If you find a bug, have an idea, or want to improve something — feel free to open an issue or submit a pull request.

Before committing, please make sure the code passes linting and tests:

make lint test

Documentation

The Go Gopher

There is no documentation for this package.

Directories

Path Synopsis
internal
pkg

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL
⌂ 换网址