# Install packages on ao processes using AO Package Manager

By [BetterIDEa](https://paragraph.com/@betteridea) · 2024-06-11

---

gm! If you have ever heard about package managers, you might think it’s to manage installed packages… well that’s exactly what ao package manager (APM) does for your ao processes, and today we will have a look at how you can use the apm blueprint to install packages on both the aos cli and the [betteridea web IDE](https://ide.betteridea.dev)

First things first, you can visit [apm.betteridea.dev](https://apm.betteridea.dev) to browse through and search for packages and even publish your own (will explain publishing in another article)

![APM homepage](https://storage.googleapis.com/papyrus_images/7407940c79a8c590fda67869eac9192f8b5e0e42a46f3b5508f81ff88f2fcd6f.png)

APM homepage

Get the APM blueprint
---------------------

For web IDE users, you don’t need to install anything since apm is already integrated in the ui :)

However, If you are using the aos cli repl, you will have to load the apm blueprint by running

    .load-blueprint apm
    

This will add helper functions like searching, getting info, publishing, installing and uninstalling packages

![loading apm blueprint](https://storage.googleapis.com/papyrus_images/8a08b9f59dd7db26cbe223d3ff37878758769caf1ef62af3ee012473a9e38633.png)

loading apm blueprint

Browse & Install packages
-------------------------

On cli, try running `APM.popular()` to get a list of the most installed packages

![popular packages](https://storage.googleapis.com/papyrus_images/4da022ec7dabdfee01f7cbe8182a8e40843e06815bec5a05e7879f04b5ebae9e.png)

popular packages

\-- You can ignore the UpdateNotice for now, this will be be fixed when [apm client 1.0.2 pr](https://github.com/permaweb/aos/pull/268) is merged with the aos repository

To install a package, you need to run the command

    APM.install('pacakge_name')
    

and replace ‘package\_name‘ with the name of the package as it appears in the APM registry.

![installing a package](https://storage.googleapis.com/papyrus_images/6311ea4a6af71a439e9c6063fe937e6677949df4d61f24101b4582e958c54eac.png)

installing a package

NOTE: the install command will download the latest version of the package available, in case you want to install another specific version, you can pass in the version number along with the package name, for example:

    APM.install("sample@1.0.1") -- will install the 1.0.1 version of sample
    

On the web IDE, you can open any project and click on the ‘packages’ button at the top right, this will open up a popup where you can checkout packages and install them. easy much?

![IDE ui to manage packages](https://storage.googleapis.com/papyrus_images/ec36dd20439cff4212a98c9d07796109ca242a15f9d62f3fa1098e42c296c7e2.png)

IDE ui to manage packages

Use your installed package
==========================

After a successful installation, you can simple use lua’s `require` function to load up the code in the installed package and use it however you want to.

    local sample = require("sample")
    return sample.hello() --prints hello ao!
    

![using the package on the cli](https://storage.googleapis.com/papyrus_images/1046d0488ca302277265afbfb37e94e6ef406586242c8cd5ded8ffdaf91ee7c4.png)

using the package on the cli

![using the package on the IDE](https://storage.googleapis.com/papyrus_images/6711f75a725631c76a52d62c453b89637abb839ae49a5e00ec60189a7f964aed.png)

using the package on the IDE

Checking installed packages
===========================

To get a list of installed packages, simply run the command

    APM.installed
    

This will present you with a table, consisting of the names of installed packages and their versions.

![installed packages](https://storage.googleapis.com/papyrus_images/0ca80841b5581d0f955f0b7986d1d19002cf7981f1d2e1a74bde271a2ba1ba54.png)

installed packages

Uninstalling packages
=====================

Once a package is no longer required, it can be removed from your process by simply running the uninstall command

    APM.uninstall('package_name')
    

and replace ‘package\_name‘ with the name of the package as it appears in the installed list or the APM registry

![uninstalling the package](https://storage.googleapis.com/papyrus_images/a02e6be10a295eaab5144f3cf107e4547f75a90eb1e05c64e2e9164350d7a1b3.png)

uninstalling the package

Stay tuned for a how to publish guide :)
========================================

If you have an idea for a package that would be useful to developing on ao or just a fun package to add humour to applications, reach out to us on our [discord](https://discord.gg/nm6VKUQBrA) and we’ll help you with the publishing process

[https://discord.gg/nm6VKUQBrA](https://discord.gg/nm6VKUQBrA)

Thanks for reading ;)

---

*Originally published on [BetterIDEa](https://paragraph.com/@betteridea/install-packages-on-ao-processes-using-ao-package-manager)*
