npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

phala

v1.1.9

Published

CLI for Managing Phala Cloud Services

Readme

Phala Cloud CLI

Command-line tool for deploying and managing TEE (Trusted Execution Environment) applications on Phala Cloud.

Install

npm install -g phala

Or run directly without installing:

npx phala <command>
bunx phala <command>

Quick Start

# Authenticate (opens browser for device flow)
phala login

# Deploy from a directory with docker-compose.yml
phala deploy

# Link the directory to the CVM for future commands
phala link

# View container logs
phala logs

# SSH into the CVM
phala ssh

Tip: Run phala link after your first deploy. It creates a phala.toml that binds the directory to the CVM, so subsequent commands (deploy, logs, ssh, cp, ps) work without specifying a CVM ID. phala.toml is safe to commit to version control.

Commands

Deploy

| Command | Description | |---------|-------------| | deploy | Deploy new CVM or update existing one | | instance-types | List available instance types | | nodes | List TEE worker nodes |

Manage

| Command | Description | |---------|-------------| | apps | List deployed CVMs | | cvms | Manage CVMs (start, stop, restart, delete, resize, ...) | | link | Link a local directory to a CVM | | simulator | Local TEE simulator for development |

CVM Operations

| Command | Description | |---------|-------------| | logs | Fetch logs from a CVM (container, serial, stdout/stderr) | | ps | List containers of a CVM | | ssh | Connect to a CVM via SSH | | cp | Copy files to/from a CVM via SCP |

Profile / Auth

| Command | Description | |---------|-------------| | login | Authenticate with Phala Cloud | | logout | Remove stored API key | | status | Check authentication status | | whoami | Print the current user | | profiles | List auth profiles | | switch | Switch auth profiles |

Advanced

| Command | Description | |---------|-------------| | api | Make authenticated API requests | | self | CLI self-management (update) | | completion | Generate shell completion scripts |

Configuration

Project file (phala.toml)

Place a phala.toml in your project root to bind a directory to a CVM:

app_id = "app_abc123"
compose_file = "docker-compose.yml"
env_file = ".env"
public_logs = true
listed = false

When phala.toml exists, commands like deploy, logs, ssh, and cp automatically use the configured CVM.

Environment variables

| Variable | Description | |----------|-------------| | PHALA_CLOUD_API_KEY | Override the stored API key | | PHALA_CLOUD_API_PREFIX | Override the API base URL | | PHALA_CLOUD_DIR | Override the credentials directory (default: ~/.phala-cloud) | | PHALA_UPDATE_CHANNEL | Release channel for self update (e.g., latest, beta) |

Profiles

Manage multiple workspaces with named profiles:

phala login --profile work
phala login --profile personal
phala switch work
phala profiles

Credentials are stored in ~/.phala-cloud/ with restricted file permissions.

Documentation

Full command reference with all options, arguments, and examples:

https://github.com/Phala-Network/phala-cloud/tree/main/cli/docs

Development

bun install
bun run src/index.ts <command>

# Quality checks
bun run fmt        # Format with Biome
bun run lint       # Lint with Biome
bun run type-check # TypeScript type checking
bun run test       # Run tests

License

Apache-2.0