Command Reference

Overview

Slingshot’s command hierarchy is organized by domain. Every command supports the --help flag for inline documentation and --explain for dry-run diagnostics.

slingshot ├── code Code intelligence tools with MCP stdio server ├── config Configuration management ├── draft WeChat Official Account drafts ├── i18n Translation (.po) file management ├── jaeger Jaeger tracing query ├── meterial WeChat permanent materials ├── page Site page management ├── site Deployment site management └── skill Built-in AI agent skills

Global Flags

FlagDescription
--explainParse and display command arguments without executing
-q, --quietSuppress non-essential output
-v, --versionDisplay version information
-h, --helpShow help for any command

slingshot code

Code intelligence tools with MCP stdio server. Provides code search, graph analysis, AST navigation, and project management through the Model Context Protocol.

slingshot code serve

slingshot code serve starts an MCP stdio server exposing 30+ tools for:

  • Code search & navigation — BM25 full-text, semantic vector, name-pattern, grep+graph enriched
  • Code graph analysis — architecture overview (Leiden clustering, hotspots), schema exploration, path tracing
  • AST analysis — structure viewer, node inspection, definition listing, syntax validation
  • Reference analysis — find references, trace calls (inbound/outbound, data flow, cross-service)
  • Change detection & impact analysis — git-based with graph propagation
  • Project indexing & management
  • ADR & memo persistence

Environment:

VariableDefaultDescription
SLINGSHOT_PROJECT_ROOT(current dir)Project root directory
SLINGSHOT_CODE_DB~/.config/slingshot/code.dbCode graph database path

Flags:

FlagDefaultDescription
--project-root(current dir)Project root directory
--db-path~/.config/slingshot/code.dbCode graph database path
--log-levelwarnLog level: debug, info, warn, error

Examples:

# Start the code intelligence MCP server
slingshot code serve

# With custom project root and database path
slingshot code serve --project-root /path/to/project --db-path /tmp/code.db

# Enable debug logging
slingshot code serve --log-level debug

slingshot config

Manage Slingshot configuration — set WeChat credentials and other settings.

slingshot config list
slingshot config show <key>
slingshot config get <key>
slingshot config set <key> <value>
slingshot config unset <key>

Examples:

# Set WeChat credentials
slingshot config set wechat.appid wx1234567890abcdef
slingshot config set wechat.secret abcdef1234567890abcdef1234567890

# View all configuration
slingshot config list

# Get a specific value
slingshot config get wechat.appid

slingshot draft

Manage WeChat Official Account drafts — the core feature of Slingshot.

slingshot draft list
slingshot draft add <file> [--title <title>] [--thumb <media_id>]
slingshot draft update <file>
slingshot draft remove <id|file>
slingshot draft show <id|file>
slingshot draft convert <file> [--upload]

Draft Convert is the pipeline entry point:

  • Converts Markdown (.md) or Org mode (.org) files to WeChat-compatible HTML
  • --upload: replaces local image paths with WeChat CDN URLs (uploads images automatically)
  • Generates a .html file in the same directory

Draft Add / Update:

  • slingshot draft add article.md — creates a new draft, auto-converts .org/.md to HTML
  • --title overrides the article title; --thumb specifies the cover image media_id
  • slingshot draft update article.html — updates an existing draft using sidecar YAML for media_id
  • Local image paths in thumb_media_id are auto-uploaded to WeChat material

Sidecar YAML:

Companion YAML files (e.g., article.yaml alongside article.md) provide metadata:

title: Article Title
author: Author Name
thumb_media_id: cover.png    # Local path — auto-uploaded
digest: Brief summary...
content_source_url: https://example.com

Priority: sidecar YAML > front matter > HTML <meta> > defaults

Examples:

# Convert Markdown to WeChat HTML with image upload
slingshot draft convert post.md --upload

# Create a draft (auto-converts .md to HTML)
slingshot draft add post.md

# List all drafts
slingshot draft list

# Update an existing draft
slingshot draft update post.html

# Preview what convert would do (safe)
slingshot draft convert post.md --upload --explain

slingshot meterial

Manage WeChat Official Account permanent materials (images, thumbnails, etc.).

slingshot meterial list
slingshot meterial add <file>
slingshot meterial remove <media_id>
slingshot meterial show <media_id>

slingshot page

Manage site pages within a deployment site. Pages are individual HTML files stored in subdirectories under the site directory.

slingshot page list <name>
slingshot page add <name> <file>... [--rsync]
slingshot page update <name> <file>...
slingshot page remove <name> <page>

Features:

  • Auto-converts .org and .md files to HTML on add/update
  • --rsync: automatically deploy the site after adding pages
  • Accepts multiple files at once
  • Images referenced in HTML are copied to the page directory
  • Site index is regenerated after all pages are processed

Examples:

# Add pages from Markdown files
slingshot page add mysite my-post.md

