A Rust template for Among Terminal plugins.
The hello-status executable answers status requests with a greeting. It uses
managed plugin API 1.2, implemented in Among 0.2.0.
This repository contains the plugin author guide and API reference. For terminal usage and plugin installation, use the Among website. For work on Among itself, see Contributing.
-
Choose "Use this template" on GitHub and clone your new repository.
-
Start with
hello-status. When renaming it, update these locations:- Rename
plugins/hello-status/and update the manifest'sid,name,descriptionandentrypoint. - Update both
[package].nameand[[bin]].nameinCargo.toml. Refresh the corresponding package entry inCargo.lockbefore running the--lockedchecks. - In
src/main.rs, update the manifest test'sinclude_str!("../plugins/hello-status/among-plugin.json")path andassert_eq!(manifest["entrypoint"], "bin/hello-status")expectation. The binary filename must match the last component ofentrypoint. - In the same file, update the manifest path in the module comment. Keep
both
github:1/hello-statushandshake fixture identities consistent if you rename them; the test checks that the reply echoes the supplied identity. - Update the executable name and build-output path in this README, and
the manifest link's text and target in
docs/guide.md. - Adapt the package tree, build and manifest paths, archive filename and
membersexample indocs/releasing.md. Itshello-status/v1.2.3example illustrates an unsupported tag format; keep release tags in the documentedv*form.
The local files in
.github/workflows/contain no hardcodedhello-statusreferences to rename. After renaming, run the template checks. - Rename
-
Build from the repository root:
cargo build --release --lockedThe default build produces target/release/hello-status. Edit fragments in
src/main.rs to change the greeting. The
author guide explains how to add capabilities and handle scopes.
Prepare a package containing the build output and manifest, with an adjacent
schema-2 among-plugins.json. Follow local package preparation
for the layout and metadata. Copying the raw executable into a plugin directory
does not register it with Among.
Quit Among, then start:
among --plugin-developmentUse the local catalogue flow in development mode
to test the package. The template accepts the local identity supplied by Among.
After enabling it with its requested access, expect hello in the application
status areas. It does not request terminal context.
The cargo +1.98.1 commands require rustup's Cargo proxy. Install rustup if it
is missing, then install the toolchain with the formatter and linter:
rustup toolchain install 1.98.1 --profile minimal --component rustfmt --component clippyRun the template checks:
cargo +1.98.1 fmt --all --check
cargo +1.98.1 clippy --locked --all-targets -- -D warnings
cargo +1.98.1 test --locked --all-targetsThe Check workflow calls the pinned reusable
workflow with publish: false. The Release workflow
calls it on stable v* tags. Review packaging and releases
before publishing, including version selection and immutable-release settings.
| Page | Contents |
|---|---|
| Author guide | Process model, access, settings, confinement, development mode and testing. |
| API reference | Messages, manifest fields, grants, scopes, limits and JSON exchanges. |
| Packaging and releases | Package layout, catalogue, verification, versions and publishing. |
This template uses Apache-2.0. Choose the licence for your plugin and include the required licensing and attribution material in its package.