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
| Flag | Description |
|---|---|
--explain | Parse and display command arguments without executing |
-q, --quiet | Suppress non-essential output |
-v, --version | Display version information |
-h, --help | Show 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:
| Variable | Default | Description |
|---|---|---|
SLINGSHOT_PROJECT_ROOT | (current dir) | Project root directory |
SLINGSHOT_CODE_DB | ~/.config/slingshot/code.db | Code graph database path |
Flags:
| Flag | Default | Description |
|---|---|---|
--project-root | (current dir) | Project root directory |
--db-path | ~/.config/slingshot/code.db | Code graph database path |
--log-level | warn | Log 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
.htmlfile in the same directory
Draft Add / Update:
slingshot draft add article.md— creates a new draft, auto-converts.org/.mdto HTML--titleoverrides the article title;--thumbspecifies the cover image media_idslingshot draft update article.html— updates an existing draft using sidecar YAML formedia_id- Local image paths in
thumb_media_idare 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
.organd.mdfiles 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:
| Key | Required | Description | Example |
|---|---|---|---|
dir | Yes | Local site directory | ~/mysite |
rsync | No | Rsync deploy command | rsync -avz --delete ./ user@host:/path |
type | No | Site type: page (default) or zine | zine |
- page sites: single directory that gets rsynced as-is
- zine sites: auto-build with
zine releasebefore rsyncing frompublic/
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:
| Skill | Description |
|---|---|
weixin | WeChat Official Account publishing workflow |
site-page | Static site deployment (simple page management) |
site-zine | Zine SSG site management with i18n, templates, versioning |
incus | Incus 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:
slingshot i18n sync— scans Go source code fori18n.G()calls and synchronizes the en_US .po file. New strings are propagated to all other locales with empty translations.slingshot i18n check <locale>— identifies missing, untranslated, and orphaned entries for a locale. Use--exit-codefor CI pipelines.slingshot i18n show <locale> <id>— inspect a specific untranslated entry by its ID (the number shown bycheck).slingshot i18n translate <locale> --msgid "<msgid>" --msgstr "<translation>"— set the translation for a single entry, with proper .po escaping.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:
| Variable | Default | Description |
|---|---|---|
JAEGER_HOST | http://localhost:16686 | Jaeger Query URL |
Commands:
| Command | Description |
|---|---|
services | List 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 |
deps | Get 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