# Core CLI v0.4.4
## Prerequisites
The following packages are used across python repositories. A global install of them all is _highly_ recommended.
- [Poetry](https://python-poetry.org/docs/#installation)
- [Invoke](https://www.pyinvoke.org/installing.html)
- [Kubefwd](https://kubefwd.com)
A running cluster from [Local
Helm](https://github.com/NEOM-KSA/neos-core-platform/tree/main/demo/helm) with
`gateway` service port forwarded. Details on port forwarding below.
### WSL
If running on Windows, you may need to install `distutils` to install the service.
```bash
$ sudo apt-get install python3.10-distutils
```
## Initial setup
```bash
$ invoke install-dev
```
## Code Quality
### Tests
```bash
invoke tests
invoke tests-coverage
```
## Linting
```bash
invoke check-style
invoke isort
```
## Running locally
### Port forwarding
To access the gateway api locally, you will need to connect to the pod inside
the cluster using `kubefwd`.
```bash
$ sudo kubefwd svc -n core -c ~/.kube/config
```
## Neosctl
When running locally, if you do not manage your own virtual environments, you
can use poetry to put you in a shell with access to the installed code.
```bash
$ poetry shell
```
### Initialize profile
```bash
$ neosctl -p my-profile profile init
Initialising [default] profile.
Gateway API url [http://core-gateway.core-gateway:9000/api/gateway]: <http://gateway_api_url:port>
Registry API url [http://neos-registry.registry:80/api/registry]: <http://registry_api_url:port>
IAM API url [http://core-iam.core-iam:80/api/iam]: <http://iam_api_url:port>
Storage API url [http://core-storage.core-storage:9000/api/storage]: <http://storage_api_url:port>
Username: <username>
```
```bash
$ cat ~/.neosctl
```
To work with the same profile across multiple commands you can export the
profile name as an environment variable.
```bash
$ neosctl -p my-profile product list
...
$ export NEOSCTL_PROFILE=my-profile
$ neosctl product list
```
### Login
```bash
$ neosctl -p=<my-profile> auth login
```
### Commands to work with data products
```bash
$ neosctl --help
$ neosctl product --help
$ neosctl metadata --help
```
To work with the same product across multiple commands you can export the
product name as an environment variable.
```bash
$ neosctl product get my-data-product
...
$ export NEOSCTL_PRODUCT=my-data-product
$ neosctl product get
```
## Releases
Release management is handled using `bump2version`. The below commands will tag
a new release. This will also update the helm chart version, this should not be
manually changed.
```bash
$ invoke bump-patch
$ invoke bump-minor
$ invoke bump-major
> vX.Y.Z
```
Raw data
{
"_id": null,
"home_page": "https://github.com/NEOS-Critical/neos-platform-cli",
"name": "neosctl",
"maintainer": "",
"docs_url": null,
"requires_python": ">=3.8,<4.0",
"maintainer_email": "",
"keywords": "",
"author": "",
"author_email": "",
"download_url": "https://files.pythonhosted.org/packages/3a/19/464d71bdd0a788af2f2d9859f867a10e5f9bbb71e3b330e34e87599eb9f7/neosctl-0.4.4.tar.gz",
"platform": null,
"description": "# Core CLI v0.4.4\n\n## Prerequisites\n\nThe following packages are used across python repositories. A global install of them all is _highly_ recommended.\n\n- [Poetry](https://python-poetry.org/docs/#installation)\n- [Invoke](https://www.pyinvoke.org/installing.html)\n- [Kubefwd](https://kubefwd.com)\n\nA running cluster from [Local\nHelm](https://github.com/NEOM-KSA/neos-core-platform/tree/main/demo/helm) with\n`gateway` service port forwarded. Details on port forwarding below.\n\n### WSL\n\nIf running on Windows, you may need to install `distutils` to install the service.\n\n```bash\n$ sudo apt-get install python3.10-distutils\n```\n\n## Initial setup\n\n```bash\n$ invoke install-dev\n```\n\n## Code Quality\n\n### Tests\n\n```bash\ninvoke tests\ninvoke tests-coverage\n```\n\n## Linting\n\n```bash\ninvoke check-style\ninvoke isort\n```\n\n## Running locally\n\n### Port forwarding\n\nTo access the gateway api locally, you will need to connect to the pod inside\nthe cluster using `kubefwd`.\n\n```bash\n$ sudo kubefwd svc -n core -c ~/.kube/config\n```\n\n## Neosctl\n\nWhen running locally, if you do not manage your own virtual environments, you\ncan use poetry to put you in a shell with access to the installed code.\n\n```bash\n$ poetry shell\n```\n\n### Initialize profile\n\n```bash\n$ neosctl -p my-profile profile init\nInitialising [default] profile.\nGateway API url [http://core-gateway.core-gateway:9000/api/gateway]: <http://gateway_api_url:port>\nRegistry API url [http://neos-registry.registry:80/api/registry]: <http://registry_api_url:port>\nIAM API url [http://core-iam.core-iam:80/api/iam]: <http://iam_api_url:port>\nStorage API url [http://core-storage.core-storage:9000/api/storage]: <http://storage_api_url:port>\nUsername: <username>\n```\n\n```bash\n$ cat ~/.neosctl\n```\n\nTo work with the same profile across multiple commands you can export the\nprofile name as an environment variable.\n\n```bash\n$ neosctl -p my-profile product list\n...\n$ export NEOSCTL_PROFILE=my-profile\n$ neosctl product list\n```\n\n### Login\n\n```bash\n$ neosctl -p=<my-profile> auth login\n```\n\n### Commands to work with data products\n\n```bash\n$ neosctl --help\n$ neosctl product --help\n$ neosctl metadata --help\n```\n\nTo work with the same product across multiple commands you can export the\nproduct name as an environment variable.\n\n```bash\n$ neosctl product get my-data-product\n...\n$ export NEOSCTL_PRODUCT=my-data-product\n$ neosctl product get\n```\n\n## Releases\n\nRelease management is handled using `bump2version`. The below commands will tag\na new release. This will also update the helm chart version, this should not be\nmanually changed.\n\n```bash\n$ invoke bump-patch\n$ invoke bump-minor\n$ invoke bump-major\n> vX.Y.Z\n```\n",
"bugtrack_url": null,
"license": "closed",
"summary": "Nortal Core CLI",
"version": "0.4.4",
"split_keywords": [],
"urls": [
{
"comment_text": "",
"digests": {
"blake2b_256": "eae7c97bd7cf0e5ce9c2c8bb317aa5e46cf28eaa037922e2ec727d61a21b1987",
"md5": "57d31dc08f48178e22b6b4082561a8fe",
"sha256": "57e0c6802e9473b40aa3210daabe77cad36fe8d263b9f8240af92177e8fba0ce"
},
"downloads": -1,
"filename": "neosctl-0.4.4-py3-none-any.whl",
"has_sig": false,
"md5_digest": "57d31dc08f48178e22b6b4082561a8fe",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": ">=3.8,<4.0",
"size": 18344,
"upload_time": "2023-02-01T14:04:49",
"upload_time_iso_8601": "2023-02-01T14:04:49.966334Z",
"url": "https://files.pythonhosted.org/packages/ea/e7/c97bd7cf0e5ce9c2c8bb317aa5e46cf28eaa037922e2ec727d61a21b1987/neosctl-0.4.4-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": "",
"digests": {
"blake2b_256": "3a19464d71bdd0a788af2f2d9859f867a10e5f9bbb71e3b330e34e87599eb9f7",
"md5": "e1c5c91775e759a3470f65392a6c9023",
"sha256": "7cc2fc9cd332d0323de48d7795a4844a5c203826a34e89476bbd6c73f81edce6"
},
"downloads": -1,
"filename": "neosctl-0.4.4.tar.gz",
"has_sig": false,
"md5_digest": "e1c5c91775e759a3470f65392a6c9023",
"packagetype": "sdist",
"python_version": "source",
"requires_python": ">=3.8,<4.0",
"size": 15288,
"upload_time": "2023-02-01T14:04:51",
"upload_time_iso_8601": "2023-02-01T14:04:51.385580Z",
"url": "https://files.pythonhosted.org/packages/3a/19/464d71bdd0a788af2f2d9859f867a10e5f9bbb71e3b330e34e87599eb9f7/neosctl-0.4.4.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2023-02-01 14:04:51",
"github": true,
"gitlab": false,
"bitbucket": false,
"github_user": "NEOS-Critical",
"github_project": "neos-platform-cli",
"lcname": "neosctl"
}