Skip to content

Commit 64ee1a4

Browse files
committed
doc: installation instructions
1 parent 10ee89d commit 64ee1a4

File tree

6 files changed

+195
-39
lines changed

6 files changed

+195
-39
lines changed

README.md

Lines changed: 5 additions & 36 deletions
Original file line numberDiff line numberDiff line change
@@ -22,50 +22,19 @@ It allows users and groups creations, modifications and deletions to be synchron
2222

2323
## Installation
2424

25-
### Binary files
26-
27-
Binary files are available on the [releases page](https://github.com/python-scim/scim2-cli/releases).
28-
29-
### Python package
30-
31-
scim2-cli is published on the [PyPI repository](https://pypi.org/project/scim2-cli).
32-
You can install it with your favourite python package manager.
33-
34-
```shell
35-
pip install scim2-cli
25+
```console
26+
$ curl -LsSf uvx.sh/scim2-cli/install.sh | sh
3627
```
3728

38-
### From sources
39-
40-
To run scim2-cli from the sources, [uv is needed](https://docs.astral.sh/uv/getting-started/installation/) for development:
41-
42-
```shell
43-
git clone https://github.com/python-scim/scim2-cli.git
44-
cd scim2-cli
45-
uv sync
46-
```
47-
48-
Then, it can be launched directly as a Python script:
49-
50-
```shell
51-
uv run scim2 --help
52-
```
53-
54-
Or you can build a single file binary from the sources:
55-
56-
```shell
57-
uv sync --group bundle
58-
uv run pyinstaller --name scim2 --onefile scim2_cli/__init__.py
59-
./dist/scim2 --help
60-
```
29+
Check the [installation documentation](https://scim2-cli.readthedocs.io/en/latest/installation.html) for other methods.
6130

6231
## Usage
6332

6433
Check the [reference](https://scim2-cli.readthedocs.io/en/latest/reference.html) for more details.
6534

6635
Here is an example of resource creation:
6736

68-
```shell
37+
```console
6938
$ scim2 --url https://auth.example --header "Authorization: Bearer 12345" create user --user-name "bjensen@example.com"
7039
{
7140
"schemas": ["urn:ietf:params:scim:schemas:core:2.0:User"],
@@ -83,7 +52,7 @@ $ scim2 --url https://auth.example --header "Authorization: Bearer 12345" create
8352

8453
Here is an example of resource query:
8554

86-
```shell
55+
```console
8756
$ scim2 --url https://auth.example --header "Authorization: Bearer 12345" query user 2819c223-7f76-453a-919d-413861904646
8857
{
8958
"schemas": ["urn:ietf:params:scim:schemas:core:2.0:User"],

doc/conf.py

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,10 @@
1717
"sphinx.ext.todo",
1818
"sphinx.ext.viewcode",
1919
"sphinx_click",
20+
"sphinx_design",
21+
"sphinx_iconify",
2022
"sphinx_issues",
23+
"sphinx_substitution_extensions",
2124
]
2225

2326
templates_path = ["_templates"]
@@ -34,6 +37,11 @@
3437

3538
version = metadata.version("scim2_cli")
3639
language = "en"
40+
41+
rst_prolog = f"""
42+
.. |version| replace:: {version}
43+
"""
44+
3745
pygments_style = "sphinx"
3846
todo_include_todos = True
3947
toctree_collapse = False

doc/index.rst

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ Table of contents
77
.. toctree::
88
:maxdepth: 2
99

10+
installation
1011
tutorial
1112
reference
1213
contributing

doc/installation.rst

Lines changed: 95 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,95 @@
1+
Installation
2+
============
3+
4+
.. tab-set::
5+
6+
.. tab-item:: :iconify:`material-icon-theme:uv` uvx.sh
7+
:sync: uvx-sh
8+
9+
`uvx.sh <https://uvx.sh>`_ provides an installation script that installs scim2-cli permanently on your system.
10+
11+
.. tab-set::
12+
:class: outline
13+
14+
.. tab-item:: Linux / macOS
15+
16+
.. code-block:: console
17+
18+
$ curl -LsSf uvx.sh/scim2-cli/install.sh | sh
19+
20+
.. tab-item:: Windows
21+
22+
.. code-block:: powershell
23+
24+
powershell -ExecutionPolicy ByPass -c "irm https://uvx.sh/scim2-cli/install.ps1 | iex"
25+
26+
Then you can run:
27+
28+
.. code-block:: console
29+
30+
$ scim2 --help
31+
32+
.. tab-item:: :iconify:`material-icon-theme:uv` uvx
33+
:sync: uvx
34+
35+
If you have `uv`__ installed, you can run scim2-cli directly without installing it:
36+
37+
__ https://docs.astral.sh/uv/
38+
39+
.. code-block:: console
40+
41+
$ uvx scim2-cli --help
42+
43+
.. tab-item:: :iconify:`devicon:pypi` pip
44+
:sync: pip
45+
46+
scim2-cli is published on `PyPI <https://pypi.org/project/scim2-cli>`_.
47+
48+
.. code-block:: console
49+
50+
$ pip install scim2-cli
51+
52+
Then you can run:
53+
54+
.. code-block:: console
55+
56+
$ scim2 --help
57+
58+
.. tab-item:: :iconify:`mdi:file-download` Binaries
59+
:sync: binaries
60+
61+
Binary files are available on the `releases page <https://github.com/python-scim/scim2-cli/releases>`_.
62+
63+
.. code-block:: console
64+
:substitutions:
65+
66+
$ wget https://github.com/python-scim/scim2-cli/releases/download/|version|/scim2-linux -O scim2
67+
$ chmod +x scim2
68+
$ ./scim2 --help
69+
70+
.. tab-item:: :iconify:`devicon:git` Sources
71+
:sync: sources
72+
73+
To run scim2-cli from the sources, `uv`__ is needed:
74+
75+
__ https://docs.astral.sh/uv/getting-started/installation/
76+
77+
.. code-block:: console
78+
79+
$ git clone https://github.com/python-scim/scim2-cli.git
80+
$ cd scim2-cli
81+
$ uv sync
82+
83+
Then you can run it directly:
84+
85+
.. code-block:: console
86+
87+
$ uv run scim2 --help
88+
89+
Or build a single file binary:
90+
91+
.. code-block:: console
92+
93+
$ uv sync --group bundle
94+
$ uv run pyinstaller --name scim2 --onefile scim2_cli/__init__.py
95+
$ ./dist/scim2 --help

pyproject.toml

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -51,11 +51,14 @@ dev = [
5151
"tox-uv>=1.16.0",
5252
]
5353
doc = [
54+
"myst-parser>=3.0.1",
5455
"shibuya>=2024.5.15",
5556
"sphinx>=7.3.7",
5657
"sphinx-click>=6.0.0",
57-
"sphinx-issues >= 5.0.0",
58-
"myst-parser>=3.0.1",
58+
"sphinx-design>=0.6.0",
59+
"sphinx-iconify>=0.0.6",
60+
"sphinx-issues>=5.0.0",
61+
"sphinx-substitution-extensions>=2024.8.6",
5962
]
6063
bundle = [
6164
"pyinstaller>=6.10.0",

uv.lock

Lines changed: 81 additions & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)