teaos
v0.0.8
Published
local package, component, and npm plugin manager
Readme
teaos (0.0.8)
Use local and npm package plugins with a unified runtime loader.
Changelog
0.0.7 (2026-05-02)
- Added CLI commands
teaos dependenciesandteaos dependencies-localto inspect traced dependency results fromteaos.json. - Documented recursive API usage for dependency tracing:
teaos.dependencies(lpath, {recursive: true})andteaos.localDependencies(lpath, {recursive: true}).
Installation
command line
npm install -g teaos
teaos lslibrary
npm install teaosUsage
Command line
Run in your project root.
teaosPrints the installed teaos package version.
teaos lsLists local packages found in ./lib/{package}/index.js.
teaos ls -lShows detailed module info including scanned extension details for each local package under ./lib.
teaos ls appsIf ./apps exists, lists directories directly under ./apps.
teaos ls libSame output as teaos ls.
teaos extension-typesScans ./lib/*/lib/extensions/* and prints detected extension types.
teaos attr <NAME>Prints teaos.attr(NAME) for the current project (for example: root, name, path.@apps).
teaos ls --extension-type <type>Lists tea modules that contain the specified extension type.
teaos extensions --allShows all discovered extensions as <module>.<extension-type>.
teaos extensions --type <type>Shows extensions for modules matching the specified extension type.
teaos extensions --package <name>Shows extensions for the specified tea module.
teaos require <package>
teaos use <package>Loads a local package as @<package> and prints trace logs (require / declare).
teaos require.all
teaos use.allLoads all packages discovered under ./lib.
teaos @<package>/<tool> [...args]
teaos <package>/<tool> [...args]teaos create app <appname>Creates apps/<appname>/teaos.json and apps/<appname>/index.js.
teaos create lib <libname>Creates lib/<libname>/teaos.json and lib/<libname>/index.js.
teaos install [<name>|@<libname>]
teaos install lib/<libname>
teaos install apps/<appname>teaos initInitializes teaos.json in the current project root (similar to npm init for teaos metadata).
- If
teaos.jsonalready exists, the command makes no changes. - If
teaos.jsondoes not exist, it is created with:name: copied frompackage.json.namewhen available (otherwise directory name)dependencies: copied frompackage.json.dependencieswhen available (otherwise{})
Adds/synchronizes dependencies for the current scope (project root, apps/<appname>, lib/<libname>).
teaos install @<libname>- Adds
@<libname>: "*"to scopedteaos.json. - If current scope is
apps/<appname>, also adds the same entry to rootteaos.json. - If
TEAOS_REPOis set (loaded from root.envwhen present) andlib/<libname>is missing, clones<TEAOS_REPO>/<TEAOS_REPO_PREFIX><libname>.gitintolib/<libname>. TEAOS_REPO_PREFIXis optional (defaults to empty string when undefined).
- Adds
teaos install <name>- Adds
<name>: "*"to scopedteaos.json. - Runs npm-style install for the root project (
npm install <name>), withnode_moduleshandled only at project root.
- Adds
teaos install lib/<libname>- Alias for
teaos install @<libname>.
- Alias for
teaos install apps/<appname>- Installs an application repository into
./apps/<appname>(if not already present). - Uses
<TEAOS_REPO>/<APPS_REPO_PREFIX><appname>.gitas clone URL. APPS_REPO_PREFIXis optional (defaults to empty string when undefined).
- Installs an application repository into
teaos install(no args)- Verifies and reconciles
dependenciesand local modules in the current scope.
- Verifies and reconciles
teaos uninstall <name|@libname>
teaos uninstall lib/<libname>
teaos uninstall apps/<appname>Removes the dependency key from dependencies in the current scope's teaos.json.
- In
apps/<appname>scope, also removes the same key from rootteaos.json. - In
lib/<libname>scope, updates only that lib'steaos.json. teaos uninstall lib/<libname>is an alias for uninstalling@<libname>.teaos uninstall apps/<appname>is currently not supported (no-op).- Does not delete
lib/<name>directories ornode_modulesentries.
teaos dependencies
teaos dependencies-localPrints traced dependency sets for the current project scope:
teaos dependenciesshows all dependency package names (local and npm).teaos dependencies-localshows only local dependency names (@...).
Recursive verification:
- Newly loaded
lib/*/teaos.jsonfiles are read recursively. - Internal deps (
@...) are checked againstlib/*and loaded fromTEAOS_REPOwhen available. - npm deps are checked in root
node_modules, and missing packages are installed.
Dependency format in teaos.json:
{
"name": "@libA",
"dependencies": {
"@libB": "*",
"@libC": "*",
"libX": "1.0.0"
}
}Internal modules (@...) are always written as "*".
Loads an external CLI tool from either:
lib/<package>/lib/extensions/teaos-tool/<tool>.jsnode_modules/<package>/lib/extensions/teaos-tool/<tool>.js
Library API
local packages (lib/{package})
const teaos = require('teaos');
teaos.require("@something");npm package plugins
const teaos = require('teaos');
const plugin = teaos.require('some-npm-plugin');declare component
const teaos = require('teaos');
const desc = { type: "function", func: funcX };
teaos.declare(desc);listen declaration
const teaos = require('teaos');
teaos.on("declare", (desc) => {
});dynamic configurable local packages / npm plugins
const teaos = require('teaos');
teaos.use("@something", { resources: '*' }); // local package resources
teaos.use("some-npm-plugin", { resources: '*' }); // npm plugin resourcesdependency trace API
const teaos = require('teaos');
teaos.dependencies(lpath, { recursive: true });
teaos.localDependencies(lpath, { recursive: true });lpath: path to scan (for example,./libor./apps).recursive: true: recursively reads discoveredteaos.jsonfiles and returns accumulated dependencies.
project attributes
const teaos = require('teaos');
teaos.attr('root'); // project directory absolute path (resolved from app entry / node_modules path)
teaos.attr('name'); // package.json.name -> teaos.json.name -> directory name
teaos.attr('path.@apps'); // "./apps" if ./apps exists
teaos.attr('path.apps'); // absolute path of ./apps if exists
teaos.attr('path.@lib'); // "./lib"
teaos.attr('path.lib'); // absolute path of ../lib if exists
teaos.attr('path.@tests'); // "./tests"
teaos.attr('path.tests'); // absolute path of ../tests if existsDeploying Rules
Simple Local package
- local package path: lib/{local package}
Local package with dynamic resource management
- local package path: lib/{local package}
- resource directory: lib/{local package}/lib/extensions
- resource definition files:
- lib/{local package}/lib/extensions/{resource type}.js
- lib/{local package}/lib/extensions/{resource type}/index.js
- lib/{local package}/lib/extensions/{resource type}/{resource name}.js
- test path: lib/{local package}/tests
- resource types:
- value: general value (reserved)
- variable: general variable (reserved)
- function: { type: 'function', name: (default: Function.name), func: Function }
- operator: general operator (reserved)
- command: command as operator (reserved)
- expression: expression as operator (reserved)
- aspect: aspect to context (reserved)
Theory

- F: function
- F_a: aspected function
- F_m: composited function (Set model)
- F_c: context (ex. commit, p2p, probe, loging, Kalman filter)
- O_d: operator (ex. integral, decode/encode)
- O_l: linear operator (ex. step function, matrix)
- O_{inverse}: inversable operator
- V: variable
- V_c: composited variable
- Λ: Eigenvalue
- X_c: Eigenvector
- P: Probability density function
- H_e: Entropy
History
- version 0.0.8
- Stable commandline
- version 0.0.7
- Add
teaos dependenciesandteaos dependencies-localcommands - Add recursive dependency API examples:
teaos.dependencies(lpath, {recursive: true}),teaos.localDependencies(lpath, {recursive: true})
- Add
- version 0.0.6
- Add support for npm package plugins
- Improve CLI usage documentation
- version 0.0.5
- Add Theory
- version 0.0.4
- SVG to PNG
- version 0.0.3
- improve trace log
- add theory doc
- version 0.0.2
- support teaos.use()
- support teaos.extensions()
- support teaos "command use {local package}""
- support teaos "command require {local package}""
- version 0.0.1
- add teaos command
- support command "teaos ls"
- support 'require' event
- version 0.0.0
- support teaos.require()
- support teaos.declare(desc)
- support teaos.on(name, handler)
- support 'declare' event
