diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index e702477ee..51b0e5907 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -61,7 +61,7 @@ "run": "npm ci" }, { - "run": "fjs t" + "run": "fjs test" } ] }, @@ -102,7 +102,7 @@ "run": "npm ci" }, { - "run": "fjs t" + "run": "fjs test" } ] }, @@ -143,7 +143,7 @@ "run": "npm ci" }, { - "run": "fjs t" + "run": "fjs test" } ] }, @@ -184,7 +184,7 @@ "run": "npm ci" }, { - "run": "fjs t" + "run": "fjs test" } ] }, @@ -238,7 +238,7 @@ "run": "npm ci" }, { - "run": "fjs t" + "run": "fjs test" } ] }, @@ -279,7 +279,7 @@ "run": "npm ci" }, { - "run": "fjs t" + "run": "fjs test" } ] }, @@ -395,7 +395,7 @@ "uses": "actions/checkout@v7.0.1" }, { - "run": "deno run -A --minimum-dependency-age=0 npm:functionalscript@0.41.0 t" + "run": "deno run -A --minimum-dependency-age=0 npm:functionalscript@0.41.0 test" }, { "run": "deno install --frozen" @@ -424,7 +424,7 @@ "run": "bun install --frozen-lockfile" }, { - "run": "bunx functionalscript@0.41.0 t" + "run": "bunx functionalscript@0.41.0 test" }, { "run": "bun test --coverage" @@ -450,7 +450,7 @@ "run": "npm ci" }, { - "run": "fjs t" + "run": "fjs test" }, { "run": "node --test" diff --git a/AGENTS.md b/AGENTS.md index 4f4944fd1..4369f52b4 100644 --- a/AGENTS.md +++ b/AGENTS.md @@ -56,20 +56,20 @@ below Node `26.0.0`, so `node --test` and `npm run cov` correctly handle Every row below runs the same suite; pick the first one that fits your environment. -| Command | Runtime | Needs internet | Notes | -| -------------------------------------- | -------- | -------------- | ------------------------------------------ | -| `npm test` | Node 22+ | no | `tsc` + the repo's runner. | -| `npm start t` | Node 22+ | no | The repo's runner, no type-check step. | -| `node --test` | Node 22+ | no | Node's native test runner. | -| `npm run cov` | Node 22+ | no | `node --test` plus coverage. | -| `deno task fjs t` | Deno | no | The repo's runner under Deno. | -| `deno task test` / `deno task cov` | Deno | no | Deno's native test runner / coverage. | -| `bun fjs/module.ts t` | Bun | no | The repo's runner under Bun. | -| `bun test` | Bun | no | Bun's native test runner. | -| `fjs t` | Node 22+ | to install | After `npm install -g functionalscript`. | -| `npx functionalscript t` | Node 22+ | yes | No install step. | -| `deno run -A npm:functionalscript t` | Deno | yes | No install step. | -| `bunx functionalscript t` | Bun | yes | No install step. | +| Command | Runtime | Needs internet | Notes | +| --------------------------------------- | -------- | -------------- | ---------------------------------------- | +| `npm test` | Node 22+ | no | `tsc` + the repo's runner. | +| `npm start test` | Node 22+ | no | The repo's runner, no type-check step. | +| `node --test` | Node 22+ | no | Node's native test runner. | +| `npm run cov` | Node 22+ | no | `node --test` plus coverage. | +| `deno task fjs test` | Deno | no | The repo's runner under Deno. | +| `deno task test` / `deno task cov` | Deno | no | Deno's native test runner / coverage. | +| `bun fjs/module.ts test` | Bun | no | The repo's runner under Bun. | +| `bun test` | Bun | no | Bun's native test runner. | +| `fjs test` | Node 22+ | to install | After `npm install -g functionalscript`. | +| `npx functionalscript test` | Node 22+ | yes | No install step. | +| `deno run -A npm:functionalscript test` | Deno | yes | No install step. | +| `bunx functionalscript test` | Bun | yes | No install step. | The last four rows run a **published** FunctionalScript rather than this working tree's version. `npx`, `deno run`, and `bunx` resolve the latest release each @@ -87,7 +87,7 @@ CI exercises these same combinations — see the `node22`, `node24`, `node26`, and pinned runtime versions. To run only the tests under a subtree, `cd` into that directory and run the -runner from there (e.g. `cd fjs/base64 && fjs t`). Module discovery starts at +runner from there (e.g. `cd fjs/base64 && fjs test`). Module discovery starts at the current working directory, and results are reported per test. ### 1.5 Updating dependencies @@ -124,7 +124,7 @@ cargo fmt -- --check # verify formatting 4. Run the full check set before submitting: ```bash npx tsc # type-check with the repo's TypeScript - fjs t # or any equivalent from §1.4 + fjs test # or any equivalent from §1.4 cargo test # only if you touched Rust cargo clippy cargo fmt -- --check @@ -141,7 +141,7 @@ cargo fmt -- --check # verify formatting ### 3.1 Commands - `npx tsc` — type-check using the repository's version of TypeScript. -- `fjs t` (or any equivalent from [§1.4](#14-ways-to-run-the-functionalscript-test-suite)) +- `fjs test` (or any equivalent from [§1.4](#14-ways-to-run-the-functionalscript-test-suite)) — test FunctionalScript (`.f.ts` / `.f.mjs`) files. - `cargo test`, `cargo clippy`, `cargo fmt -- --check` — the Rust crate. diff --git a/CHANGELOG.md b/CHANGELOG.md index 013e8202f..588a91bf8 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -20,6 +20,10 @@ history. ## Unreleased +- `ci`: generated workflows invoke the CLI by full command name (`fjs test`, + `functionalscript@ test`) instead of the `t` alias + [#1450](https://github.com/functionalscript/functionalscript/pull/1450) + ## 0.43.1 - `vnd.fjs.revision` gains optional flat subject-to-content lock maps; Evo diff --git a/README.md b/README.md index 54c5061ac..77d7852be 100644 --- a/README.md +++ b/README.md @@ -28,39 +28,71 @@ Install FunctionalScript via npm: npm install -g functionalscript ``` -The `fjs` CLI provides several commands: +or run the CLI without installing it, with `npx functionalscript `. -| Command | Description | -|------------------|-----------------------------------------------------------| -| `fjs test` / `t` | Run the FunctionalScript test suite | -| `fjs compile` / `c` | Compile a `.f.ts` module to JavaScript | -| `fjs run` / `r` | Run a FunctionalScript module as a Node program | -| `fjs cas` / `s` | Content-addressable storage (`add`, `get`, `list`) | -| `fjs mcp` / `m` | Run an MCP server over stdio exposing the CAS as tools | -| `fjs ci` / `i` | Generate the GitHub Actions CI workflow | +### Compiling a module -### Content-Addressable Storage (CAS) +A FunctionalScript module is already a valid JavaScript module, so nothing has to +be compiled in order to *run* it. The compiler serves the other direction: it +evaluates a module and emits the data it exports, with every `import` resolved. -FunctionalScript ships a built-in CAS for storing and retrieving blobs by their cryptographic hash: +`m.f.js`: -```bash -fjs cas add myfile.txt # store a file, print its cBase32 hash -fjs cas get # restore a blob by hash -fjs cas list # list all stored hashes +```js +export default "text" ``` -Blobs are stored under `~/.cas/` and addressed by their SHA-256 hash encoded in cBase32. +`input.f.js`: -### MCP Server +```js +import c from "./m.f.js" +const a = 1 +export default [a, a, c, { x: c }] +``` -The CAS is also exposed as an [MCP](https://modelcontextprotocol.io/) server so LLM agents can read and write blobs without a shell: +The output file extension picks the format: ```bash -# register with Claude CLI -claude mcp add cas -- npx functionalscript m +fjs compile input.f.js output.f.js # JavaScript +fjs compile input.f.js output.json # JSON +``` + +`output.f.js` preserves the object graph — a value referenced more than once +stays shared and is emitted as a `const`: + +```js +const c0 = "text" +export default [1,1,c0,{"x":c0}] +``` + +`output.json` is a tree, so shared values are expanded, and types that JSON +cannot express (`bigint`, `undefined`) are not available: + +```json +[1,1,"text",{"x":"text"}] ``` -See [`fjs/mcp/README.md`](fjs/mcp/README.md) for details on the `cas_add`, `cas_get`, and `cas_list` tools. +The compiler currently accepts `import` statements, `const` declarations, and +data expressions (objects, arrays, strings, numbers, `bigint`, booleans, `null`, +`undefined`). Functions and computed expressions are not supported yet. See +[fjs/djs/README.md](fjs/djs/README.md) for the data language and its roadmap, and +[fjs/fsc/README.md](fjs/fsc/README.md) for the compiler itself. + +### The `fjs` CLI + +| Command | Description | Documentation | +|---------------|----------------------------------------------------------------|--------------------------------------------------------| +| `fjs test` | Run the FunctionalScript test suite | [fjs/emergent_testing](fjs/emergent_testing/README.md) | +| `fjs compile` | Compile a FunctionalScript module to JavaScript or JSON | [fjs/djs](fjs/djs/README.md) | +| `fjs run` | Run a FunctionalScript module as a Node program | [fjs/README.md](fjs/README.md) | +| `fjs cas` | Content-addressable storage (`add`, `get`, `list`) | [fjs/cas/README.md](fjs/cas/README.md) | +| `fjs mcp` | [MCP](https://modelcontextprotocol.io/) server over stdio, exposing the CAS and Evo as tools | [fjs/mcp/README.md](fjs/mcp/README.md) | +| `fjs ci` | Generate the GitHub Actions CI workflow | [fjs/ci/README.md](fjs/ci/README.md) | + +Run `fjs help` to print the available commands, or see +[fjs/README.md](fjs/README.md) for the full CLI reference. Commands also accept +short aliases, which `fjs help` prints; the documentation spells them out +instead. ## Vision diff --git a/fjs/README.md b/fjs/README.md index 73de63137..08616d409 100644 --- a/fjs/README.md +++ b/fjs/README.md @@ -9,9 +9,12 @@ node ./fjs/module.ts [args] or via `npx` without a global install: ```sh -npx fjs [args] +npx functionalscript [args] ``` +`npx` resolves the **package** name, not the bin name: `fjs` is an unrelated +package on npm, so `npx fjs …` would run somebody else's code. + or, once the package is installed globally: ```sh @@ -20,37 +23,49 @@ fjs [args] ## Commands -| Command | Alias | Description | -|---------|-------|-------------| -| `test` | `t` | Run the FunctionalScript test suite | -| `compile`| `c` | Compile a FunctionalScript module to JavaScript | -| `cas` | `s` | Content-addressable storage operations | -| `mcp` | `m` | Run an MCP server over stdio exposing the CAS as tools | -| `ci` | `i` | Generate the GitHub Actions CI workflow | -| `run` | `r` | Run a FunctionalScript module as a program | -| `help` | `h`, `?` | Print available commands | +| Command | Description | Documentation | +|---------|-------------|---------------| +| `test` | Run the FunctionalScript test suite | [emergent_testing](emergent_testing/README.md) | +| `compile`| Compile a FunctionalScript module to JavaScript or JSON | [djs](djs/README.md), [fsc](fsc/README.md) | +| `cas` | Content-addressable storage operations (`add`, `get`, `list`) | [cas](cas/README.md) | +| `mcp` | Run an MCP server over stdio exposing the CAS and Evo as tools | [mcp](mcp/README.md) | +| `ci` | Generate the GitHub Actions CI workflow | [ci](ci/README.md) | +| `run` | Run a FunctionalScript module as a program | [below](#fjs-run--running-a-module-as-a-program) | +| `help` | Print available commands | | + +Each command also accepts a short alias (`fjs t` for `fjs test`, and so on). +`fjs help` prints them; this documentation uses the full names throughout. + +## `fjs compile` — compiling a module + +```sh +fjs compile +``` + +The output extension picks the format: `.json` emits a tree (shared values are +expanded), anything else emits a JavaScript module that preserves sharing by +naming reused values as `const`s. Imports are resolved and inlined in both +cases. See [djs/README.md](djs/README.md) for the accepted subset. ## `fjs ci` — generating the standard CI workflow ```sh fjs ci -fjs i ``` `fjs ci` runs the built-in CI generator from `fjs/ci/module.f.ts`, writing `.github/workflows/ci.yml`. It is the standard entry point for projects that want FunctionalScript's default workflow. Projects with custom CI setup code should keep -using `fjs r `, so their module can call `ci(setup)` with its own +using `fjs run `, so their module can call `ci(setup)` with its own extra runtime steps. ## `fjs run` — running a module as a program ```sh fjs run [args...] -fjs r [args...] ``` -`fjs r` dynamically imports `` and calls its `main` export as a +`fjs run` dynamically imports `` and calls its `main` export as a `NodeProgram`: ```ts @@ -59,7 +74,7 @@ fjs r [args...] ### Convention: `export const main` -A module intended to be run with `fjs r` must export a named `main` constant +A module intended to be run with `fjs run` must export a named `main` constant of type `NodeProgram`: ```ts @@ -82,7 +97,7 @@ This mirrors: Any arguments after `` are forwarded to `main` via `options.args`: ```sh -fjs r ./my-tool.f.ts foo bar # options.args === ['foo', 'bar'] +fjs run ./my-tool.f.ts foo bar # options.args === ['foo', 'bar'] ``` diff --git a/fjs/cas/evo/README.md b/fjs/cas/evo/README.md index c26024c44..c2be9f0a0 100644 --- a/fjs/cas/evo/README.md +++ b/fjs/cas/evo/README.md @@ -239,7 +239,7 @@ any other reason, a blob that is not a revision — comes back as - [`fjs/mcp/evo`](../../mcp/evo/) — MCP tool definitions (`evo_list` / `evo_head` / `evo_revision` / `evo_add`) for agents, served by the same process as [`fjs/mcp`](../../mcp/)'s `cas_add`/`cas_get`/`cas_list` — one - `~/.cas/` store, one Evo cache, one server (`npx functionalscript m`). + `~/.cas/` store, one Evo cache, one server (`npx functionalscript mcp`). ## In-memory cache is per process diff --git a/fjs/ci/README.md b/fjs/ci/README.md index 30ac74464..c1804bc99 100644 --- a/fjs/ci/README.md +++ b/fjs/ci/README.md @@ -72,11 +72,11 @@ Windows and macOS jobs install. ### Expected package scripts The generated platform jobs run `npm ci`, install the pinned FunctionalScript -package globally, and run `fjs t`. Canonical Node jobs run on Ubuntu ARM and are +package globally, and run `fjs test`. Canonical Node jobs run on Ubuntu ARM and are split by Node version: - Node 22 runs `npm ci`, installs the pinned FunctionalScript package globally, - and runs `fjs t`. + and runs `fjs test`. - Node 24 runs `npm ci` and `node --test`. - Node 26 runs `npm ci`, `npm run ci-update`, `git add -A && git diff --cached --exit-code`, `npx tsc`, `npm run cov`, and `npm pack`. @@ -87,7 +87,7 @@ and `ci-update`. A typical FunctionalScript project can define them like this: ```json { "scripts": { - "test": "tsc && fjs t", + "test": "tsc && fjs test", "cov": "node --test --experimental-test-coverage --test-coverage-include=**/module.f.ts", "ci-update": "fjs ci" } @@ -119,13 +119,13 @@ import 'functionalscript/fjs/emergent_testing/all.test.js' ``` Without that file, third-party test runners discover no FunctionalScript proofs -and will report zero tests. `fjs t` is the exception: it discovers proof modules +and will report zero tests. `fjs test` is the exception: it discovers proof modules directly and does not need `all.test.ts`. **Note,** `npm run ci-update` in this repository runs the same built-in command through the checked-in Node entry point, which avoids relying on the package bin before the package has been installed. Custom projects that need different runtime setup steps -should use `fjs r ` and call `ci(setup)` directly instead of +should use `fjs run ` and call `ci(setup)` directly instead of modifying the built-in command. The built-in command does not read `package.json` to customize generated steps. diff --git a/fjs/ci/bun/module.f.ts b/fjs/ci/bun/module.f.ts index 1c1968907..f0cd61830 100644 --- a/fjs/ci/bun/module.f.ts +++ b/fjs/ci/bun/module.f.ts @@ -11,6 +11,6 @@ export const bunSteps = (version: string): readonly MetaStep[] => [ install(uses('oven-sh/setup-bun', { 'bun-version': bun })), install({ run: `bun install -g functionalscript@${version}` }), test({ run: 'bun install --frozen-lockfile' }), - test({ run: `bunx functionalscript@${version} t` }), + test({ run: `bunx functionalscript@${version} test` }), test({ run: 'bun test --coverage' }), ] diff --git a/fjs/ci/deno/module.f.ts b/fjs/ci/deno/module.f.ts index 80c678c52..05bd7ab73 100644 --- a/fjs/ci/deno/module.f.ts +++ b/fjs/ci/deno/module.f.ts @@ -25,7 +25,7 @@ export const denoSteps = (version: string): readonly MetaStep[] => [ // which is the default minimum dependency age for Deno installs. // This way we can test the latest version of the package in CI without waiting for 24 hours. install({ run: `deno install -g -A --minimum-dependency-age=0 npm:functionalscript@${version}` }), - test({ run: `deno run -A --minimum-dependency-age=0 npm:functionalscript@${version} t` }), + test({ run: `deno run -A --minimum-dependency-age=0 npm:functionalscript@${version} test` }), test({ run: 'deno install --frozen' }), test({ run: `${denoTest} --coverage && deno coverage --include='${coverageInclude}'` }), ] diff --git a/fjs/ci/node/module.f.ts b/fjs/ci/node/module.f.ts index 9f899cc81..aca368c0e 100644 --- a/fjs/ci/node/module.f.ts +++ b/fjs/ci/node/module.f.ts @@ -31,13 +31,13 @@ const fjsGlobalInstall = (version: string): MetaStep => export const platformNodeSteps = (version: string): readonly MetaStep[] => [ ...nodeInstall(node.default), fjsGlobalInstall(version), - test({ run: 'fjs t' }), + test({ run: 'fjs test' }), ] const node22Steps = (version: string): readonly MetaStep[] => [ ...nodeInstall(node.node22), fjsGlobalInstall(version), - test({ run: 'fjs t' }), + test({ run: 'fjs test' }), test({ run: 'node --test' }), ] diff --git a/fjs/ci/proof.f.ts b/fjs/ci/proof.f.ts index 65fd19586..219bad04c 100644 --- a/fjs/ci/proof.f.ts +++ b/fjs/ci/proof.f.ts @@ -86,7 +86,7 @@ export const proof = { assert(hasRunInJob('wasm', 'cargo clippy --target wasm32-wasip1-threads -- -D warnings')(gha), 'expected WASM threads lint') assert(!hasExactRunInJob('wasm', 'cargo test --target wasm32-wasip1-threads')(gha), 'unexpected Wasmtime WASM threads check') assert(!hasExactRunInJob('wasm', 'cargo test --target wasm32-wasip1-threads --release')(gha), 'unexpected Wasmtime WASM threads release check') - assert(hasRunInJob('node22', 'fjs t')(gha), 'expected Node 22 FunctionalScript smoke test') + assert(hasRunInJob('node22', 'fjs test')(gha), 'expected Node 22 FunctionalScript smoke test') assert(hasRunInJob('node26', 'npm pack')(gha), 'expected Node 26 package check') assert(hasRunInJob('node26', 'npm run ci-update')(gha), 'expected Node 26 workflow regeneration') assert(hasRunInJob('node26', 'git add -A && git diff --cached --exit-code')(gha), 'expected Node 26 generated-file drift check') @@ -135,25 +135,25 @@ export const proof = { defaultSetup: { functionalscriptPackage: () => { const gha = runDefault('{"name":"functionalscript"}') - assert(hasRun('fjs t')(gha), 'expected fjs self-test') - assert(hasRun(`deno run -A --minimum-dependency-age=0 npm:functionalscript@${functionalscript} t`)(gha), 'expected deno self-test') - assert(hasRun(`bunx functionalscript@${functionalscript} t`)(gha), 'expected bun self-test') + assert(hasRun('fjs test')(gha), 'expected fjs self-test') + assert(hasRun(`deno run -A --minimum-dependency-age=0 npm:functionalscript@${functionalscript} test`)(gha), 'expected deno self-test') + assert(hasRun(`bunx functionalscript@${functionalscript} test`)(gha), 'expected bun self-test') }, otherPackage: () => { const gha = runDefault('{"name":"other-package"}') - assert(hasRun(`deno run -A --minimum-dependency-age=0 npm:functionalscript@${functionalscript} t`)(gha), 'expected canonical deno self-test') - assert(hasRun(`bunx functionalscript@${functionalscript} t`)(gha), 'expected canonical bun self-test') + assert(hasRun(`deno run -A --minimum-dependency-age=0 npm:functionalscript@${functionalscript} test`)(gha), 'expected canonical deno self-test') + assert(hasRun(`bunx functionalscript@${functionalscript} test`)(gha), 'expected canonical bun self-test') }, configuredPackageVersion: () => { const gha = runDefault('{"name":"other-package","version":"1.2.3"}') assert(hasRun(`npm install -g functionalscript@${functionalscript}`)(gha), 'expected configured-version platform install') assert(hasRun(`deno install -g -A --minimum-dependency-age=0 npm:functionalscript@${functionalscript}`)(gha), 'expected configured-version deno install cache') assert(hasRun('deno install --frozen')(gha), 'expected deno lock install') - assert(hasRun(`deno run -A --minimum-dependency-age=0 npm:functionalscript@${functionalscript} t`)(gha), 'expected configured-version deno install') + assert(hasRun(`deno run -A --minimum-dependency-age=0 npm:functionalscript@${functionalscript} test`)(gha), 'expected configured-version deno install') assert(hasRun(`deno test --allow-read --allow-env --allow-sys --coverage && deno coverage --include='${coverageInclude}'`)(gha), 'expected limited-permission deno coverage') assert(hasRun(`bun install -g functionalscript@${functionalscript}`)(gha), 'expected configured-version bun cache') assert(hasRun('bun install --frozen-lockfile')(gha), 'expected bun lock install') - assert(hasRun(`bunx functionalscript@${functionalscript} t`)(gha), 'expected configured-version bun install') + assert(hasRun(`bunx functionalscript@${functionalscript} test`)(gha), 'expected configured-version bun install') }, missingPackageJson: () => { const gha = runDefault() diff --git a/fjs/djs/examples/input.f.ts b/fjs/djs/examples/input.f.ts index 3b88c801e..e081d9f28 100644 --- a/fjs/djs/examples/input.f.ts +++ b/fjs/djs/examples/input.f.ts @@ -1,4 +1,4 @@ import c from "./m.f.ts" const a = 1 -const b = 2; +const b = 2 export default [a, a, b, c, c] \ No newline at end of file diff --git a/fjs/emergent_testing/README.md b/fjs/emergent_testing/README.md index 26ad287e9..38a18187f 100644 --- a/fjs/emergent_testing/README.md +++ b/fjs/emergent_testing/README.md @@ -24,13 +24,14 @@ Three terms are used precisely throughout this document: The built-in emergent testing runner can run without adding FunctionalScript to `package.json` or `deno.json`: -- Node: `npx npm:functionalscript t` -- Deno: `deno run -A npm:functionalscript t` -- Bun: `bunx functionalscript t` +- Node: `npx npm:functionalscript test` +- Deno: `deno run -A npm:functionalscript test` +- Bun: `bunx functionalscript test` Pin a specific package version by adding it after the package name, for example -`npx npm:functionalscript@0.29.0 t`, `deno run -A npm:functionalscript@0.29.0 t`, -or `bunx functionalscript@0.29.0 t`. +`npx npm:functionalscript@0.29.0 test`, +`deno run -A npm:functionalscript@0.29.0 test`, or +`bunx functionalscript@0.29.0 test`. This only applies to the built-in runner. External runners still need FunctionalScript installed so `all.test.ts` can import @@ -53,13 +54,13 @@ deno install npm:functionalscript ## Running proofs -### `fjs t` (built-in runner) +### `fjs test` (built-in runner) FunctionalScript's own runner discovers all proof modules automatically — no entry file required: ```sh -fjs t +fjs test ``` ### External runners (Node, Bun, Deno) @@ -172,7 +173,7 @@ The `throw` key can appear at any depth; every test case reachable through it inherits the throw expectation. For example, `import('proof.ts').proof[5].throw.my()` is a throw test because `throw` appears in its path. Because the expectation is encoded in the path, no separate marker -is needed in the output — `fjs t` appends `# EXPECTED TO THROW` to such a case +is needed in the output — `fjs test` appends `# EXPECTED TO THROW` to such a case when it passes. ### Return value as a sub-tree diff --git a/fjs/mcp/README.md b/fjs/mcp/README.md index afe76cdc5..f47f97bcb 100644 --- a/fjs/mcp/README.md +++ b/fjs/mcp/README.md @@ -24,7 +24,7 @@ step, so `evo_list`/`evo_head` never rescan. Register the CAS MCP server command with your LLM client: ```sh -npx functionalscript m +npx functionalscript mcp ``` Follow your LLM client's instructions to register that command as an MCP server. @@ -32,9 +32,9 @@ For example: ```sh # register the MCP for Claude -claude mcp add cas -- npx functionalscript m +claude mcp add cas -- npx functionalscript mcp # register the MCP for Codex -codex mcp add cas -- npx functionalscript m +codex mcp add cas -- npx functionalscript mcp ``` This command uses `npx` to run the latest version of [FunctionalScript](https://www.npmjs.com/package/functionalscript), downloading it on startup if needed. diff --git a/fjs/mcp/evo/README.md b/fjs/mcp/evo/README.md index 19134b56c..e31c9bc18 100644 --- a/fjs/mcp/evo/README.md +++ b/fjs/mcp/evo/README.md @@ -10,7 +10,7 @@ These tools are not their own server. They are served by the same process as `Evo` from its own `Cas` and cache slot (`initEvo`, scanned once at startup), concatenates `evoToolRegistry` onto its own tool registry, and serves everything — one `~/.cas/` store, one Evo cache, one server, one -`npx functionalscript m`. See [`fjs/mcp/README.md`](../README.md) +`npx functionalscript mcp`. See [`fjs/mcp/README.md`](../README.md) for how to run it and register it with an MCP client. ## Tools diff --git a/todo/demo/README.md b/todo/demo/README.md index fdb66849f..6421859a8 100644 --- a/todo/demo/README.md +++ b/todo/demo/README.md @@ -113,7 +113,7 @@ export default { Run it with: ```sh -fjs t +fjs test ``` ## 6. Roadmap