Skip to main content

Shell utilities for tmux, git, and command management

Project description

sh

Shell utilities for tmux, git, and command management.

Install

cargo add dkdc-sh
uv add dkdc-sh

Usage

Rust

use dkdc_sh::{which, require, run, tmux, git};

// Command checking
if which("tmux").is_some() { /* ... */ }
require("git")?;

// Run arbitrary commands
let output = run("echo", &["hello"])?;

// Tmux session management
tmux::new_session("my-service", "python server.py")?;
tmux::send_keys("my-service", "reload")?;
let logs = tmux::capture_pane("my-service", Some(50))?;
tmux::kill_session("my-service")?;

// Git operations
git::clone_shallow("https://github.com/org/repo.git", &dest, "main")?;
git::checkout_new_branch(&repo_dir, "feature/branch")?;
git::config_set(&repo_dir, "user.email", "bot@example.com")?;

Python

import dkdc_sh

# Command checking
path = dkdc_sh.which("tmux")
dkdc_sh.require("git")

# Run commands
output = dkdc_sh.run("echo", ["hello"])

# Tmux
dkdc_sh.tmux_new_session("my-service", "python server.py")
logs = dkdc_sh.tmux_capture_pane("my-service", lines=50)
dkdc_sh.tmux_kill_session("my-service")

# Git
dkdc_sh.git_clone_shallow("https://github.com/org/repo.git", "./dest", "main")
dkdc_sh.git_checkout_new_branch("./repo", "feature/branch")

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

dkdc_sh-0.1.0.tar.gz (8.0 kB view details)

Uploaded Source

Built Distributions

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

dkdc_sh-0.1.0-cp311-abi3-manylinux_2_39_x86_64.whl (295.1 kB view details)

Uploaded CPython 3.11+manylinux: glibc 2.39+ x86-64

dkdc_sh-0.1.0-cp311-abi3-manylinux_2_39_aarch64.whl (286.4 kB view details)

Uploaded CPython 3.11+manylinux: glibc 2.39+ ARM64

dkdc_sh-0.1.0-cp311-abi3-macosx_11_0_arm64.whl (251.3 kB view details)

Uploaded CPython 3.11+macOS 11.0+ ARM64

dkdc_sh-0.1.0-cp311-abi3-macosx_10_12_x86_64.whl (259.4 kB view details)

Uploaded CPython 3.11+macOS 10.12+ x86-64

File details

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

File metadata

  • Download URL: dkdc_sh-0.1.0.tar.gz
  • Upload date:
  • Size: 8.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for dkdc_sh-0.1.0.tar.gz
Algorithm Hash digest
SHA256 5285877c589dc9a3ffd9848b942cced670ad2d47acd8cbfd45cfff62311d885c
MD5 609b954fa4a703f45e979323b01537e4
BLAKE2b-256 a02a7014b5c27913fc4c48a541368482182b8f97544ec0a41b7d63640f223deb

See more details on using hashes here.

Provenance

The following attestation bundles were made for dkdc_sh-0.1.0.tar.gz:

Publisher: release-python.yml on dkdc-io/sh

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file dkdc_sh-0.1.0-cp311-abi3-manylinux_2_39_x86_64.whl.

File metadata

File hashes

Hashes for dkdc_sh-0.1.0-cp311-abi3-manylinux_2_39_x86_64.whl
Algorithm Hash digest
SHA256 1b360db14fb68c3454eef983325841dcc4438151631d6c19cb4e0f3a02df3929
MD5 1219c96e64f4ed42714e45287106572f
BLAKE2b-256 c8e6ecd3c3be4faf4a107c36a9c306a52d7d890c9437b70f46898b67333d950c

See more details on using hashes here.

Provenance

The following attestation bundles were made for dkdc_sh-0.1.0-cp311-abi3-manylinux_2_39_x86_64.whl:

Publisher: release-python.yml on dkdc-io/sh

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file dkdc_sh-0.1.0-cp311-abi3-manylinux_2_39_aarch64.whl.

File metadata

File hashes

Hashes for dkdc_sh-0.1.0-cp311-abi3-manylinux_2_39_aarch64.whl
Algorithm Hash digest
SHA256 818f8d9e38cdcd2f747acb1b96532bee429a9bfb563a530e6b6d7b66fc358398
MD5 7dbc59a98cab7adc58d7d22f87c42b3e
BLAKE2b-256 fdcc106cf1aaa25f718835fe1d7587cedf9d8dce209ec299a0f822137cebb63b

See more details on using hashes here.

Provenance

The following attestation bundles were made for dkdc_sh-0.1.0-cp311-abi3-manylinux_2_39_aarch64.whl:

Publisher: release-python.yml on dkdc-io/sh

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file dkdc_sh-0.1.0-cp311-abi3-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for dkdc_sh-0.1.0-cp311-abi3-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 119cb1ae5ce21198175091dcef1de3605defa11ce3c20cf537b764a006e6cdfd
MD5 b89e510e93d5db0ec553a1c990714e9f
BLAKE2b-256 b1016300a4701297a8bbfab212d671b2411edb8955b09f6c472a3963f5f5c885

See more details on using hashes here.

Provenance

The following attestation bundles were made for dkdc_sh-0.1.0-cp311-abi3-macosx_11_0_arm64.whl:

Publisher: release-python.yml on dkdc-io/sh

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file dkdc_sh-0.1.0-cp311-abi3-macosx_10_12_x86_64.whl.

File metadata

File hashes

Hashes for dkdc_sh-0.1.0-cp311-abi3-macosx_10_12_x86_64.whl
Algorithm Hash digest
SHA256 3928dbfd71ebee0e7eb8c44562f32fbe1f2b092247f3660c50b6cf3b59394108
MD5 c9a34bec9f8376890c15709996ce5907
BLAKE2b-256 2ff7968713b785acd61332ef9c232d90d66d97b6b6a317ec908dab10f71fecce

See more details on using hashes here.

Provenance

The following attestation bundles were made for dkdc_sh-0.1.0-cp311-abi3-macosx_10_12_x86_64.whl:

Publisher: release-python.yml on dkdc-io/sh

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

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