# How to use modified plugin in CLI or artifact API

**URL:** <https://forum.qiime2.org/t/how-to-use-modified-plugin-in-cli-or-artifact-api/2629>\
**Category:** Developer Discussion\
**Tags:** install, q2cli, demux, artifact-api\
**Created:** [January 18, 2018, 6:37pm UTC](https://forum.qiime2.org/t/how-to-use-modified-plugin-in-cli-or-artifact-api/2629 "2018-01-18T18:37:20Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![mahermassoud](https://forum.qiime2.org/letter_avatar_proxy/v4/letter/m/f1d935/32.png) [@mahermassoud](https://forum.qiime2.org/u/mahermassoud)\
**Post date:** [January 18, 2018, 6:37pm UTC](https://forum.qiime2.org/t/how-to-use-modified-plugin-in-cli-or-artifact-api/2629/1 "2018-01-18T18:37:20Z")

</div>

I have a [modified](https://forum.qiime2.org/t/export-demux-interactive-quality-plots-as-csv/2431) version of q2-demux that I would like to test. I want view the [webpage](https://view.qiime2.org/visualization/?type=html&src=https%3A%2F%2Fdocs.qiime2.org%2F2017.12%2Fdata%2Ftutorials%2Fmoving-pictures%2Fdemux.qzv) that comes up when you view the resultant qzv, by running the following command:

```
qiime demux summarize \
  --i-data demux.qza \
  --o-visualization demux.qzv

```

My questions are:

How can I modify a q2cli installation (preferably in a conda env) so that it uses my modified demux implementation? (this is preferred)

OR

Modify the q2 artifact API so it uses my modified demux?

---

<div class="post-metadata">

**Author:** ![ebolyen](https://forum.qiime2.org/user_avatar/forum.qiime2.org/ebolyen/32/11_2.png) [@ebolyen](https://forum.qiime2.org/u/ebolyen)\
**Post date:** [January 19, 2018, 6:04pm UTC](https://forum.qiime2.org/t/how-to-use-modified-plugin-in-cli-or-artifact-api/2629/3 "2018-01-19T18:04:23Z")

</div>

Hi @mahermassoud!

QIIME 2 plugins are discovered via Python entry-points. We're in the process of writing some new docs which will explain this in more detail, but the long-short of it is, if you have the plugin installed then it will be discovered automatically.

I'm going to assume some familiarity with development and git/GitHub, let me know if you are unfamiliar.

I would recommend cloning the [source repo](https://github.com/qiime2/q2-demux) if you haven't already. We have some `Makefiles` to make development easier. I would also do this all in a separate QIIME 2 conda environment so that if something goes wrong it's easy to back out of.

We are in the middle of changing a bunch of metadata-related functionality system-wide, so you may want to run the following in the repo first:

```auto
git checkout 2017.12.0
git checkout -b my_changes

```

That will back you up to the last release, and then create a new branch off of that to make any edits you want.

Then you should be able to run:

```auto
make dev

```

which will build any assets and install the python package to your environment, where QIIME 2 will discover the entry-point.

The Artifact API will always match your changes, and so will q2cli (the one exception is if you change the interface of the plugin, then you may need to run `qiime dev refresh-cache` for q2cli to see those particular changes).

Let me know if that makes sense!

---

<div class="post-metadata">

**Author:** ![mahermassoud](https://forum.qiime2.org/letter_avatar_proxy/v4/letter/m/f1d935/32.png) [@mahermassoud](https://forum.qiime2.org/u/mahermassoud)\
**Post date:** [January 22, 2018, 7:02pm UTC](https://forum.qiime2.org/t/how-to-use-modified-plugin-in-cli-or-artifact-api/2629/5 "2018-01-22T19:02:15Z")

</div>

Hi @ebolyen

That was very helpful. Thanks!
