Forest CLI Commands
The Forest CLI provides commands to help you manage your packages.
Commands
forest init
Initializes a new package in the current directory. This creates a forest.json file with metadata such as name, version, and description.
forest init
> Platform : <select your platform>
Created forest.jsonforest install <package-name>
Installs a package from Forest PM. Downloads the package and its dependencies into your project’s packages directory.
Alias: forest i <package-name>
forest uninstall <package-name>
Uninstalls a package from your project. Removes the package and its dependencies from your project’s packages directory.
Alias: forest remove <package-name>
forest publish
Publishes your package to Forest PM. Uploads the package and its metadata to the Forest PM registry, making it available for others to install.
forest login
Logs in to your Forest PM account. Prompts for username and password, then stores your authentication token locally.
The Forest CLI supports two-factor authentication (2FA). If enabled, you’ll be prompted for a 2FA code after entering your credentials.
forest login
> Username: your-username
> Password: ********
> 2FA Code: 123456
Logged in as your-usernameforest logout
Logs out of your Forest PM account and removes the local authentication token.
forest whoami
Displays the currently logged-in user for the active Forest PM account.