Loading...
Loading...
Compare original and translation side by side
Skill by ara.so — Devtools Skills collection.
--compact由 ara.so 开发的Skill — 属于Devtools Skills集合。
--compactstalehealthbottleneck<api>-pp-cli<api>-pp-mcp--compact--dry-runstalehealthbottleneck<api>-pp-cli<api>-pp-mcp--compact--dry-rungo install github.com/mvanhorn/cli-printing-press/v4/cmd/printing-press@latestprinting-press --versiongo install github.com/mvanhorn/cli-printing-press/v4/cmd/printing-press@latestprinting-press --versiongit pullgit clone https://github.com/mvanhorn/cli-printing-press.git
cd cli-printing-pressgit pullgit clone https://github.com/mvanhorn/cli-printing-press.git
cd cli-printing-pressundefinedundefinedundefinedundefined/printing-press <api-name>
/printing-press <url>
/printing-press <api-name> codexundefined/printing-press <api-name>
/printing-press <url>
/printing-press <api-name> codexundefinedundefinedundefined/printing-press-polish <api-name>/printing-press-polish linear/printing-press-polish <api-name>/printing-press-polish linear/printing-press-publish <api-name>/printing-press-publish superhuman/printing-press-publish <api-name>/printing-press-publish superhuman/printing-press-amend
/printing-press-amend <api-name>/printing-press-amend
/printing-press-amend <api-name>printing-pressundefinedprinting-pressundefinedundefinedundefined~/printing-press/
├── .runstate/<scope>/runs/<run-id>/working/<api>-pp-cli/ # Active runs
├── library/<api>/ # Published CLIs
└── manuscripts/<api>/<run-id>/ # Archived runs
├── research/
├── proofs/
├── discovery/
└── pipeline/<scope>~/printing-press/
├── .runstate/<scope>/runs/<run-id>/working/<api>-pp-cli/ # 活跃运行任务
├── library/<api>/ # 已发布的CLI
└── manuscripts/<api>/<run-id>/ # 归档运行任务
├── research/
├── proofs/
├── discovery/
└── pipeline/<scope>printing-press generate stripe --output /custom/path/stripe-cliprinting-press generate stripe --output /custom/path/stripe-cliundefinedundefinedundefinedundefinedundefinedundefinedundefinedundefinedundefinedundefinedundefinedundefinedundefinedundefinedundefinedundefinedundefinedundefinedundefinedundefinedundefinedundefinedundefinedundefinedpackage main
import (
"context"
"fmt"
"os"
"os/exec"
"encoding/json"
)
// Call generated Linear CLI
func getBlockedIssues() ([]Issue, error) {
cmd := exec.Command("linear-pp-cli", "stale",
"--threshold", "7d",
"--output", "json")
output, err := cmd.Output()
if err != nil {
return nil, fmt.Errorf("CLI error: %w", err)
}
var issues []Issue
if err := json.Unmarshal(output, &issues); err != nil {
return nil, err
}
return issues, nil
}
// Use MCP server programmatically
func callMCPServer(ctx context.Context, method string, params map[string]interface{}) error {
// MCP servers expose stdio interface
cmd := exec.CommandContext(ctx, "linear-pp-mcp")
stdin, _ := cmd.StdinPipe()
stdout, _ := cmd.StdoutPipe()
if err := cmd.Start(); err != nil {
return err
}
req := map[string]interface{}{
"jsonrpc": "2.0",
"method": method,
"params": params,
"id": 1,
}
json.NewEncoder(stdin).Encode(req)
var resp map[string]interface{}
json.NewDecoder(stdout).Decode(&resp)
return cmd.Wait()
}package main
import (
"context"
"fmt"
"os"
"os/exec"
"encoding/json"
)
// 调用生成的Linear CLI
func getBlockedIssues() ([]Issue, error) {
cmd := exec.Command("linear-pp-cli", "stale",
"--threshold", "7d",
"--output", "json")
output, err := cmd.Output()
if err != nil {
return nil, fmt.Errorf("CLI error: %w", err)
}
var issues []Issue
if err := json.Unmarshal(output, &issues); err != nil {
return nil, err
}
return issues, nil
}
// 以编程方式调用MCP服务器
func callMCPServer(ctx context.Context, method string, params map[string]interface{}) error {
// MCP服务器暴露标准IO接口
cmd := exec.CommandContext(ctx, "linear-pp-mcp")
stdin, _ := cmd.StdinPipe()
stdout, _ := cmd.StdoutPipe()
if err := cmd.Start(); err != nil {
return err
}
req := map[string]interface{}{
"jsonrpc": "2.0",
"method": method,
"params": params,
"id": 1,
}
json.NewEncoder(stdin).Encode(req)
var resp map[string]interface{}
json.NewDecoder(stdout).Decode(&resp)
return cmd.Wait()
}#!/bin/bash#!/bin/bashundefinedundefined// Add to cmd/custom/reconcile.go in generated CLI
package custom
import (
"github.com/spf13/cobra"
"github.com/mvanhorn/linear-pp-cli/internal/store"
)
func NewReconcileCmd(st *store.Store) *cobra.Command {
cmd := &cobra.Command{
Use: "reconcile",
Short: "Find issues in API but missing from local store",
RunE: func(cmd *cobra.Command, args []string) error {
// Query local store
localIDs := st.GetAllIssueIDs()
// Query live API
liveIDs := fetchLiveIssueIDs()
// Diff
missing := difference(liveIDs, localIDs)
for _, id := range missing {
fmt.Printf("Missing: %s\n", id)
}
return nil
},
}
return cmd
}// 添加到生成的CLI中的cmd/custom/reconcile.go
package custom
import (
"github.com/spf13/cobra"
"github.com/mvanhorn/linear-pp-cli/internal/store"
)
func NewReconcileCmd(st *store.Store) *cobra.Command {
cmd := &cobra.Command{
Use: "reconcile",
Short: "查找API中存在但本地存储缺失的问题",
RunE: func(cmd *cobra.Command, args []string) error {
// 查询本地存储
localIDs := st.GetAllIssueIDs()
// 查询实时API
liveIDs := fetchLiveIssueIDs()
// 对比差异
missing := difference(liveIDs, localIDs)
for _, id := range missing {
fmt.Printf("缺失: %s\n", id)
}
return nil
},
}
return cmd
}undefinedundefined
**Problem:** Codex mode fails repeatedly
The press auto-falls back to local generation after 3 Codex failures. Check logs:
```bash
tail -f ~/.printing-press/.runstate/<scope>/runs/<run-id>/logs/generation.log
**问题:** Codex模式反复失败
CLI生成器在3次Codex失败后会自动回退到本地生成。查看日志:
```bash
tail -f ~/.printing-press/.runstate/<scope>/runs/<run-id>/logs/generation.logundefinedundefined
**Problem:** Auth tests fail
```bash
**问题:** 认证测试失败
```bashundefinedundefinedundefinedundefined
**Problem:** Search returns no results
```bash
**问题:** 搜索无结果返回
```bash
**Problem:** Compound command errors
```bash
**问题:** 复合命令报错
```bashundefinedundefinedundefinedundefined
**Problem:** IDE can't find MCP server
Add to Claude Code config (`~/.config/claude-code/mcp-servers.json`):
```json
{
"linear": {
"command": "/path/to/linear-pp-mcp",
"env": {
"LINEAR_API_KEY": "${LINEAR_API_KEY}"
}
}
}
**问题:** IDE无法找到MCP服务器
添加到Claude Code配置文件(`~/.config/claude-code/mcp-servers.json`):
```json
{
"linear": {
"command": "/path/to/linear-pp-mcp",
"env": {
"LINEAR_API_KEY": "${LINEAR_API_KEY}"
}
}
}undefinedundefined
**Problem:** Search queries are slow
```bash
**问题:** 搜索查询缓慢
```bashundefinedundefined--compact--compact