# NSCLI Scripts

This directory is for scripts that operate _on_ nscli or _about_ nscli.
For example, there is a script that installs nscli, and one that creates JIRA issues from GitHub issues.

## Where is the nscli script itself?

If I try to examine the nscli script installed on my computer, here's what I see:

```python
MQ501VG8WL:~ mica7786$ cat $(which nscli)
#!/Users/mica7786/nscli/bin/python2.7
# EASY-INSTALL-ENTRY-SCRIPT: 'nscli==2.6.2','console_scripts','nscli'
__requires__ = 'nscli==2.6.2'
import re
import sys
from pkg_resources import load_entry_point

if __name__ == '__main__':
    sys.argv[0] = re.sub(r'(-script\.pyw?|\.exe)?$', '', sys.argv[0])
    sys.exit(
        load_entry_point('nscli==2.6.2', 'console_scripts', 'nscli')()
    )
```

You won't find the above file anywhere in this repo. That's because we don't write this script
directly, we let [setuptools do it for us](http://setuptools.readthedocs.io/en/latest/setuptools.html#automatic-script-creation).
We tell setuptools to make the script using this section of [setup.cfg](https://github.rackspace.com/NSI/nscli/blob/master/setup.cfg):

```ini
[options.entry_points]
console_scripts =
    nscli = nscli.__main__:main
```
