amagi 0.1.4

Rust SDK, CLI, and Web API service skeleton for multi-platform social web adapters.
Documentation

amagi

Chinese README: README.zh-CN.md

amagi is a Rust SDK, CLI, and JSON Web API service for multi-platform social web adapters.

What It Does

  • Run CLI tasks against Bilibili, Douyin, Kuaishou, Twitter/X, and Xiaohongshu
  • Start a local JSON Web API with amagi serve
  • Reuse the same capability as a Rust crate with feature flags

Quick Start

Install the latest release:

Linux/macOS:

curl -fsSL https://raw.githubusercontent.com/bandange/amagi-rs/main/scripts/install.sh | bash

PowerShell:

irm https://raw.githubusercontent.com/bandange/amagi-rs/main/scripts/install.ps1 | iex

Use proxy mode:

Linux/macOS:

curl -fsSL https://gh-proxy.com/https://raw.githubusercontent.com/bandange/amagi-rs/main/scripts/install.sh | bash -s -- --proxy

PowerShell:

& ([scriptblock]::Create((irm "https://gh-proxy.com/https://raw.githubusercontent.com/bandange/amagi-rs/main/scripts/install.ps1"))) -Proxy

Verify:

amagi --version

Common examples:

amagi run douyin video-work <aweme_id>
amagi run bilibili emoji-list
amagi run twitter user-profile <screen_name>
amagi serve --host 127.0.0.1 --port 4567

For install, update, uninstall, and shell integration details, see the installation guide.

Run From Source

If you do not want to install the binary, run it directly in the repository. This requires a local Rust toolchain.

cargo run -- run
cargo run -- run douyin video-work <aweme_id>
cargo run -- serve --host 127.0.0.1 --port 4567

Configuration

Configuration is loaded in this order:

  1. the user-level dotenv file
  2. the current directory .env

User-level dotenv path:

  • Linux/macOS: ~/.config/amagi/.env
  • Windows: %APPDATA%\\amagi\\.env

Useful files and variables:

  • .env.example
  • AMAGI_USER_ENV_FILE
  • AMAGI_DOUYIN_COOKIE
  • AMAGI_BILIBILI_COOKIE
  • AMAGI_KUAISHOU_COOKIE
  • AMAGI_TWITTER_COOKIE
  • AMAGI_XIAOHONGSHU_COOKIE
  • AMAGI_HOST
  • AMAGI_PORT

For the full environment and CLI option list, see the CLI reference.

Crate Features

Default features: client, cli, server

Optional features:

  • catalog: static catalog and route metadata only
  • client: Rust client types and upstream fetchers
  • cli: command-line runtime
  • server: Axum-based HTTP service

Example:

amagi = { version = "0.1.4", default-features = false, features = ["client"] }

Documentation

Chinese documentation: