@frakjs/frak 0.1.0 → 0.1.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -1,138 +1,214 @@
1
- # Frak
2
-
3
- **Frak** is an agentless deployment tool for web apps. Powered by `rsync` over SSH, it tracks file changes, creates patch backups, and supports dry-run diffs, interactive confirmations, and post-deploy hooks.
1
+ <a id="readme-top"></a>
2
+
3
+ <!-- PROJECT SHIELDS -->
4
+ [![Contributors][contributors-shield]][contributors-url]
5
+ [![Forks][forks-shield]][forks-url]
6
+ [![Stargazers][stars-shield]][stars-url]
7
+ [![Issues][issues-shield]][issues-url]
8
+ [![MIT][license-shield]][license-url]
9
+ [![LinkedIn][linkedin-shield]][linkedin-url]
10
+
11
+ <!-- PROJECT LOGO -->
12
+ <br />
13
+ <div align="center">
14
+ <a href="https://github.com/frakjs/frak">
15
+ <svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-cloud-upload-icon lucide-cloud-upload"><path d="M12 13v8"/><path d="M4 14.899A7 7 0 1 1 15.71 8h1.79a4.5 4.5 0 0 1 2.5 8.242"/><path d="m8 17 4-4 4 4"/></svg>
16
+ </a>
17
+
18
+ <h3 align="center">frak</h3>
19
+
20
+ <p align="center">
21
+ Quick deployment tool using Rsync and SSH.
22
+ <br />
23
+ <br />
24
+ <a href="https://github.com/frakjs/frak/issues/new?labels=bug&template=bug-report---.md">Report Bug</a>
25
+ &middot;
26
+ <a href="https://github.com/frakjs/frak/issues/new?labels=enhancement&template=feature-request---.md">Request Feature</a>
27
+ </p>
28
+ </div>
29
+
30
+ <!-- TABLE OF CONTENTS -->
31
+ <details>
32
+ <summary>Table of Contents</summary>
33
+ <ol>
34
+ <li>
35
+ <a href="#about-the-project">About The Project</a>
36
+ </li>
37
+ <li>
38
+ <a href="#getting-started">Getting Started</a>
39
+ <ul>
40
+ <li><a href="#prerequisites">Prerequisites</a></li>
41
+ <li><a href="#installation">Installation</a></li>
42
+ </ul>
43
+ </li>
44
+ <li><a href="#usage">Usage</a></li>
45
+ <li><a href="#roadmap">Roadmap</a></li>
46
+ <li><a href="#contributing">Contributing</a></li>
47
+ <li><a href="#license">License</a></li>
48
+ <li><a href="#contact">Contact</a></li>
49
+ <li><a href="#acknowledgments">Acknowledgments</a></li>
50
+ </ol>
51
+ </details>
52
+
53
+
54
+
55
+ <!-- ABOUT THE PROJECT -->
56
+ ## About The Project
57
+
58
+ [![Product Name Screen Shot][product-screenshot]](https://frakjs.com)
59
+
60
+ **`frak`** is an agentless deployment tool for web apps. 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 post-deploy hooks.
4
61
 
5
62
  > “Frak it, ship it.”
6
63
 
7
- &nbsp;
64
+ ### 🚀 Features
65
+
66
+ 🔌 **Init once, deploy anytime**<br>
67
+ 🔎 **Interactive diffs** before every push/pull<br>
68
+ 📦 **Patch-based backups** stored on your server<br>
69
+ 🧾 **Post-deploy commands** (e.g. restart services)<br>
70
+ 📡 **Quick SSH console access** into deploy root<br>
71
+ 🔁 **Pull support** for syncing back changes<br>
72
+ 📋 **Backup inspection** with additions/deletions summary
73
+
74
+ <p align="right">(<a href="#readme-top">back to top</a>)</p>
75
+
76
+ <!-- GETTING STARTED -->
77
+ ## Getting Started
8
78
 
9
- ## 🚀 Features
79
+ Using frak is simple. All you need is a [Node.js](https://nodejs.org) environment with `npx`.
10
80
 
11
- - 🔌 **Init once, deploy anytime**
12
- - 🔎 **Interactive diffs** before every push/pull
13
- - 📦 **Patch-based backups** stored on your server
14
- - 🧾 **Post-deploy commands** (e.g. restart services)
15
- - 📡 **SSH console access** into deploy root
16
- - 🔁 **Pull support** for syncing back changes
17
- - 📋 **Backup inspection** with additions/deletions summary
81
+ ### Prerequisites
18
82
 
19
- ## 📦 Installation
83
+ Make sure you have Node.js and `npx` installed.
20
84
 
21
85
  ```bash
22
- npm install -g @frakjs/frak
86
+ node --version
87
+ npm --version
88
+ npx --version
23
89
  ```
24
90
 
25
- Or run it on-demand with `npx`
91
+ [![Node.js and NPM Screenshot][prerequisites-screenshot]]()
92
+
93
+ <p align="right">(<a href="#readme-top">back to top</a>)</p>
94
+
95
+ <!-- USAGE EXAMPLES -->
96
+ ## Usage
97
+
98
+ The recommended way to run `frak` is via the `npx` command.
26
99
 
27
100
  ```bash
28
- npx @frakjs/frak <command>
101
+ npx @frakjs/frak --help
29
102
  ```
30
103
 
31
- ## 🛠️ Setup
104
+ If you're prompted to install the package, say _yes_.
105
+
106
+ ```
107
+ Need to install the following packages:
108
+ @frakjs/frak@0.1.0
109
+ Ok to proceed? (y)
110
+ ```
111
+
112
+ **`frak`** needs to be initialized in your project directory with the `init` command.
32
113
 
33
114
  ```bash
34
- frak init
115
+ cd project-folder
116
+ npx @frakjs/frak init
35
117
  ```
36
118
 
37
- This creates a `frak.config.js` file:
119
+ [![frak init][frak-init-screenshot]]()
120
+
121
+ This creates a `frak.config.js` file that looks something like this:
38
122
 
39
123
  ```js
40
124
  export default {
41
125
  server: "user@example.com",
42
126
  root: "/var/www/html",
43
- after: "npm run restart" // optional post-deploy hook
44
127
  };
45
128
  ```
46
129
 
47
- ## 🧩 Commands
130
+ You can replace `server` and `root` with the appropriate values for your environment.
48
131
 
49
- ```
50
- frak init # Create config file
51
- frak console # SSH into the deploy root
52
- frak diff # Show dry-run changes
53
- frak push # Deploy changes (with confirmation)
54
- frak pull # Download changes from remote
55
- frak backups:list # List previous patch deployments
56
- ```
132
+ With the configuration in place, you can now start <b>`frak`</b>ing files to your server. It's as simple as the basic command without any arguments.
57
133
 
58
- ## 🔐 Authentication
134
+ ```bash
135
+ npx @frakjs/frak
136
+ ```
59
137
 
60
- Frak uses SSH. Make sure your public key is in `~/.ssh/authorized_keys` on the remote server.
138
+ The 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.
61
139
 
62
- ## 🧪 Example: Deployment Flow
140
+ 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!
63
141
 
64
142
  ```bash
65
- frak diff # See what will change
66
- frak push # Sync files, confirm, deploy
143
+ npx @frakjs/frak diff
67
144
  ```
68
145
 
69
- Behind the scenes:
146
+ The command above will compare all the changes, and present a colorful git-style patch that you can inspect in your terminal.
70
147
 
71
- - Files are compared with a dry-run rsync
72
- - If approved, a patch file is generated and saved
73
- - Files are synced live
74
- - Optional after script is run remotely
148
+ <p align="right">(<a href="#readme-top">back to top</a>)</p>
75
149
 
76
- ## 💾 Backups
150
+ <!-- ROADMAP -->
151
+ ## Roadmap
77
152
 
78
- Each deployment saves a `.patch` file on the server under `.backups/`. You can list them with:
153
+ - [ ] Send an alert via Slack after push events
154
+ - [ ] Parallel deployments to multiple environments at once
79
155
 
80
- ```bash
81
- frak backups:list
82
- ```
156
+ See the [open issues](https://github.com/frakjs/frak/issues) for a full list of proposed features (and known issues).
83
157
 
84
- Output shows:
158
+ <p align="right">(<a href="#readme-top">back to top</a>)</p>
85
159
 
86
- - Timestamp
87
- - Filename
88
- - Additions and deletions in the patch
160
+ <!-- CONTRIBUTING -->
161
+ ## Contributing
89
162
 
90
- ## 🧠 Design Philosophy
163
+ Contributions are what make the open source community such an amazing place to learn, inspire, and create. Any contributions you make are **greatly appreciated**.
91
164
 
92
- - Minimal dependencies
93
- - Pure CLI
94
- - Patch-based history
95
- - No Docker or Node on server
96
- - Human-friendly
165
+ 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".
166
+ Don't forget to give the project a star! Thanks again!
97
167
 
98
- ## 🧰 Advanced Config (optional)
168
+ 1. Fork the Project
169
+ 2. Create your Feature Branch (`git checkout -b feature/AmazingFeature`)
170
+ 3. Commit your Changes (`git commit -m 'Add some AmazingFeature'`)
171
+ 4. Push to the Branch (`git push origin feature/AmazingFeature`)
172
+ 5. Open a Pull Request
99
173
 
100
- ```js
101
- export default {
102
- server: 'user@host',
103
- root: '/srv/www',
104
- after: 'sudo systemctl reload nginx',
174
+ <p align="right">(<a href="#readme-top">back to top</a>)</p>
105
175
 
106
- dev: {
107
- root: '/srv/www-dev',
108
- },
176
+ ### Top contributors:
109
177
 
110
- production: {
111
- root: '/srv/www-prod',
112
- },
113
- };
114
- ```
115
-
116
- ```bash
117
- frak push # uses default root-level properties
118
- frak push env=dev # uses properties in "dev" to override
119
- frak push env=production # uses properties in "production" to override
120
- ```
178
+ <a href="https://github.com/frakjs/frak/graphs/contributors">
179
+ <img src="https://contrib.rocks/image?repo=frakjs/frak" alt="contrib.rocks image" />
180
+ </a>
121
181
 
122
- ## 🐛 Debugging
182
+ <!-- LICENSE -->
183
+ ## License
123
184
 
124
- Enable debug output by setting `DEBUG=1`:
185
+ Distributed under the MIT License. See `LICENSE.txt` for more information.
125
186
 
126
- ```bash
127
- DEBUG=1 frak push
128
- ```
187
+ <p align="right">(<a href="#readme-top">back to top</a>)</p>
129
188
 
130
- ## 📄 License
189
+ <!-- CONTACT -->
190
+ ## Contact
131
191
 
132
- MIT
192
+ Your Name - [@strube](https://twitter.com/strube) - contact@frakjs.com
133
193
 
134
- ## 🧑‍💻 Author
194
+ Project Link: [https://github.com/frakjs/frak](https://github.com/frakjs/frak)
135
195
 
136
- Built by [Frank Strube](https://github.com/fstrube)
196
+ <p align="right">(<a href="#readme-top">back to top</a>)</p>
137
197
 
138
- Contributions and suggestions welcome!
198
+ <!-- MARKDOWN LINKS & IMAGES -->
199
+ <!-- https://www.markdownguide.org/basic-syntax/#reference-style-links -->
200
+ [contributors-shield]: https://img.shields.io/github/contributors/frakjs/frak.svg?style=for-the-badge
201
+ [contributors-url]: https://github.com/frakjs/frak/graphs/contributors
202
+ [forks-shield]: https://img.shields.io/github/forks/frakjs/frak.svg?style=for-the-badge
203
+ [forks-url]: https://github.com/frakjs/frak/network/members
204
+ [stars-shield]: https://img.shields.io/github/stars/frakjs/frak.svg?style=for-the-badge
205
+ [stars-url]: https://github.com/frakjs/frak/stargazers
206
+ [issues-shield]: https://img.shields.io/github/issues/frakjs/frak.svg?style=for-the-badge
207
+ [issues-url]: https://github.com/frakjs/frak/issues
208
+ [license-shield]: https://img.shields.io/github/license/frakjs/frak.svg?style=for-the-badge
209
+ [license-url]: https://github.com/frakjs/frak/blob/master/LICENSE.txt
210
+ [linkedin-shield]: https://img.shields.io/badge/-LinkedIn-black.svg?style=for-the-badge&logo=linkedin&colorB=555
211
+ [linkedin-url]: https://linkedin.com/in/linkedin_username
212
+ [product-screenshot]: images/screenshot.png
213
+ [prerequisites-screenshot]: images/node-npm-version.png
214
+ [frak-init-screenshot]: images/frak-init-screenshot.png
Binary file
Binary file
Binary file
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@frakjs/frak",
3
- "version": "0.1.0",
3
+ "version": "0.1.1",
4
4
  "description": "A commandline deployment tool for syncing files to remote servers.",
5
5
  "main": "index.js",
6
6
  "bin": {
File without changes