Skip to main content

CLI for terminal case opening experiments

Project description

cmd_case_open

A CLI project that simulates Counter-Strike–style case openings directly in your terminal.

Open cases, reveal randomized items with rarity tiers, and track your inventory all from your shell.

Demo

Demo GIF


Features

  • Counter-Strike–inspired case opening system
  • Rarity-based item generation
  • Persistent inventory + stats tracking
  • Shell-integrated commands (run after any terminal command)
  • Supports Zsh and PowerShell

Installation

You can install cmd_case_open in two ways:


Option 1: Install via pip (Recommended)

pip install <project-link>

Then initialize the CLI:

cmd-case-open

During setup:

  • Your shell configuration (.zshrc or PowerShell profile) will be automatically updated
  • You will be prompted to restart your terminal

After restarting, the CLI is fully active.


Option 2: Install from source (Git clone)

Clone the repository:

git clone https://github.com/ShravanPH/CSCLI.git
cd CSCLI

Install locally in editable mode:

pip install -e .

Run setup:

cmd-case-open

Restart your terminal when prompted.

How It Works

After installation and terminal restart:

Every time you run a command in your terminal, you’ll be given the option to:

case-reveal        # Open a case
case-reveal-stats  # View your inventory + stats

This behavior is powered by shell hooks that are automatically added to:

  • ~/.zshrc (Zsh)
  • PowerShell profile (Windows)

Shell Integration

The CLI modifies your shell configuration to inject its behavior.

  • The startup + execution logic lives inside your shell config files
  • This controls when cmd-case-open is triggered

Customization

If you want to tweak behavior (frequency, triggers, etc.), you can edit:

  • ~/.zshrc
  • PowerShell profile

Project Structure

CSCLI/

Contains the core logic for:

  • Case randomization
  • Item rarity system
  • Rendering output
  • Case data definitions

Data Storage

Inventory data is stored locally as JSON Lines:

Primary location:

~/.local/state/cmd_case_open/inventory.jsonl

Fallback:

/tmp/cmd_case_open_state/inventory.jsonl

Each entry includes:

  • Timestamp
  • Item name
  • Rarity
  • Rarity key
  • Colorized rarity snapshot

Commands

Setup

cmd-case-open

Runtime Commands

case-reveal
case-reveal-stats

Supported Shells

  • Zsh
  • PowerShell

Notes

  • First run modifies your shell config automatically
  • A terminal restart is required after installation
  • Behavior is shell-driven — not a continuously running process

Future Improvements (Ideas)

  • More cases and skins
  • Inventory UI improvements
  • Drop rate customization

License

  • MIT License

Contributing

Contributions, issues, and ideas are welcome!

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

cmd_case_open-0.1.0.tar.gz (28.0 kB view details)

Uploaded Source

Built Distribution

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

cmd_case_open-0.1.0-py3-none-any.whl (30.3 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: cmd_case_open-0.1.0.tar.gz
  • Upload date:
  • Size: 28.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.13.7

File hashes

Hashes for cmd_case_open-0.1.0.tar.gz
Algorithm Hash digest
SHA256 9e1a4da07fbc3f8f7bc306485e3bba513f86e7264f901f0d912fd53ed96be7e1
MD5 29caa9651e0d5a8b950e548d8acce861
BLAKE2b-256 815c2041f7460e7887856ce112bba9bab63fd99e8743d05481ac06efac26581c

See more details on using hashes here.

File details

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

File metadata

  • Download URL: cmd_case_open-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 30.3 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.13.7

File hashes

Hashes for cmd_case_open-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 64e5b0dafeb8459559ae4ab119b38f237519cfabcc6b1c627c12054cce111886
MD5 7e700073cdf1bae8f911e8f3bfa5b925
BLAKE2b-256 2a137fd2d1fb7d135366717d8519bce9b633ac478d8211484eb22486147364fe

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