# Add multiple files at once
slingshot page add mysite about.md contact.md

# Add and auto-deploy
slingshot page add mysite my-post.md --rsync

# List all pages in a site
slingshot page list mysite

# Update a page
slingshot page update mysite my-post.html

# Remove a page
slingshot page remove mysite my-post

slingshot site

Manage deployment sites — configure targets for one-command publishing. Supports two site types: page (default) and zine.

slingshot site list
slingshot site add <name> [<key> <value>...]
slingshot site update <name> <key> <value>
slingshot site remove <name>
slingshot site rsync <name>
slingshot site optimize <name>

Site configuration keys:

KeyRequiredDescriptionExample
dirYesLocal site directory~/mysite
rsyncNoRsync deploy commandrsync -avz --delete ./ user@host:/path
typeNoSite type: page (default) or zinezine
  • page sites: single directory that gets rsynced as-is
  • zine sites: auto-build with zine release before rsyncing from public/

Examples:

# Add a page-type site
slingshot site add mysite dir ~/mysite

# Add a zine site with deploy command
slingshot site add mysite dir ~/mysite \
  rsync 'rsync -avz --delete ./ user@host:/var/www/html' \
  type zine

# Update the rsync command
slingshot site update mysite rsync 'rsync -avz --delete ./ user@host:/new-path'

# Deploy (auto-builds zine sites)
slingshot site rsync mysite

# Optimize CSS for responsive display
slingshot site optimize mysite

slingshot skill

Manage built-in skills — reusable workflow definitions for AI agents.

slingshot skill list
slingshot skill install <name>

Features:

  • Skills define step-by-step workflows for common tasks
  • Installed to the project’s .dscli/skills/ directory
  • Available for AI agents to load and execute

Available skills:

SkillDescription
weixinWeChat Official Account publishing workflow
site-pageStatic site deployment (simple page management)
site-zineZine SSG site management with i18n, templates, versioning
incusIncus container lifecycle management for testing

Examples:

# List available skills
slingshot skill list

# Install the weixin skill
slingshot skill install weixin


---

## slingshot i18n

Manage translation (.po) files for the slingshot i18n system — extract, translate, and validate
localized strings across locales.

```bash
slingshot i18n check [<locale>...] [--exit-code]
slingshot i18n stats
slingshot i18n sync [--delete]
slingshot i18n show <locale> <id>
slingshot i18n translate <locale> --msgid "<msgid>" --msgstr "<msgstr>"
slingshot i18n add <locale>
slingshot i18n init

Workflow:

  1. slingshot i18n sync — scans Go source code for i18n.G() calls and synchronizes the en_US .po file. New strings are propagated to all other locales with empty translations.

  2. slingshot i18n check <locale> — identifies missing, untranslated, and orphaned entries for a locale. Use --exit-code for CI pipelines.

  3. slingshot i18n show <locale> <id> — inspect a specific untranslated entry by its ID (the number shown by check).

  4. slingshot i18n translate <locale> --msgid "<msgid>" --msgstr "<translation>" — set the translation for a single entry, with proper .po escaping.

  5. slingshot i18n stats — view translation coverage across all locales.

Examples:

# Step 1: Sync .po files with source code
slingshot i18n sync

# Step 2: Check zh_CN for untranslated entries
slingshot i18n check zh_CN

# Step 3: Translate a specific entry
slingshot i18n translate zh_CN \
  --msgid "Hello World" \
  --msgstr "你好,世界"

# Step 4: View translation statistics
slingshot i18n stats

# Initialize a new locale
slingshot i18n add ja

# Sync with database (regenerate from source)
slingshot i18n sync --delete

slingshot jaeger

Query Jaeger tracing data directly via the Jaeger Query HTTP API — no MCP Server needed. Alternative to the unreliable Jaeger MCP Server: no truncation, no timeouts, no extra daemon.

slingshot jaeger services
slingshot jaeger operations <service>
slingshot jaeger search <service> [--limit <n>] [--lookback <duration>]
slingshot jaeger trace <traceID>
slingshot jaeger trace topology <traceID>
slingshot jaeger trace critical-path <traceID>
slingshot jaeger deps

Environment:

VariableDefaultDescription
JAEGER_HOSThttp://localhost:16686Jaeger Query URL

Commands:

CommandDescription
servicesList all registered services
operations <service>List operations (endpoints) for a service
search <service>Search traces for a service
trace <traceID>Get full trace details by ID
trace topology <traceID>Show service dependency topology for a trace
trace critical-path <traceID>Show the critical path (slowest chain) in a trace
depsGet the service dependency graph

Examples:

# List services
slingshot jaeger services

# Search for recent traces of a service
slingshot jaeger search myservice --limit 10

# Get full trace details
slingshot jaeger trace abc123def456

# Visualise the critical path
slingshot jaeger trace critical-path abc123def456