Skip to main content

Sleight of hand (soh) CLI tool.

Project description

Sleight of hand, or soh, is a command line tool that handles a lot of common tasks for developers. For the most part, it offers a convenient command line interface to a lot of standard library operations, such as base64 encoding, creating datetime strings, fetching system information, uuid generation, etc.

Installation

To install soh use pip.

pip install soh

Usage

The entry point for all commands is

$ soh
Usage: soh [OPTIONS] COMMAND [ARGS]...

  Sleight of hand CLI commands.

  (+) indicates command group. Use the -c flag on most commands to copy
  output to clipboard

Options:
  -h, --help  Show this message and exit.

Commands:
  b64      + Base64 operations
  create   + Create files
  dt       + Datetimes
  epoch    + Epoch times
  json     JSON printing
  jwt      Display JWT contents
  secret   + Secrets generators
  serve    Simple http server at current directory
  sys      + System information
  uuid     Generate UUIDs
  version  soh CLI version

To get help on any command use the -h or --help flag.

$ soh uuid -h
Usage: soh uuid [OPTIONS]

  Generate UUIDs.

Options:
  -v, --version INTEGER  uuid version  [default: 4]
  -ns, --namespace TEXT  namespace (v3, v5) {dns, url, oid, x500}
  -n, --name TEXT        name (v3, v5)
  -u, --upper            use upper case
  -c, --clip             copy to clipboard
  -h, --help             Show this message and exit.

To copy the execution output of most commands to clipboard, use the -c or --clip command.

$ soh uuid -c
c64af300-8895-4dff-b005-15dcd4c72f24 (copied to clipboard 📋)

Developer Setup

To set up a local development environment follow these (or portions of these) steps.

# clone
git clone git@github.com:crflynn/soh.git
cd soh

# setup pre-commit
brew install pre-commit
pre-commit install

# setup pyenv and python 3
brew install pyenv
pyenv install 3.7.3
pyenv local 3.7.3

# setup poetry and install deps
curl -sSL https://raw.githubusercontent.com/sdispater/poetry/master/get-poetry.py | python
poetry install
poetry install --develop soh

pre-commit will enforce black code formatting to pass before committing. The configuration for black is in the pyproject.toml file.

To run tests,

pytest

The testing configuration is found in pytest.ini.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

soh-0.1.0.tar.gz (14.6 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

soh-0.1.0-py3-none-any.whl (23.0 kB view details)

Uploaded Python 3

File details

Details for the file soh-0.1.0.tar.gz.

File metadata

  • Download URL: soh-0.1.0.tar.gz
  • Upload date:
  • Size: 14.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.13.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/40.8.0 requests-toolbelt/0.9.1 tqdm/4.32.1 CPython/3.7.3

File hashes

Hashes for soh-0.1.0.tar.gz
Algorithm Hash digest
SHA256 0ace552a61c42a6db5a451112d338fdb829ff56332bb3191d136ca062298a47d
MD5 5fadc6852748dea52d9d96938e7f8900
BLAKE2b-256 f6edaad7e541e64bff5fdb2a31b3cf6cee1a214ce7cbd9b5152c5d74874f284e

See more details on using hashes here.

File details

Details for the file soh-0.1.0-py3-none-any.whl.

File metadata

  • Download URL: soh-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 23.0 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.13.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/40.8.0 requests-toolbelt/0.9.1 tqdm/4.32.1 CPython/3.7.3

File hashes

Hashes for soh-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 1b78029ab69d4a1ec41d8b29a932df3a1e9b13e95f539a2f957a474b12c313bb
MD5 c7e6a0df88386242c98e01f7ff6b5b2f
BLAKE2b-256 7ec4d2d92410b57f56d9a56c58d68df00a068c36dbc45c1314904b6989fa7f6c

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page