A Linux-first Claude Code Status Line Powered by Python

Cover image generated by Nano Banana 2 What This Package Provides I’ve released a Python package on GitHub (ceshine/claude-statusline-for-linux) that provides a two-line status line layout for the Claude Code CLI. The package is highly extensible and customizable, so feel free to fork the repository and adapt it to your own preferences! The package currently provides the following information: Line 1: Session Overview Model name: the active Claude model (e.g., “Sonnet 4.6”) Context window usage: a 16-segment visual bar plus a percentage, color-coded green/yellow/red as usage grows; switches to a prominent warning at ≥90% Session cost: cumulative USD cost for the current Claude Code session Per-call token breakdown: token counts from the latest API call, broken down into four categories: Input tokens (i) Output tokens (o) Cache creation tokens (cw) Cache read tokens (cr) Line 2: Workspace & Limits Working directory: the base name of the current project directory Git status: branch name plus counts of staged (+), unstaged (~), and untracked (?) files; hidden when not in a Git repository 5-hour rate limit usage: percentage of the 5-hour API quota consumed, with a countdown to reset 7-day rate limit usage: percentage of the 7-day API quota consumed, with a countdown to reset Vim mode: current Vim keybinding mode (NORMAL, INSERT, etc.); hidden when vim mode is inactive (Note: According to Claude Code’s documentation, the rate limit information is only available after the first API call.) ...

March 27, 2026 · Ceshine Lee

Ansible-managed systemd Timers

Cover image generated by Nano Banana 2 TL;DR In this post, I introduce a simple Ansible playbook that manages scheduled tasks with systemd timers and provides an AI-friendly interface for running recurring jobs. It offers much greater flexibility than cron. As a bonus, I also present a Python-based orchestrator for Rclone sync jobs, which is useful for setting up automatic cloud backups and works well with the Ansible playbook. ...

March 2, 2026 · Ceshine Lee

Use MPIRE to Parallelize PostgreSQL Queries

Photo Credit Introduction Parallel programming is hard, and you probably should not use any low-level API to do it in most cases (I’d argue that Python’s built-in multiprocessing package is low-level). I’ve been using Joblib’s Parallel class for tasks that are embarrassingly parallel and it works wonderfully. However, sometimes the task at hand is not simple enough for the Parallel class (e.g., you need to share something from the main process that is not pickle-able, or you want to maintain states in each child process). I’ve recently found this library — MPIRE (MultiProcessing Is Really Easy) — that significantly mitigates this problem of not having enough flexibility, while still having a high-level and user-friendly API. ...

January 7, 2022 · Ceshine Lee

UMAP on RAPIDS (15x Speedup)

A_Different_Perspective from Pixabay RAPIDS RAPIDS is a collection of Python libraries from NVIDIA that enables the users to do their data science pipelines entirely on GPUs. The two main components are cuDF and cuML. The cuDF library provides Pandas-like data frames, and cuML mimics scikit-learn. There’s also a cuGRAPH graph analytics library that have been introduced in the latest release (0.6 on March 28). The RAPIDS suite of open source software libraries gives you the freedom to execute end-to-end data science and analytics pipelines entirely on GPUs. RAPIDS is incubated by NVIDIA® based on years of accelerated data science experience. RAPIDS relies on NVIDIA CUDA® primitives for low-level compute optimization, and exposes GPU parallelism and high-bandwidth memory speed through user-friendly Python interfaces. ...

March 30, 2019 · Ceshine Lee