puter-cli 1.0.0 → 1.0.3

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,6 +1,9 @@
1
1
  # Puter-CLI
2
2
 
3
- The **Puter CLI** is a command-line interface tool designed to interact with the **Puter Cloud Platform**. It allows users to manage files, directories, applications, and other resources directly from the terminal. This tool is ideal for developers and power users who prefer working with command-line utilities.
3
+ The **Puter CLI** is a command-line interface tool designed to interact with the **Puter Cloud Platform**. If you don't have an account you can [Signup](https://puter.com/?r=N5Y0ZYTF) from here for free. This cli tool allows users to manage files, directories, applications, and other resources directly from the terminal. This tool is ideal for developers and power users who prefer working with command-line utilities.
4
+
5
+
6
+ ![](./screenshot.png)
4
7
 
5
8
  ---
6
9
 
@@ -20,30 +23,30 @@ The **Puter CLI** is a command-line interface tool designed to interact with the
20
23
  ## Installation
21
24
 
22
25
  ### Prerequisites
23
- - Node.js (v16 or higher)
26
+ - Node.js (v18 or higher)
24
27
  - npm (v7 or higher)
25
28
 
26
- ### Steps
27
- 1. Clone the repository:
28
- ```bash
29
- git clone https://github.com/bitsnaps/puter-cli.git
30
- cd puter-cli
31
- ```
32
- 2. Install dependencies:
33
- ```bash
34
- npm install
35
- ```
36
- 3. Link the CLI globally:
37
- ```bash
38
- npm link
39
- ```
29
+ Run the following command to install puter-cli globally in your system:
30
+ ```bash
31
+ npm install -g puter-cli
32
+ ```
40
33
 
41
- ---
34
+ Execute the following command to check the installation process:
35
+ ```bash
36
+ puter help
37
+ ```
42
38
 
43
39
  ## Usage
44
40
 
45
41
  ### Commands
46
42
 
43
+ #### Initilize a project
44
+ - **Create a new project**: Initilize a new project
45
+ ```bash
46
+ puter init
47
+ ```
48
+ Then just follow the prompts, this command doesn't require you to login.
49
+
47
50
  #### Authentication
48
51
  - **Login**: Log in to your Puter account.
49
52
  ```bash
@@ -72,18 +75,27 @@ It works with wildcards as you would expect in any OS for basic navigation with
72
75
  ```bash
73
76
  puter> mkdir <dir>
74
77
  ```
78
+
79
+ - **Create file**: Create a new file in the current directory.
80
+ ```bash
81
+ puter> touch <file>
82
+ ```
83
+
75
84
  - **Copy Files**: Copy files or directories.
76
85
  ```bash
77
86
  puter> cp <src> <dest>
78
87
  ```
88
+
79
89
  - **Move Files**: Move or rename files or directories.
80
90
  ```bash
81
91
  puter> mv <src> <dest>
82
92
  ```
93
+
83
94
  - **Delete Files/Directories**: Move files or directories to the trash.
84
95
  ```bash
85
96
  puter> rm [-f] <file>
86
97
  ```
98
+
87
99
  - **Empty Trash**: Empty the system's trash.
88
100
  ```bash
89
101
  puter> clean
@@ -219,6 +231,27 @@ or just type (you'll need to login):
219
231
 
220
232
  ---
221
233
 
234
+ ## Development
235
+
236
+ If you want to customize this tool you can follow these steps:
237
+
238
+ ### Steps
239
+ 1. Clone the repository:
240
+ ```bash
241
+ git clone https://github.com/bitsnaps/puter-cli.git
242
+ cd puter-cli
243
+ ```
244
+ 2. Install dependencies:
245
+ ```bash
246
+ npm install
247
+ ```
248
+ 3. Link the CLI globally:
249
+ ```bash
250
+ npm link
251
+ ```
252
+
253
+ ---
254
+
222
255
  ## Known issues:
223
256
 
224
257
  Most of the functionalities are just working fine, however some APIs related to Puter's SDK have some known issues. We tried to fix most them but some of them are not related to us, so we let you about that in case it'll be fixed by Puter's in the future:
package/commands/init.js CHANGED
@@ -44,7 +44,7 @@ async function createAppStructure({ name, template }) {
44
44
 
45
45
  // Create basic files
46
46
  const files = {
47
- '.env': `APP_NAME=${name}\PUTER_API_KEY=`,
47
+ '.env': `APP_NAME=${name}\nPUTER_API_KEY=`,
48
48
  'index.html': `<!DOCTYPE html>
49
49
  <html>
50
50
  <head>
package/package.json CHANGED
@@ -1,24 +1,28 @@
1
1
  {
2
2
  "name": "puter-cli",
3
- "version": "1.0.0",
3
+ "version": "1.0.3",
4
4
  "description": "Command line interface for Puter cloud platform",
5
5
  "main": "index.js",
6
6
  "bin": {
7
7
  "puter": "./bin/index.js"
8
8
  },
9
+ "preferGlobal": true,
9
10
  "type": "module",
10
11
  "scripts": {
11
12
  "start": "node bin/index.js",
12
13
  "test": "vitest run tests/*",
13
14
  "test:watch": "vitest --watch tests/*"
14
15
  },
16
+ "engines": {
17
+ "node": ">=18.0.0"
18
+ },
15
19
  "keywords": [
16
20
  "puter",
17
21
  "cli",
18
22
  "cloud"
19
23
  ],
20
24
  "author": "Ibrahim.H",
21
- "license": "MIT",
25
+ "license": "NoHarm",
22
26
  "dependencies": {
23
27
  "chalk": "^5.3.0",
24
28
  "cli-table3": "^0.6.5",
@@ -33,5 +37,13 @@
33
37
  },
34
38
  "devDependencies": {
35
39
  "vitest": "^2.1.8"
36
- }
40
+ },
41
+ "repository": {
42
+ "type": "git",
43
+ "url": "git+https://github.com/bitsnaps/puter-cli.git"
44
+ },
45
+ "bugs": {
46
+ "url": "https://github.com/bitsnaps/puter-cli/issues"
47
+ },
48
+ "homepage": "https://github.com/bitsnaps/puter-cli"
37
49
  }
package/screenshot.png ADDED
Binary file