STONE(1)
π STONE(1) π
okay bestie, sit down, grab a boba, because we're reading the stone(1) page from the General Commands Manual and it's genuinely so much. she's an interface description language (IDL) for APIs and she is serving. let's get into it π«Ά
β¨ NAME β¨
stone β interface description language (IDL) for APIs π
πΈ SYNOPSIS πΈ
stone [-h] [-v] [--clean-build] [-f FILTER_BY_ROUTE_ATTR] [-r
ROUTE_WHITELIST_FILTER] [-a ATTRIBUTE] [-w WHITELIST_NAMESPACE_ROUTES]
[-b BLACKLIST_NAMESPACE_ROUTES] [backend] [output] [spec ...]
π¦ DESCRIPTION π¦
okay so this manual page is the brief version of what stone does. just the highlights, the trailer, the little teaser π¬
and like, real talk β this page was written for the Debian distribution because the original program literally does not have a manual page. not one. so Debian said "fine, we'll do it ourselves" and honestly? iconic behaviour π
so what is stone? she's a code generator. you hand her your specification and she translates it into objects and functions in whatever programming languages you want. it's giving "I speak every language, actually" πβ¨
π OPTIONS π
so this program follows the usual GNU command line syntax, meaning long options start with two dashes (-). summary of options is right here, bestie:
-h,--helpβ shows you the help message and then dips. bye! π-v,--verboseβ prints debugging statements. she's a yapper and she's telling you everything π£οΈ--clean-buildβ removesbuild_pathbefore the source files get compiled into them. fresh start energy, no crumbs left behind π§Ή-f,--filter-by-route-attrβ removes routes that don't match the expression. the expression has to specify a route attribute on the left-hand side and a value on the right-hand side. use quotes for strings and bytes. the only operators supported are=and!=. for example, ifhideis a route attribute, you can use this filter:hide!=true. and yes you can combine multiple expressions withand/orand use parentheses to enforce precedence. lowkey powerful fr fr πͺ-r,--route-whitelist-filterβ restricts datatype generation to only the routes in the whitelist plus their dependencies. input should be a file containing a JSON dict shaped like this:
{"route_whitelist": {}, "datatype_whitelist": {}}
where each object maps namespaces to lists of routes or datatypes to whitelist. it's giving curated. it's giving selective πΈ
-a,--attributeβ route attributes that the backend will have access to and presumably expose in generated code. use:allto select all attributes defined instone_cfg.Route. and heads up: you can filter (-f) by attributes that are not listed here. sneaky but legal π-w,--whitelist-namespace-routesβ if set, backends will only see the specified namespaces as having routes.-b,--blacklist-namespace-routesβ if set, backends will not see any routes for the specified namespaces. blocked. not invited. π
π ARGUMENTS π
backendβ either the name of a built-in backend or the path to a backend module. paths to backend modules must end with astoneg.pyextension. and the built-in backends are, in order:obj_c_client,obj_c_types,obj_c_tests,js_client,js_types,tsd_client,tsd_types,python_types,python_type_stubs,python_client,swift_types,swift_client. that's twelve, count em, twelve π«outputβ the folder to save generated files to. that's where the babies go πΌspecβ path to API specifications. each one must have a.stoneextension. if it's omitted or set to-, the spec is read from stdin. and you can provide multiple namespaces over stdin by concatenating multiple specs together. chef's kiss, that's the combo move π₯
π AUTHOR π
this manual page was written by fladi fladi@debian.org for the Debian system (and may be used by others). permission is granted to copy, distribute and/or modify this document under the terms of the GNU General Public License, Version 2 any later version published by the Free Software Foundation.
on Debian systems, the complete text of the GNU General Public License can be found in /usr/share/common-licenses/GPL. go read it, it's right there π«Ά
okay that's the whole page bestie, nothing skipped, nothing skipped, every flag accounted for π―
and that's a wrap on stone(1), straight out of section 1 of the General Commands Manual β written for Debian, and yeah it may be used by others too π stay hydrated, filter your routes, and slay π
β¨ππ¦
π¦ where this page comes from
- debian bookworm: python3-stone 3.3.1-2 Β· MIT
- debian trixie: python3-stone 3.3.8-1 Β· MIT
- ubuntu jammy: python3-stone 3.3.1-1 Β· MIT
- ubuntu noble: python3-stone 3.3.1-3 Β· MIT
- ubuntu questing: python3-stone 3.3.8-1
- ubuntu resolute: python3-stone 3.3.9-1 Β· MIT
- ubuntu stonking: python3-stone 3.5.3-1 Β· MIT
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms