Help us improve
Share bugs, ideas, or general feedback.
From midnight-tooling
Install, update, or configure the Compact CLI tool. Supports global installation and per-project configuration with automatic environment setup.
npx claudepluginhub devrelaicom/midnight-expert --plugin midnight-toolingHow this command is triggered — by the user, by Claude, or both
Slash command
/midnight-tooling:install-cli [install for this project | update | --directory <path>]This command is limited to the following tools:
The summary Claude sees in its command listing — used to decide when to auto-load this command
Install or update the Compact CLI tool, with intelligent handling of global vs. project-local installations. ## Terminology Reminder - **Compact CLI** (`compact`): The management tool installed globally - **Compact compiler**: The compiler managed by the CLI, stored in the artifact directory - These are separate. Installing the CLI is separate from downloading a compiler version. ## Step 1: Parse Intent from Arguments Analyze `$ARGUMENTS` to determine what the user wants: **Project-local installation** if arguments contain phrases like: - "for this project", "project only", "local", "p...
/verifyVerify claims about Midnight, Compact code, or SDK APIs. Accepts a claim, file path, code snippet, SDK question, or no arguments to be prompted.
/ai-coding-configInteractively sets up or updates AI coding configurations for Claude Code, Cursor, Aider, and Continue. Detects tools, manages repo, guides plugin installation. Supports update argument.
/compactLoads and executes the Hypo-Workflow compact skill from a SKILL.md file, applying /hw:compact semantics with user-provided arguments.
/setup-toolsDetects installed and missing CLI tools for Forge via version checks, displays status table with purposes, versions, and install commands.
/cc-setupAnalyzes current repo, detects tech stack and infra, deploys full 4-layer Claude Code setup (CLAUDE.md routing, Skills, Hooks, Agents), MCP servers, LSP hints, memory, and cost optimization. Supports --auto, --dry-run, --audit flags.
Share bugs, ideas, or general feedback.
Install or update the Compact CLI tool, with intelligent handling of global vs. project-local installations.
compact): The management tool installed globallyAnalyze $ARGUMENTS to determine what the user wants:
Project-local installation if arguments contain phrases like:
--directory pathGlobal installation/update if:
which compact 2>&1
compact --version 2>&1
compact compile --version 2>&1
Determine whether the CLI is already installed and what versions are present.
If compact is not found on PATH:
curl --proto '=https' --tlsv1.2 -LsSf https://github.com/midnightntwrk/compact/releases/latest/download/compact-installer.sh | sh
grep "compact" ~/.zshrc 2>/dev/null || grep "compact" ~/.bashrc 2>/dev/null
echo 'export PATH="$HOME/.compact/bin:$PATH"' >> ~/.zshrc
Adjust for the user's shell (check $SHELL to determine zsh vs bash).
Remind the user to reload their shell or open a new terminal.
Download the latest compiler:
compact update
compact --version
compact compile --version
If compact is already on PATH:
Report current versions:
compact --versioncompact compile --versionCheck for updates:
compact self check 2>&1
compact check 2>&1
Report findings:
compact self updatecompact updateIf updates are applied, verify the new versions.
When the user wants a project-specific toolchain:
Determine the target directory:
./.compact (relative to project root)--directory path from argumentsInstall the compiler into the project directory:
compact --directory ./.compact update
If the CLI is not installed globally, install it first (Step 3A), then proceed with the project-local setup.
# Check for direnv
which direnv 2>/dev/null
ls .envrc 2>/dev/null
# Check for mise
which mise 2>/dev/null
ls .mise.toml 2>/dev/null
# Check for dotenv
ls .env 2>/dev/null
ls package.json 2>/dev/null
# Check for Claude settings
ls .claude/settings.json 2>/dev/null
ls .claude/settings.local.json 2>/dev/null
For each tool found, offer to add COMPACT_DIRECTORY configuration:
direnv (if direnv is on PATH or .envrc exists):
Check if .envrc already contains COMPACT_DIRECTORY. If not, append:
export COMPACT_DIRECTORY="${PWD}/.compact"
Then run direnv allow.
mise (if mise is on PATH or .mise.toml exists):
Check if .mise.toml already contains COMPACT_DIRECTORY. If not, add:
[env]
COMPACT_DIRECTORY = "{{config_root}}/.compact"
Claude Code settings (always offer):
Check if .claude/settings.json exists and already has COMPACT_DIRECTORY in the env field. If not, create or update the file:
{
"env": {
"COMPACT_DIRECTORY": "./.compact"
}
}
Use AskUserQuestion if the file already exists and has other settings, to confirm merging. If .claude/settings.json does not exist, create the .claude/ directory and write the file.
Check if .gitignore exists and contains .compact/. If not, offer to add it:
.compact/
Compiler binaries and proving keys should not be committed to version control.
compact --directory ./.compact list --installed
compact --directory ./.compact compile --version
Summarize all changes made:
./.compact/.gitignore updatedcompact compile normally (env var handles the directory)Present a summary of what was done: