Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -48,3 +48,7 @@
!CHANGELOG.md
!CONTRIBUTING.md
!CODE_OF_CONDUCT.md

# Build artifacts
site/
.cache/
193 changes: 115 additions & 78 deletions docs/home/quickstart.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,130 +13,167 @@ description: Install socx-cli, verify the setup, and run your first commands.
To start using SoCX CLI, follow these steps to install, verify, and run your
first commands.

## Installing SoCX CLI
## Prerequisites

???+ warning "Requirements"
Before installing SoCX CLI, ensure you have the following:

In order to be able to use SoCX, the following requirements must be met:
- **Python 3.12 or newer** - SoCX requires modern Python features
- **Package manager** - Either [`uv`](https://github.com/astral-sh/uv) (recommended) or `pip`/`pipx`
- **(Optional) Git workspace** - Access to your SoC workspace enables Git manifest and regression features with real project data
- **(Optional) Shell access** - Script plugins require executable permissions and shell access

- [ ] Python 3.12 or newer
- [ ] `pip` or [`uv`](https://github.com/astral-sh/uv) for managing environments
- [ ] (optional) access to your SoC workspace so Git manifests and regressions have
real data to operate on
## Installation

??? info "Verifying Your Installation"
Choose your preferred installation method:

Run the below commands to verify `socx` was properly installed.
===! "uv (recommended)"

```bash title=""
socx --help
socx version
uv tool install socx-cli
```

If you see the top-level help and the current version, the CLI is ready to use.
This installs `socx` in an isolated environment managed by `uv`.

??? info "Upgrading to the Latest Version"
=== "pipx"

=== "uv"
```bash title=""
pipx install socx-cli
```

```bash title=""
uv tool update socx-cli
```
Similar to `uv`, `pipx` installs `socx` in an isolated environment.

=== "pip"
=== "pip"

```bash title=""
pip install --upgrade socx-cli
```
```bash title=""
pip install socx-cli
```

===! "uv"
!!! warning
Installing with `pip` may affect your global Python environment. Consider using `uv` or `pipx` instead.

```bash title=""
uv tool install socx-cli
## Verify Installation

Run the following commands to verify that `socx` was installed correctly:

```bash
socx --help
socx version
```

If you see the top-level help menu and the current version number, the CLI is ready to use.

## Upgrade to Latest Version

Keep your installation up to date:

=== "uv"

```bash
uv tool upgrade socx-cli
```

=== "pipx"

```bash
pipx upgrade socx-cli
```

=== "pip"

```bash title=""
pip install socx-cli
```bash
pip install --upgrade socx-cli
```

## Using the CLI
## Basic Commands

=== "Git"
SoCX provides several built-in commands to help you get started. Here are the most commonly used commands:

Manage multiple git repositories at once using `socx git`
### Git Management

```bash title=""
# Display a manifest table of all repositories under the current path
socx git mfest
Manage multiple Git repositories at once using `socx git`:

# Alternatively, display it in a one-liner format of 'ref - message, date'
socx git mfest -f ref
```bash
# Display a manifest table of all repositories under the current path
socx git mfest

# Or in json format
socx git mfest -f json
# Display in a one-liner format showing 'ref - message, date'
socx git mfest -f ref

# You can also pass a path as argument to run it from a different path
socx git mfest /project/users/foo/workspace
# Output in JSON format for scripting
socx git mfest -f json

# Relative paths are also supported
socx git mfest ../../bar/bazz
```
# Scan a specific directory
socx git mfest /project/users/foo/workspace

=== "Config"
# Relative paths are also supported
socx git mfest ../../bar/bazz
```

Print, edit, debug or inspect python API of configurations
### Configuration Management

```bash title=""
# Dump all configurations
socx config list
View, edit, and debug configuration settings:

# Dump all configurations in a pretty tree format
socx config tree
```bash
# List all configuration values
socx config list

# Dump a tree/value of a specific configuration
socx config get git.manifest.columns
# Display configurations in a pretty tree format
socx config tree

# Modify existing configurations interactively
socx config edit # will run a friendly interactive prompt
# Get a specific configuration value
socx config get git.manifest.columns

# Debug configuration values or check the loading order
socx config debug
# Edit configurations interactively in your editor
socx config edit

# Inspect settings methods and members (when using it as a python library)
socx config inspect
```
# Debug configuration loading and see override order
socx config debug

=== "Regression"
# Inspect settings API (when using socx as a Python library)
socx config inspect
```

Parse and execute commands in parallel (e.g. a file of test 'run'
commands)
### Regression Testing

```bash title=""
socx rgr run -i ./sim/regressions/doa_commands.list # file can have any or no
# extension
```
Run test commands in parallel:

=== "Plugins"
```bash
# Run regression tests from a command list file
socx rgr run -i ./sim/regressions/commands.list

Add any python script as a subcommand of `socx` through the power of
plugins
# Specify custom output directory
socx rgr run -i failed.log -o ./results

```bash title=""
# add a function from a script as a subcommand (a.k.a plugin):
socx plugin add ./scripts/dv/generate_rals.py:main
# Launch the interactive terminal UI
socx rgr tui
```

# you can also specify only a path to run the file itself (run as __main__)
socx plugin add ./scripts/dv/generate_rals.py
### Plugin Management

# or specify a module path if it is installed on your system or on your active
# virtual environment
socx plugin add my.custom.package:run_test
View plugin examples and documentation:

# show an example for using 'socx' as a library to create new scripts/plugins
socx plugin example
```
```bash
# Display plugin quickstart guide
socx plugin example
```

!!! tip
To add custom plugins, edit your configuration file. See the [Plugin Development](../user-guide/plugins.md) guide for details.

### Global Options

All commands support these global options:

```bash
# Enable debug logging
socx --debug config list

# Set logging verbosity (DEBUG, INFO, WARNING, ERROR)
socx --verbosity DEBUG rgr run

# Run without loading user/repo configuration
socx --no-config config list
```

## Next Steps

Expand Down
Loading