mirror of
https://github.com/AikidoSec/safe-chain.git
synced 2026-05-26 12:10:49 +00:00
Update docs: migration guide
This commit is contained in:
parent
c4a33ca151
commit
9e1bdd4a31
2 changed files with 96 additions and 1 deletions
|
|
@ -24,7 +24,9 @@ Aikido Safe Chain works on Node.js version 16 and above and supports the followi
|
||||||
|
|
||||||
## Installation
|
## Installation
|
||||||
|
|
||||||
Installing the Aikido Safe Chain is easy with our one-line installer:
|
Installing the Aikido Safe Chain is easy with our one-line installer.
|
||||||
|
|
||||||
|
> ⚠️ **Already installed via npm?** See the [migration guide](docs/npm-to-binary-migration.md) to switch to the binary version.
|
||||||
|
|
||||||
### Unix/Linux/macOS
|
### Unix/Linux/macOS
|
||||||
|
|
||||||
|
|
@ -186,11 +188,13 @@ Use the `--ci` flag to automatically configure Aikido Safe Chain for CI/CD envir
|
||||||
### Unix/Linux/macOS (GitHub Actions, Azure Pipelines, etc.)
|
### Unix/Linux/macOS (GitHub Actions, Azure Pipelines, etc.)
|
||||||
|
|
||||||
**JavaScript only:**
|
**JavaScript only:**
|
||||||
|
|
||||||
```shell
|
```shell
|
||||||
curl -fsSL https://raw.githubusercontent.com/AikidoSec/safe-chain/main/install-scripts/install-safe-chain.sh | sh -s -- --ci
|
curl -fsSL https://raw.githubusercontent.com/AikidoSec/safe-chain/main/install-scripts/install-safe-chain.sh | sh -s -- --ci
|
||||||
```
|
```
|
||||||
|
|
||||||
**With Python support:**
|
**With Python support:**
|
||||||
|
|
||||||
```shell
|
```shell
|
||||||
curl -fsSL https://raw.githubusercontent.com/AikidoSec/safe-chain/main/install-scripts/install-safe-chain.sh | sh -s -- --ci --include-python
|
curl -fsSL https://raw.githubusercontent.com/AikidoSec/safe-chain/main/install-scripts/install-safe-chain.sh | sh -s -- --ci --include-python
|
||||||
```
|
```
|
||||||
|
|
@ -198,11 +202,13 @@ curl -fsSL https://raw.githubusercontent.com/AikidoSec/safe-chain/main/install-s
|
||||||
### Windows (Azure Pipelines, etc.)
|
### Windows (Azure Pipelines, etc.)
|
||||||
|
|
||||||
**JavaScript only:**
|
**JavaScript only:**
|
||||||
|
|
||||||
```powershell
|
```powershell
|
||||||
iex "& { $(iwr 'https://raw.githubusercontent.com/AikidoSec/safe-chain/main/install-scripts/install-safe-chain.ps1' -UseBasicParsing) } -ci"
|
iex "& { $(iwr 'https://raw.githubusercontent.com/AikidoSec/safe-chain/main/install-scripts/install-safe-chain.ps1' -UseBasicParsing) } -ci"
|
||||||
```
|
```
|
||||||
|
|
||||||
**With Python support:**
|
**With Python support:**
|
||||||
|
|
||||||
```powershell
|
```powershell
|
||||||
iex "& { $(iwr 'https://raw.githubusercontent.com/AikidoSec/safe-chain/main/install-scripts/install-safe-chain.ps1' -UseBasicParsing) } -ci -includepython"
|
iex "& { $(iwr 'https://raw.githubusercontent.com/AikidoSec/safe-chain/main/install-scripts/install-safe-chain.ps1' -UseBasicParsing) } -ci -includepython"
|
||||||
```
|
```
|
||||||
|
|
|
||||||
89
docs/npm-to-binary-migration.md
Normal file
89
docs/npm-to-binary-migration.md
Normal file
|
|
@ -0,0 +1,89 @@
|
||||||
|
# Migrating from npm global tool to binary installation
|
||||||
|
|
||||||
|
If you previously installed safe-chain as an npm global package, you need to migrate to the binary installation.
|
||||||
|
|
||||||
|
Depending on the version manager you're using, the uninstall process differs:
|
||||||
|
|
||||||
|
### Standard npm (no version manager)
|
||||||
|
|
||||||
|
1. **Clean up shell aliases:**
|
||||||
|
|
||||||
|
```bash
|
||||||
|
safe-chain teardown
|
||||||
|
```
|
||||||
|
|
||||||
|
2. **Restart your terminal**
|
||||||
|
|
||||||
|
3. **Uninstall the npm package:**
|
||||||
|
|
||||||
|
```bash
|
||||||
|
npm uninstall -g @aikidosec/safe-chain
|
||||||
|
```
|
||||||
|
|
||||||
|
4. **Install the binary version** (see [Installation](../README.md#installation))
|
||||||
|
|
||||||
|
### nvm (Node Version Manager)
|
||||||
|
|
||||||
|
**Important:** nvm installs global packages separately for each Node version, so safe-chain must be uninstalled from each version where it was installed.
|
||||||
|
|
||||||
|
1. **Clean up shell aliases:**
|
||||||
|
|
||||||
|
```bash
|
||||||
|
safe-chain teardown
|
||||||
|
```
|
||||||
|
|
||||||
|
2. **Restart your terminal**
|
||||||
|
|
||||||
|
3. **Uninstall from all Node versions:**
|
||||||
|
|
||||||
|
**Option A** - Automated script (recommended):
|
||||||
|
|
||||||
|
```bash
|
||||||
|
for version in $(nvm list | grep -oE 'v[0-9]+\.[0-9]+\.[0-9]+'); do nvm use $version && npm uninstall -g @aikidosec/safe-chain; done
|
||||||
|
```
|
||||||
|
|
||||||
|
**Option B** - Manual per version:
|
||||||
|
|
||||||
|
```bash
|
||||||
|
nvm use <version>
|
||||||
|
npm uninstall -g @aikidosec/safe-chain
|
||||||
|
```
|
||||||
|
|
||||||
|
Repeat for each Node version where safe-chain was installed.
|
||||||
|
|
||||||
|
4. **Install the binary version** (see [Installation](../README.md#installation))
|
||||||
|
|
||||||
|
### Volta
|
||||||
|
|
||||||
|
1. **Clean up shell aliases:**
|
||||||
|
|
||||||
|
```bash
|
||||||
|
safe-chain teardown
|
||||||
|
```
|
||||||
|
|
||||||
|
2. **Restart your terminal**
|
||||||
|
|
||||||
|
3. **Uninstall the Volta package:**
|
||||||
|
|
||||||
|
```bash
|
||||||
|
volta uninstall @aikidosec/safe-chain
|
||||||
|
```
|
||||||
|
|
||||||
|
4. **Install the binary version** (see [Installation](../README.md#installation))
|
||||||
|
|
||||||
|
## Troubleshooting
|
||||||
|
|
||||||
|
### Shell aliases still present after migration
|
||||||
|
|
||||||
|
1. Run `safe-chain teardown` (if the binary is installed)
|
||||||
|
2. Manually remove any safe-chain entries from your shell config files:
|
||||||
|
- Bash: `~/.bashrc`
|
||||||
|
- Zsh: `~/.zshrc`
|
||||||
|
- Fish: `~/.config/fish/config.fish`
|
||||||
|
- PowerShell: `$PROFILE`
|
||||||
|
3. Restart your terminal
|
||||||
|
4. Re-run the install script
|
||||||
|
|
||||||
|
### "command not found: safe-chain" after migration
|
||||||
|
|
||||||
|
The binary installation directory (`~/.safe-chain/bin`) may not be in your PATH. Restart your terminal. If the problem persists: re-run the installation of safe-chain.
|
||||||
Loading…
Add table
Add a link
Reference in a new issue