Skip to content

Commit 6fdaa86

Browse files
committed
change readme, and script
1 parent 4379813 commit 6fdaa86

File tree

5 files changed

+24
-15
lines changed

5 files changed

+24
-15
lines changed

README.md

Lines changed: 13 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ concerns before they become hundred-million-dollar problems. The added benefit?
1717
No more black-box tools running on your code and the confidence of a 100%
1818
determinstic tool.
1919

20-
![NanoAPI UI Overview](/media/hero-app.jpeg)
20+
![NanoAPI UI Overview](/media/hero-app.png)
2121

2222
## Features
2323

@@ -65,20 +65,24 @@ For the latest updates, visit our [project board](/projects).
6565

6666
## Installation
6767

68-
> [!IMPORTANT]
69-
> `napi` works out of the box on both mac and linux systems. To use this tool on
70-
> Windows, you will need to install
71-
> [WSL (Windows Subsystem for Linux)](https://learn.microsoft.com/en-us/windows/wsl/install)
72-
> and run the CLI commands from there.
68+
`napi` works out of the box on both mac and linux systems.
7369

74-
Ensure you have Node.js (>=22) and npm installed.
70+
To use this tool on Windows, you will need to install and run the CLI commands from there.
7571

76-
https://nodejs.org/en
72+
[WSL (Windows Subsystem for Linux)](https://learn.microsoft.com/en-us/windows/wsl/install)
73+
74+
To install `napi`, you can use our installation script:
7775

7876
```bash
79-
npm install -g @nanoapi.io/napi
77+
curl -fsSL https://raw.githubusercontent.com/nanoapi-io/napi/refs/heads/main/install_scripts/install.sh | bash
8078
```
8179

80+
Our download and install manually from:
81+
82+
https://github.com/nanoapi-io/napi/releases/latest
83+
84+
This will download and install the latest version of `napi` to your system.
85+
8286
## CLI Usage
8387

8488
`napi` provides a streamlined Command-Line Interface (CLI) to interact with and

install_scripts/install.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ BACKUP_PATH="$INSTALL_PATH.bak"
2121
# Check if the executable already exists
2222
if [ -f "$INSTALL_PATH" ]; then
2323
echo "Existing version found, creating a backup..."
24-
mv "$INSTALL_PATH" "$BACKUP_PATH"
24+
sudo mv "$INSTALL_PATH" "$BACKUP_PATH"
2525
else
2626
echo "No existing version found, proceeding with installation."
2727
fi
@@ -43,6 +43,6 @@ if [ $? -eq 0 ]; then
4343
else
4444
# If the installation failed, restore the backup
4545
echo "Update failed! Restoring the old version..."
46-
mv "$BACKUP_PATH" "$INSTALL_PATH"
46+
sudo mv "$BACKUP_PATH" "$INSTALL_PATH"
4747
echo "Restored the old version. Please try again later."
4848
fi

media/hero-app.jpeg

-188 KB
Binary file not shown.

media/hero-app.png

306 KB
Loading

packages/cli/src/cli/helpers/checkVersion.ts

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -22,18 +22,23 @@ export async function checkVersionMiddleware() {
2222

2323
const tagName = release.data.tag_name;
2424

25-
const latestVersion = tagName.replace(/^v/, "");
25+
const latestVersion = tagName.replace(/^v/, "d");
2626

2727
if (currentVersion !== latestVersion) {
2828
console.error(
2929
`
3030
You are using version ${currentVersion}.
3131
The latest version is ${latestVersion}.
32-
Please update to the latest version.
32+
Please update to the latest version to continue using napi.
3333
34-
You can update the version by running one of the following commands:
34+
You can update the version by running the following command:
3535
36-
You can get the latest version here: ${release.data.html_url}
36+
\`\`\`bash
37+
curl -fsSL https://raw.githubusercontent.com/nanoapi-io/napi/refs/heads/main/install_scripts/install.sh | bash
38+
\`\`\`
39+
40+
Or you can download and install them manually from here:
41+
${release.data.html_url}
3742
`,
3843
);
3944
process.exit(1);

0 commit comments

Comments
 (0)