specter

command module
v1.0.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jun 19, 2026 License: MIT Imports: 28 Imported by: 0

README

specter

Ask DeepWiki CI Go Report Card Go Version Latest Release VS Code Marketplace VS Code Installs Downloads

English

specter は軽量なモック API サーバーです。エンドポイントを YAML で定義して、すぐに起動できます。

  • Hot reload: config.yml を編集すると変更がすぐ反映されます
  • Response templates、faker、stateful mocking、rate limiting に対応
  • 単一バイナリで動作し、追加のランタイム依存はありません

インストール

Docker

docker run -v $(pwd)/config.yml:/config.yml ghcr.io/saku0512/specter -c /config.yml

Homebrew (macOS / Linux)

brew tap Saku0512/specter https://github.com/Saku0512/specter
brew install specter

curl (macOS / Linux)

curl -fsSL https://raw.githubusercontent.com/Saku0512/specter/main/install.sh | bash

PowerShell (Windows)

irm https://raw.githubusercontent.com/Saku0512/specter/main/install.ps1 | iex

Quick start

specter init          # config.yml を生成
specter init --template crud  # CRUD スターターを生成
specter examples      # サンプル設定を一覧表示
specter doctor -c config.yml  # 設定・参照ファイル・ポートを診断
specter -c config.yml # サーバーを起動
routes:
  - path: /users
    method: GET
    response:
      - id: 1
        name: Alice

この設定で GET /users にアクセスすると、YAML に書いたレスポンスが返ります。

ドキュメント

動作する設定例は config.example.yml を見てください。

ライセンス

MIT

Documentation

The Go Gopher

There is no documentation for this package.

Directories

Path Synopsis
cmd
export
Package export provides the `specter export` subcommand, which reads the request history of a running specter instance and generates a starter config.yml from the observed (method, path) pairs.
Package export provides the `specter export` subcommand, which reads the request history of a running specter instance and generates a starter config.yml from the observed (method, path) pairs.
gen

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL