Skip to main content

A CLI built with typer and uv

Project description

shortcake

A CLI application built with typer and uv, supporting only Python 3.14.

Requirements

  • Python 3.14+
  • uv package manager

Installation

Install dependencies using uv:

uv sync

Usage

Run the CLI using uv:

# Show help
uv run shortcake --help

# Say hello with default greeting
uv run shortcake hello

# Say hello with custom name
uv run shortcake hello --name "Patrick"

# Show version
uv run shortcake version

Commands

hello

Say hello to someone.

Options:

  • --name TEXT: Name to greet (default: "World")

version

Show the current version of shortcake.

create

Create a stack with a new branch and commit.

This command helps you create stacked PRs by:

  1. Creating a temporary branch
  2. Opening your configured editor ($EDITOR) to compose the commit message (emojis are fully supported! 🎉)
  3. Creating the commit
  4. Generating a branch name from the commit message (lowercase, hyphenated, alphanumeric only)
  5. Renaming the temporary branch to the final branch name

Important: Stage your changes with git add before running this command. Only staged changes will be committed.

Emoji Support:

  • Commit messages fully support emojis
  • Emoji handling in branch names is controlled by the keep_emoji configuration setting
  • Use shortcake config set keep_emoji true to preserve emojis in branch names
  • Use shortcake config set keep_emoji false to remove emojis from branch names (default)

Note: Future enhancement will include gitmoji integration for conventional emoji commits.

Example:

# Stage your changes first
git add .

# Basic usage (emojis removed from branch name by default)
uv run shortcake create
# Opens your editor to compose commit message
# Type: 🚀 Add rocket feature
# Save and close
# Creates commit: 🚀 Add rocket feature
# Creates branch: add-rocket-feature

# Configure to keep emojis in branch names
uv run shortcake config set keep_emoji true

# Stage changes and create
git add .
uv run shortcake create
# Opens your editor to compose commit message
# Type: 🔥 Add fire feature
# Save and close
# Creates commit: 🔥 Add fire feature
# Creates branch: 🔥-add-fire-feature

edit / modify

Edit the current stack by amending the commit.

This command helps you modify the current stack by amending the previous commit without opening an editor.

Important: Stage your changes with git add before running this command. Only staged changes will be amended.

Example:

# Make some changes to your files
echo "more content" >> file.txt

# Stage your changes first
git add .

# Amend the previous commit
uv run shortcake edit
# Successfully amended the commit (reuses previous commit message)

# Or use the modify alias
uv run shortcake modify

config

Manage shortcake configuration settings.

Configuration is stored in ~/.shortcake/config.json in your home directory.

Available settings:

  • keep_emoji: Whether to keep emojis in branch names (true/false, default: false)

Actions:

  • list - List all configuration settings
  • get <key> - Get a specific configuration value
  • set <key> <value> - Set a configuration value

Example:

# List all configuration
uv run shortcake config list

# Get a specific setting
uv run shortcake config get keep_emoji

# Set keep_emoji to true
uv run shortcake config set keep_emoji true

# Set keep_emoji to false
uv run shortcake config set keep_emoji false

Development

This project uses uv for dependency management and requires Python 3.14 or higher.

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

shortcake-0.1.0.tar.gz (29.1 kB view details)

Uploaded Source

Built Distribution

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

shortcake-0.1.0-py3-none-any.whl (7.3 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: shortcake-0.1.0.tar.gz
  • Upload date:
  • Size: 29.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.9.8

File hashes

Hashes for shortcake-0.1.0.tar.gz
Algorithm Hash digest
SHA256 d546932a652c9b12e02a1194f00fee7c5cbe8a7fe018c6aa7ae34ea030d55a2c
MD5 d405700652f8902f25d144e00c8a2baf
BLAKE2b-256 21659872db8c5cd067276faba7825b890352db0c6450b6386b97c1bf046026c0

See more details on using hashes here.

File details

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

File metadata

  • Download URL: shortcake-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 7.3 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.9.8

File hashes

Hashes for shortcake-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 e2eabc2f139e32b283ba0fa97460dce52d98b21eee499b156ced6b83eb63b9bd
MD5 573a419058cd72a14f01e1bc0a710b6c
BLAKE2b-256 952853cec8c621f42d9e8f8d5b96774dc27c8da40425b30656e0ba1f3b20e159

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