
Security News
Suno Breached via Shai-Hulud Worm, Leaked Code Exposes AI Music Scraping
A Shai-Hulud infection exposed Suno's source code, which shows the AI music startup stream-ripped tracks to train its models.
@aptos-labs/aptos-cli
Advanced tools
The @aptos-labs/aptos-cli package allows you to use the Aptos CLI from inside a Nodejs project.
To install the Aptos CLI, you need to have Node.js and npm installed on your system. Then, you can install it using:
npm install @aptos-labs/aptos-cli
That command will download the Aptos CLI and create a Node bin file, making it available to use in a Node environment.
Once you have the package installed and the Node bin file, you can run the following command, in your project environment, to install the Aptos CLI in your project:
npx aptos --install
Alternatively, you can simply run the cli using the npx aptos command. That will install the Aptos CLI in your project if it's not already installed.
npx aptos
To use the Aptos CLI, in your project environment, run the npx aptos command, to see the available commands.
npx aptos
If you already have the Aptos CLI binary installed on your system, you can specify its path to use it directly:
npx aptos --binary-path /path/to/aptos <command>
You can install a specific version of the Aptos CLI by setting the APTOS_CLI_VERSION environment variable:
# Install version 4.5.0
APTOS_CLI_VERSION=4.5.0 npx aptos --install
# Or with the v prefix
APTOS_CLI_VERSION=v4.5.0 npx aptos --install
When APTOS_CLI_VERSION is set:
--install and --update commandsThis is useful for:
To update the Aptos CLI, you can run the following command within your project environment:
npx aptos --update
To set up the project for development:
npm install
npm run dev
This will build the project and run the CLI.
To build the project:
npm run build
The Aptos CLI can be used in CI/CD pipelines to build Move packages and generate deployment payloads. This is useful for automated deployments and multi-step workflows.
# In your GitHub Actions workflow
# Prerequisites: Set up Node.js first
- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: "20"
- name: Install Aptos CLI npm package
run: npm install @aptos-labs/aptos-cli
- name: Install Aptos CLI
run: npx aptos --install
- name: Build Move package
working-directory: your-move-project
run: |
~/.local/bin/aptos move compile \
--named-addresses your_module=0x1 \
--save-metadata
- name: Generate publish payload
working-directory: your-move-project
run: |
~/.local/bin/aptos move build-publish-payload \
--named-addresses your_module=0x1 \
--json-output-file publish-payload.json \
--assume-yes
- name: Upload artifact for later steps
uses: actions/upload-artifact@v4
with:
name: move-artifacts
path: your-move-project/publish-payload.json
For upgrading existing object-deployed contracts:
- name: Generate upgrade payload
working-directory: your-move-project
run: |
~/.local/bin/aptos move build-upgrade-payload \
--named-addresses your_module=0x1 \
--object-address 0xYOUR_OBJECT_ADDRESS \
--json-output-file upgrade-payload.json \
--assume-yes
jobs:
build:
runs-on: ubuntu-latest
steps:
# ... build steps above ...
- uses: actions/upload-artifact@v4
with:
name: move-artifacts
path: your-move-project/publish-payload.json
deploy:
needs: build
runs-on: ubuntu-latest
steps:
- uses: actions/download-artifact@v4
with:
name: move-artifacts
- name: Use the payload
run: |
# The payload JSON can be used for deployment
cat publish-payload.json
See the build-move-artifacts.yaml workflow for a complete working example.
FAQs
Aptos CLI available from npmjs
The npm package @aptos-labs/aptos-cli receives a total of 103,776 weekly downloads. As such, @aptos-labs/aptos-cli popularity was classified as popular.
We found that @aptos-labs/aptos-cli demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 2 open source maintainers collaborating on the project.
Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Security News
A Shai-Hulud infection exposed Suno's source code, which shows the AI music startup stream-ripped tracks to train its models.

Security News
Vercel is formalizing a monthly release program for Next.js. The change follows React2Shell and a sharp rise in AI-assisted vulnerability discovery.

Research
/Security News
11 malicious NuGet tools pose as game cheats to deploy Windows payloads, track hosts, and use Google Sheets for telemetry and control.