@frakjs/frak
v0.2.0
Published
A commandline deployment tool for syncing files to remote servers.
Readme
About The Project
frak is a tiny JavaScript binary for deployments that don’t need containers or repos—just fast, reliable file transfer from point A to point B.
It leverages rsync over SSH to push files to a remote server, and is able to visualize file changes in a developer-friendly way. frak has a number of advanced features beyond syncing files to a remote server, such as keeping a history of deployments for easy rollback, showing file differences prior to pushing, and executing post-deploy hooks.
🚀 Features
🔌 Init once, deploy anytime 🔎 Interactive diffs before every push/pull 📦 Patch-based backups stored on your server 🧾 Post-deploy commands (e.g. restart services) 📡 Quick SSH console access into deploy root 🔁 Pull support for syncing back changes 📋 Backup inspection with additions/deletions summary
Getting Started
Using frak is simple. All you need is a Node.js environment with npx.
Prerequisites
Make sure you have Node.js and npx installed.
node --version
npm --version
npx --versionUsage
The recommended way to run frak is via the npx command.
npx @frakjs/frak --helpIf you're prompted to install the package, say yes.
Need to install the following packages:
@frakjs/[email protected]
Ok to proceed? (y)frak needs to be initialized in your project directory with the init command.
cd project-folder
npx @frakjs/frak initThis creates a frak.config.js file that looks something like this:
export default {
server: "[email protected]",
root: "/var/www/html",
};You can replace server and root with the appropriate values for your environment.
With the configuration in place, you can now start fraking files to your server. It's as simple as the basic command without any arguments.
npx @frakjs/frakThe results of the command will show you a dry-run preview of the changes that will be synced to the remote server. You will be prompted before it proceeds with the actual file transfer.
If you'd like, you can cancel the sync by typing "no" or any non-"yes" value. Perhaps you want to see the changes line-by-line. frak can do this too!
npx @frakjs/frak diffThe command above will compare all the changes, and present a colorful git-style patch that you can inspect in your terminal.
Roadmap
- [ ] Send an alert via Slack after push events
- [ ] Parallel deployments to multiple environments at once
See the open issues for a full list of proposed features (and known issues).
Contributing
Contributions are what make the open source community such an amazing place to learn, inspire, and create. Any contributions you make are greatly appreciated.
If you have a suggestion that would make this better, please fork the repo and create a pull request. You can also simply open an issue with the tag "enhancement". Don't forget to give the project a star! Thanks again!
- Fork the Project
- Create your Feature Branch (
git checkout -b feature/AmazingFeature) - Commit your Changes (
git commit -m 'Add some AmazingFeature') - Push to the Branch (
git push origin feature/AmazingFeature) - Open a Pull Request
Top contributors:
License
Distributed under the MIT License. See LICENSE.txt for more information.
Contact
Frank Strube - @strube - [email protected]
Project Link: https://github.com/frakjs/frak



